Skip to content

Commit 6f87208

Browse files
committed
boards: arm: stm32h7b3 disco kit move partition to ext flash
Add the OSPI 1 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 19e10b1 commit 6f87208

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

boards/st/stm32h7b3i_dk/board.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# keep first
5-
if(CONFIG_STM32_MEMMAP)
65
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
7-
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32H7B3I-DISCO.stldr")
8-
else()
9-
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_STM32H7B3I-DISCO.stldr")
108
endif()
119

1210
board_runner_args(jlink "--device=STM32H7B3LI" "--speed=4000")

boards/st/stm32h7b3i_dk/stm32h7b3i_dk.dts

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,24 @@
276276
def-back-color-blue = <0xFF>;
277277
};
278278

279+
&flash0 {
280+
partitions {
281+
compatible = "fixed-partitions";
282+
#address-cells = <1>;
283+
#size-cells = <1>;
284+
285+
boot_partition: partition@0 {
286+
label = "mcuboot";
287+
reg = <0x00000000 DT_SIZE_K(64)>;
288+
};
289+
290+
storage_partition: partition@f0000 {
291+
label = "storage";
292+
reg = <0x000f0000 DT_SIZE_K(64)>;
293+
};
294+
};
295+
};
296+
279297
&octospi1 {
280298
pinctrl-0 = <&octospim_p1_clk_pb2 &octospim_p1_ncs_pg6
281299
&octospim_p1_io0_pd11 &octospim_p1_io1_pf9
@@ -301,9 +319,19 @@
301319
#address-cells = <1>;
302320
#size-cells = <1>;
303321

304-
partition@0 {
305-
label = "nor";
306-
reg = <0x00000000 DT_SIZE_M(4)>;
322+
slot0_partition: partition@0 {
323+
label = "image-0";
324+
reg = <0x00000000 DT_SIZE_K(256)>;
325+
};
326+
327+
slot1_partition: partition@40000 {
328+
label = "image-1";
329+
reg = <0x00040000 DT_SIZE_K(256)>;
330+
};
331+
332+
scratch_partition: partition@e0000 {
333+
label = "image-scratch";
334+
reg = <0x000e0000 DT_SIZE_K(64)>;
307335
};
308336
};
309337
};

0 commit comments

Comments
 (0)