Skip to content

Commit 19e10b1

Browse files
committed
boards: arm: stm32u585 disco kit move partition to ext flash
Add the XSPI 2 which is an octoSPI connection to a octo NOR flash mx25lm51245 on the stm32u585 disco kit. Define the partition on the 64MBytes space of the external flash. Use the STM32Cube programmer to flash with the corresponding external loader for XiP mode. Do not mass-erase the internal flash when flashing. Removing usb_device will avoid test feature for that board. Signed-off-by: Francois Ramu <[email protected]>
1 parent 863c64b commit 19e10b1

File tree

4 files changed

+15
-22
lines changed

4 files changed

+15
-22
lines changed

boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,19 @@ stm32_lp_tick_source: &lptim1 {
152152
#address-cells = <1>;
153153
#size-cells = <1>;
154154

155-
partition@0 {
156-
reg = <0x00000000 DT_SIZE_M(64)>;
155+
slot0_partition: partition@0 {
156+
label = "image-0";
157+
reg = <0x00000000 DT_SIZE_K(256)>;
158+
};
159+
160+
slot1_partition: partition@40000 {
161+
label = "image-1";
162+
reg = <0x00040000 DT_SIZE_K(256)>;
163+
};
164+
165+
scratch_partition: partition@e0000 {
166+
label = "image-scratch";
167+
reg = <0x000e0000 DT_SIZE_K(64)>;
157168
};
158169
};
159170
};

boards/st/b_u585i_iot02a/b_u585i_iot02a.dts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,6 @@
5454
reg = <0x00000000 DT_SIZE_K(64)>;
5555
};
5656

57-
slot0_partition: partition@10000 {
58-
label = "image-0";
59-
reg = <0x00010000 DT_SIZE_K(416)>;
60-
};
61-
62-
slot1_partition: partition@78000 {
63-
label = "image-1";
64-
reg = <0x00078000 DT_SIZE_K(416)>;
65-
};
66-
67-
scratch_partition: partition@e0000 {
68-
label = "image-scratch";
69-
reg = <0x000e0000 DT_SIZE_K(64)>;
70-
};
71-
7257
storage_partition: partition@f0000 {
7358
label = "storage";
7459
reg = <0x000f0000 DT_SIZE_K(64)>;

boards/st/b_u585i_iot02a/b_u585i_iot02a.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ supported:
1212
- arduino_spi
1313
- hts221
1414
- dma
15-
- usb_device
1615
- spi
1716
- dac
1817
- adc

boards/st/b_u585i_iot02a/board.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ if(CONFIG_BUILD_WITH_TFM)
1313
endif()
1414

1515
# keep first
16-
if(CONFIG_STM32_MEMMAP)
1716
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
18-
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32U585I-IOT02A.stldr")
19-
else()
20-
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
17+
if(CONFIG_STM32_MEMMAP OR (CONFIG_XIP AND CONFIG_BOOTLOADER_MCUBOOT))
18+
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32U585I-IOT02A.stldr")
2119
endif()
2220

2321
board_runner_args(openocd "--tcl-port=6666")

0 commit comments

Comments
 (0)