Skip to content

Commit 9a0fc83

Browse files
committed
boards: arm: stm32h735 disco kit move partition to ext flash
Add the OSPI 1 which is an octoSPI connection to a octo NOR flash mx25lm51245 on the stm32h735 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 7506d96 commit 9a0fc83

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

boards/st/stm32h735g_disco/board.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
# keep first
55
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
6+
if(CONFIG_STM32_MEMMAP OR (CONFIG_XIP AND CONFIG_BOOTLOADER_MCUBOOT))
7+
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32H735G-DK.stldr")
8+
endif()
69
board_runner_args(jlink "--device=STM32H735IG" "--speed=4000")
710
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
811

boards/st/stm32h735g_disco/stm32h735g_disco.dts

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,29 @@
169169
disk-name = "SD";
170170
};
171171

172+
&flash0 {
173+
partitions {
174+
compatible = "fixed-partitions";
175+
#address-cells = <1>;
176+
#size-cells = <1>;
177+
178+
/*
179+
* Following flash partition is dedicated to the use of b_u585i_iot02a
180+
* with TZEN=0 (so w/o TFM).
181+
* Set the partitions with first MB to make use of the whole Bank1
182+
*/
183+
boot_partition: partition@0 {
184+
label = "mcuboot";
185+
reg = <0x00000000 DT_SIZE_K(64)>;
186+
};
187+
188+
storage_partition: partition@f0000 {
189+
label = "storage";
190+
reg = <0x000f0000 DT_SIZE_K(64)>;
191+
};
192+
};
193+
};
194+
172195
&octospi1 {
173196
pinctrl-0 = <&octospim_p1_clk_pf10 &octospim_p1_ncs_pg6
174197
&octospim_p1_io0_pd11 &octospim_p1_io1_pd12
@@ -194,11 +217,20 @@
194217
#address-cells = <1>;
195218
#size-cells = <1>;
196219

197-
partition@0 {
198-
label = "nor";
199-
reg = <0x00000000 DT_SIZE_M(4)>;
220+
slot0_partition: partition@0 {
221+
label = "image-0";
222+
reg = <0x00000000 DT_SIZE_K(256)>;
223+
};
224+
slot1_partition: partition@40000 {
225+
label = "image-1";
226+
reg = <0x00040000 DT_SIZE_K(256)>;
227+
};
228+
scratch_partition: partition@e0000 {
229+
label = "image-scratch";
230+
reg = <0x000e0000 DT_SIZE_K(64)>;
200231
};
201232
};
233+
202234
};
203235
};
204236

0 commit comments

Comments
 (0)