Skip to content

Commit d9a03a8

Browse files
committed
boards: arm: stm32h7b3 disco kit for XiP on external octoflash
Define the Device tree of the stm32h7b3i_dk disco board to access the external NOR octo-flash in MemoryMapped mode for XiP Set openocd runner for debugging. Signed-off-by: Francois Ramu <[email protected]>
1 parent 1b1e047 commit d9a03a8

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,35 @@
242242
def-back-color-blue = <0xFF>;
243243
};
244244

245+
&flash0 {
246+
partitions {
247+
compatible = "fixed-partitions";
248+
#address-cells = <1>;
249+
#size-cells = <1>;
250+
251+
boot_partition: partition@0 {
252+
label = "mcuboot";
253+
reg = <0x00000000 DT_SIZE_K(64)>;
254+
read-only;
255+
};
256+
257+
/*
258+
* The flash starting at offset 0x10000 and ending at
259+
* offset 0x1ffff is reserved for use by the application.
260+
*/
261+
262+
slot0_partition: partition@10000 {
263+
label = "image-0";
264+
reg = <0x00010000 DT_SIZE_K(800)>;
265+
};
266+
267+
scratch_partition: partition@f8000 {
268+
label = "image-scratch";
269+
reg = <0x000F8000 DT_SIZE_K(16)>;
270+
};
271+
};
272+
};
273+
245274
&octospi1 {
246275
pinctrl-0 = <&octospim_p1_clk_pb2 &octospim_p1_ncs_pg6
247276
&octospim_p1_io0_pd11 &octospim_p1_io1_pf9
@@ -253,11 +282,10 @@
253282

254283
status = "okay";
255284

256-
mx25lm51245: ospi-nor-flash@0 {
285+
mx25lm51245: ospi-nor-flash@90000000 {
257286
compatible = "st,stm32-ospi-nor";
258-
reg = <0>;
287+
reg = <0x90000000 DT_SIZE_M(64)>; /* 512 Megabits */
259288
ospi-max-frequency = <DT_FREQ_M(50)>;
260-
size = <DT_SIZE_M(512)>; /* 512 Megabits */
261289
spi-bus-width = <OSPI_OPI_MODE>;
262290
data-rate = <OSPI_DTR_TRANSFER>;
263291
status = "okay";
@@ -267,9 +295,10 @@
267295
#address-cells = <1>;
268296
#size-cells = <1>;
269297

270-
partition@0 {
271-
label = "nor";
272-
reg = <0x00000000 DT_SIZE_M(4)>;
298+
/* put image at offset 0 in slot1 */
299+
slot1_partition:partition@0 {
300+
label = "image-1";
301+
reg = <0x00000000 DT_SIZE_K(800)>;
273302
};
274303
};
275304
};

boards/arm/stm32h7b3i_dk/support/openocd.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ set CORE_RESET 0
2020

2121
source [find target/stm32h7x.cfg]
2222

23+
# Due to the use of connect_assert_srst, running gdb requires
24+
# to reset halt just after openocd init.
25+
rename init old_init
26+
proc init {} {
27+
old_init
28+
reset halt
29+
}

0 commit comments

Comments
 (0)