Skip to content

Commit 3abbb45

Browse files
committed
boot: zephyr: boards config of the stm32 disco kit
Define the stm32 disco board configuration to set the STM32 XIP mode that will enable the MemoryMapped mode. See Kconfig of the stm32 soc. Choose the mcu_boot partition where to build ../bootloader/mcuboot/boot/zephyr The zephyr, chosen zephyr,flash = &flash0; is in the board dts. The zephyr,code-partition = &boot_partition; is given by the app.overlay Signed-off-by: Francois Ramu <[email protected]>
1 parent c4129d0 commit 3abbb45

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_BOOT_DIRECT_XIP=y
2+
CONFIG_STM32_MEMMAP=y
3+
CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n
4+
CONFIG_BOOT_MAX_IMG_SECTORS=1024
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/*
8+
* Define the device, controller and partition to be the external memory
9+
* for running the application in external NOR from MCUboot
10+
*/
11+
12+
/delete-node/ &slot0_partition;
13+
/delete-node/ &slot1_partition;
14+
/delete-node/ &scratch_partition;
15+
/delete-node/ &storage_partition;
16+
17+
&mx25lm51245 {
18+
partitions {
19+
compatible = "fixed-partitions";
20+
#address-cells = <1>;
21+
#size-cells = <1>;
22+
23+
slot0_partition: partition@0 {
24+
label = "image-0";
25+
reg = <0x00000000 DT_SIZE_K(416)>;
26+
};
27+
slot1_partition: partition@68000 {
28+
label = "image-1";
29+
reg = <0x00068000 DT_SIZE_K(416)>;
30+
};
31+
scratch_partition: partition@d0000 {
32+
label = "image-scratch";
33+
reg = <0x000d00000 DT_SIZE_K(64)>;
34+
};
35+
storage_partition: partition@e0000 {
36+
label = "storage";
37+
reg = <0x000e0000 DT_SIZE_K(64)>;
38+
}; };
39+
};
40+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_BOOT_DIRECT_XIP=y
2+
CONFIG_STM32_MEMMAP=y
3+
CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n
4+
CONFIG_BOOT_MAX_IMG_SECTORS=256

0 commit comments

Comments
 (0)