Skip to content

Commit 79f4a6f

Browse files
committed
boards: arm: stm32u585 disco kit move partition to ext flash
Add the octoSPI 2 which is connection to a octo NOR flash mx25lm51245 on the stm32u585 disco kit. Define the partition on the 64MBytes space of the external flash in the specific dts file (not the _ns one). 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 f53ea4e commit 79f4a6f

File tree

4 files changed

+19
-26
lines changed

4 files changed

+19
-26
lines changed

boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,6 @@ stm32_lp_tick_source: &lptim1 {
146146
data-rate = <OSPI_DTR_TRANSFER>;
147147
four-byte-opcodes;
148148
status = "okay";
149-
150-
partitions {
151-
compatible = "fixed-partitions";
152-
#address-cells = <1>;
153-
#size-cells = <1>;
154-
155-
partition@0 {
156-
reg = <0x00000000 DT_SIZE_M(64)>;
157-
};
158-
};
159149
};
160150
};
161151

boards/st/b_u585i_iot02a/b_u585i_iot02a.dts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,31 @@
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)>;
57+
storage_partition: partition@f0000 {
58+
label = "storage";
59+
reg = <0x000f0000 DT_SIZE_K(64)>;
6060
};
61+
};
62+
};
6163

62-
slot1_partition: partition@78000 {
64+
&mx25lm51245 {
65+
partitions {
66+
compatible = "fixed-partitions";
67+
#address-cells = <1>;
68+
#size-cells = <1>;
69+
70+
slot0_partition: partition@0 {
71+
label = "image-0";
72+
reg = <0x00000000 DT_SIZE_K(256)>;
73+
};
74+
slot1_partition: partition@40000 {
6375
label = "image-1";
64-
reg = <0x00078000 DT_SIZE_K(416)>;
76+
reg = <0x00040000 DT_SIZE_K(256)>;
6577
};
66-
6778
scratch_partition: partition@e0000 {
6879
label = "image-scratch";
6980
reg = <0x000e0000 DT_SIZE_K(64)>;
7081
};
71-
72-
storage_partition: partition@f0000 {
73-
label = "storage";
74-
reg = <0x000f0000 DT_SIZE_K(64)>;
75-
};
7682
};
7783
};
7884

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)