Skip to content

stm32: mcuboot: add support for mcuboot tests and samples #93862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions boards/st/nucleo_c071rb/nucleo_c071rb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -178,3 +179,32 @@ zephyr_udc0: &usb {
pinctrl-names = "default";
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(30)>;
};

slot1_partition: partition@17800 {
label = "image-1";
reg = <0x00017800 DT_SIZE_K(30)>;
};

/* Set 4KB of storage at the end of 128KB flash */
storage_partition: partition@1f000 {
label = "storage";
reg = <0x0001f000 DT_SIZE_K(4)>;
};
};
};
22 changes: 19 additions & 3 deletions boards/st/nucleo_f091rc/nucleo_f091rc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,canbus = &can1;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -149,10 +150,25 @@
#address-cells = <1>;
#size-cells = <1>;

/* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3e800 {
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(94)>;
};

slot1_partition: partition@27800 {
label = "image-1";
reg = <0x00027800 DT_SIZE_K(94)>;
};

/* Set 4Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3f000 {
label = "storage";
reg = <0x0003e800 DT_SIZE_K(6)>;
reg = <0x0003f000 DT_SIZE_K(4)>;
};
};
};
Expand Down
16 changes: 16 additions & 0 deletions boards/st/nucleo_f103rb/nucleo_f103rb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -167,6 +168,21 @@
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(32)>;
};

slot1_partition: partition@18000 {
label = "image-1";
reg = <0x00018000 DT_SIZE_K(30)>;
};

/* Set 2KB of storage at the end of 128KB flash */
storage_partition: partition@1f800 {
label = "storage";
Expand Down
1 change: 1 addition & 0 deletions boards/st/nucleo_f207zg/nucleo_f207zg.dts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
zephyr,shell-uart = &usart3;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down
29 changes: 29 additions & 0 deletions boards/st/nucleo_f746zg/nucleo_f746zg.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
zephyr,flash = &flash0;
zephyr,dtcm = &dtcm;
zephyr,canbus = &can1;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -235,3 +236,31 @@ zephyr_udc0: &usbotg_fs {
&vbat {
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

storage_partition: partition@10000 {
label = "storage";
reg = <0x00010000 DT_SIZE_K(192)>;
};

slot0_partition: partition@40000 {
label = "image-0";
reg = <0x00040000 DT_SIZE_K(448)>;
};

slot1_partition: partition@b0000 {
label = "image-1";
reg = <0x000b0000 DT_SIZE_K(320)>;
};
};
};
16 changes: 16 additions & 0 deletions boards/st/nucleo_g071rb/nucleo_g071rb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -171,6 +172,21 @@
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(30)>;
};

slot1_partition: partition@17800 {
label = "image-1";
reg = <0x00017800 DT_SIZE_K(30)>;
};

/* Set 4KB of storage at the end of 128KB flash */
storage_partition: partition@1f000 {
label = "storage";
Expand Down
10 changes: 5 additions & 5 deletions boards/st/nucleo_g474re/nucleo_g474re.dts
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ stm32_lp_tick_source: &lptim1 {

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(34)>;
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@8800 {
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00008800 DT_SIZE_K(240)>;
reg = <0x000010000 DT_SIZE_K(192)>;
};

slot1_partition: partition@44800 {
slot1_partition: partition@40000 {
label = "image-1";
reg = <0x00044800 DT_SIZE_K(234)>;
reg = <0x00040000 DT_SIZE_K(192)>;
};

/* Set 4Kb of storage at the end of the 512Kb of flash */
Expand Down
21 changes: 6 additions & 15 deletions boards/st/nucleo_h743zi/nucleo_h743zi.dts
Original file line number Diff line number Diff line change
Expand Up @@ -252,28 +252,19 @@ zephyr_udc0: &usbotg_fs {
read-only;
};

/* storage: 128KB for settings */
storage_partition: partition@20000 {
label = "storage";
reg = <0x00020000 DT_SIZE_K(128)>;
};

/* application image slot: 256KB */
slot0_partition: partition@40000 {
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x00040000 DT_SIZE_K(256)>;
reg = <0x00020000 DT_SIZE_K(384)>;
};

/* backup slot: 256KB */
slot1_partition: partition@80000 {
label = "image-1";
reg = <0x00080000 DT_SIZE_K(256)>;
reg = <0x00080000 DT_SIZE_K(384)>;
};

/* swap slot: 128KB */
scratch_partition: partition@c0000 {
label = "image-scratch";
reg = <0x000c0000 DT_SIZE_K(128)>;
storage_partition: partition@e0000 {
label = "storage";
reg = <0x000e0000 DT_SIZE_K(128)>;
};
};
};
Expand Down
30 changes: 30 additions & 0 deletions boards/st/nucleo_l073rz/nucleo_l073rz.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -185,3 +186,32 @@ stm32_lp_tick_source: &lptim1 {
&vref {
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(64)>;
};

slot1_partition: partition@20000 {
label = "image-1";
reg = <0x00020000 DT_SIZE_K(62)>;
};

/* Set 2KB of storage at the end of 128KB flash */
storage_partition: partition@2f800 {
label = "storage";
reg = <0x0001f800 DT_SIZE_K(2)>;
};
};
};
16 changes: 16 additions & 0 deletions boards/st/nucleo_l152re/nucleo_l152re.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,shell-uart = &usart2;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};

leds: leds {
Expand Down Expand Up @@ -147,6 +148,21 @@
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(220)>;
};

slot1_partition: partition@47000 {
label = "image-1";
reg = <0x00047000 DT_SIZE_K(220)>;
};

/* Set 8KB of storage at the end of 512KB flash */
storage_partition: partition@7e000 {
label = "storage";
Expand Down
19 changes: 7 additions & 12 deletions boards/st/nucleo_wb55rg/nucleo_wb55rg.dts
Original file line number Diff line number Diff line change
Expand Up @@ -232,27 +232,22 @@ zephyr_udc0: &usb {

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(48)>;
reg = <0x00000000 DT_SIZE_K(64)>;
};

slot0_partition: partition@c000 {
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x0000c000 DT_SIZE_K(400)>;
reg = <0x00010000 DT_SIZE_K(484)>;
};

slot1_partition: partition@70000 {
slot1_partition: partition@89000{
label = "image-1";
reg = <0x00070000 DT_SIZE_K(400)>;
reg = <0x00089000 DT_SIZE_K(476)>;
};

scratch_partition: partition@d4000 {
label = "image-scratch";
reg = <0x000d4000 DT_SIZE_K(16)>;
};

storage_partition: partition@d8000 {
storage_partition: partition@100000 {
label = "storage";
reg = <0x000d8000 DT_SIZE_K(8)>;
reg = <0x00100000 DT_SIZE_K(4)>;
};
};
};
Expand Down
10 changes: 5 additions & 5 deletions boards/st/nucleo_wl55jc/nucleo_wl55jc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,18 @@ stm32_lp_tick_source: &lptim1 {

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(32)>;
reg = <0x00000000 DT_SIZE_K(40)>;
read-only;
};

slot0_partition: partition@8000 {
slot0_partition: partition@a000 {
label = "image-0";
reg = <0x00008000 DT_SIZE_K(104)>;
reg = <0x0000a000 DT_SIZE_K(100)>;
};

slot1_partition: partition@22000 {
slot1_partition: partition@23000 {
label = "image-1";
reg = <0x00022000 DT_SIZE_K(104)>;
reg = <0x00023000 DT_SIZE_K(100)>;
};

/*
Expand Down
Loading
Loading