diff --git a/boards/st/nucleo_c071rb/nucleo_c071rb.dts b/boards/st/nucleo_c071rb/nucleo_c071rb.dts index c6faae2b770dd..e0ed458bc7e96 100644 --- a/boards/st/nucleo_c071rb/nucleo_c071rb.dts +++ b/boards/st/nucleo_c071rb/nucleo_c071rb.dts @@ -19,6 +19,7 @@ zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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)>; + }; + }; +}; diff --git a/boards/st/nucleo_f091rc/nucleo_f091rc.dts b/boards/st/nucleo_f091rc/nucleo_f091rc.dts index 7f9d4b14aea23..2ffced2d07534 100644 --- a/boards/st/nucleo_f091rc/nucleo_f091rc.dts +++ b/boards/st/nucleo_f091rc/nucleo_f091rc.dts @@ -21,6 +21,7 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,canbus = &can1; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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)>; }; }; }; diff --git a/boards/st/nucleo_f103rb/nucleo_f103rb.dts b/boards/st/nucleo_f103rb/nucleo_f103rb.dts index 05d60751160ff..b8bfe1fb5db70 100644 --- a/boards/st/nucleo_f103rb/nucleo_f103rb.dts +++ b/boards/st/nucleo_f103rb/nucleo_f103rb.dts @@ -20,6 +20,7 @@ zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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"; diff --git a/boards/st/nucleo_f207zg/nucleo_f207zg.dts b/boards/st/nucleo_f207zg/nucleo_f207zg.dts index 7517d9b9f13cb..86e21bf29a7d0 100644 --- a/boards/st/nucleo_f207zg/nucleo_f207zg.dts +++ b/boards/st/nucleo_f207zg/nucleo_f207zg.dts @@ -19,6 +19,7 @@ zephyr,shell-uart = &usart3; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { diff --git a/boards/st/nucleo_f746zg/nucleo_f746zg.dts b/boards/st/nucleo_f746zg/nucleo_f746zg.dts index 2b224ddce5fa9..b46062046bd09 100644 --- a/boards/st/nucleo_f746zg/nucleo_f746zg.dts +++ b/boards/st/nucleo_f746zg/nucleo_f746zg.dts @@ -28,6 +28,7 @@ zephyr,flash = &flash0; zephyr,dtcm = &dtcm; zephyr,canbus = &can1; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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)>; + }; + }; +}; diff --git a/boards/st/nucleo_g071rb/nucleo_g071rb.dts b/boards/st/nucleo_g071rb/nucleo_g071rb.dts index d30c3bca47412..a5e79ea05e0d2 100644 --- a/boards/st/nucleo_g071rb/nucleo_g071rb.dts +++ b/boards/st/nucleo_g071rb/nucleo_g071rb.dts @@ -21,6 +21,7 @@ zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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"; diff --git a/boards/st/nucleo_g474re/nucleo_g474re.dts b/boards/st/nucleo_g474re/nucleo_g474re.dts index 50de66627dd9f..1038b0c4397b4 100644 --- a/boards/st/nucleo_g474re/nucleo_g474re.dts +++ b/boards/st/nucleo_g474re/nucleo_g474re.dts @@ -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 */ diff --git a/boards/st/nucleo_h743zi/nucleo_h743zi.dts b/boards/st/nucleo_h743zi/nucleo_h743zi.dts index 676b6621d5522..c44f22fb597ea 100644 --- a/boards/st/nucleo_h743zi/nucleo_h743zi.dts +++ b/boards/st/nucleo_h743zi/nucleo_h743zi.dts @@ -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)>; }; }; }; diff --git a/boards/st/nucleo_l073rz/nucleo_l073rz.dts b/boards/st/nucleo_l073rz/nucleo_l073rz.dts index 4824cadd10356..8fe756e0ddc29 100644 --- a/boards/st/nucleo_l073rz/nucleo_l073rz.dts +++ b/boards/st/nucleo_l073rz/nucleo_l073rz.dts @@ -21,6 +21,7 @@ zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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)>; + }; + }; +}; diff --git a/boards/st/nucleo_l152re/nucleo_l152re.dts b/boards/st/nucleo_l152re/nucleo_l152re.dts index 22bc176455e04..f05069daed0a0 100644 --- a/boards/st/nucleo_l152re/nucleo_l152re.dts +++ b/boards/st/nucleo_l152re/nucleo_l152re.dts @@ -20,6 +20,7 @@ zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -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"; diff --git a/boards/st/nucleo_wb55rg/nucleo_wb55rg.dts b/boards/st/nucleo_wb55rg/nucleo_wb55rg.dts index 3303a9e12026e..07c6cd0bcdab7 100644 --- a/boards/st/nucleo_wb55rg/nucleo_wb55rg.dts +++ b/boards/st/nucleo_wb55rg/nucleo_wb55rg.dts @@ -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)>; }; }; }; diff --git a/boards/st/nucleo_wl55jc/nucleo_wl55jc.dts b/boards/st/nucleo_wl55jc/nucleo_wl55jc.dts index 65fc345586cbd..5ae52f2dfcf0d 100644 --- a/boards/st/nucleo_wl55jc/nucleo_wl55jc.dts +++ b/boards/st/nucleo_wl55jc/nucleo_wl55jc.dts @@ -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)>; }; /* diff --git a/boards/st/stm32f3_disco/stm32f3_disco.dts b/boards/st/stm32f3_disco/stm32f3_disco.dts index bab23bfbc50de..f97aed8245faa 100644 --- a/boards/st/stm32f3_disco/stm32f3_disco.dts +++ b/boards/st/stm32f3_disco/stm32f3_disco.dts @@ -19,6 +19,7 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,canbus = &can1; + zephyr,code-partition = &slot0_partition; }; leds { @@ -202,6 +203,21 @@ zephyr_udc0: &usb { #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(96)>; + }; + + slot1_partition: partition@28000 { + label = "image-1"; + reg = <0x00028000 DT_SIZE_K(90)>; + }; + /* Set 6Kb of storage at the end of the 256Kb of flash */ storage_partition: partition@3e800 { label = "storage"; diff --git a/boards/st/stm32u083c_dk/stm32u083c_dk.dts b/boards/st/stm32u083c_dk/stm32u083c_dk.dts index f79dd23f739af..98093aa38e059 100644 --- a/boards/st/stm32u083c_dk/stm32u083c_dk.dts +++ b/boards/st/stm32u083c_dk/stm32u083c_dk.dts @@ -23,6 +23,7 @@ zephyr,shell-uart = &usart2; zephyr,sram = &sram0; zephyr,flash = &flash0; + zephyr,code-partition = &slot0_partition; }; leds: leds { @@ -175,3 +176,32 @@ stm32_lp_tick_source: &lptim2 { }; }; }; + +&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(94)>; + }; + + slot1_partition: partition@27800 { + label = "image-1"; + reg = <0x00027800 DT_SIZE_K(94)>; + }; + + /* Set 4KB of storage at the end of 256KB flash */ + storage_partition: partition@3f000 { + label = "storage"; + reg = <0x0003f000 DT_SIZE_K(4)>; + }; + }; +}; diff --git a/samples/sysbuild/with_mcuboot/sample.yaml b/samples/sysbuild/with_mcuboot/sample.yaml index bdd79980ed298..f27161f94ca23 100644 --- a/samples/sysbuild/with_mcuboot/sample.yaml +++ b/samples/sysbuild/with_mcuboot/sample.yaml @@ -14,10 +14,27 @@ tests: - esp32s3_devkitm/esp32s3/procpu - esp32c3_devkitm - esp32c6_devkitc/esp32c6/hpcore + - disco_l475_iot1 + - nucleo_c071rb + - nucleo_f091rc + - nucleo_f103rb + - nucleo_f207zg + - nucleo_f429zi + - nucleo_f746zg + - nucleo_g071rb + - nucleo_g474re + - nucleo_h743zi - nucleo_h7s3l8 + - nucleo_l073rz + - nucleo_l152re + - nucleo_u083rc - nucleo_u385rg_q - - stm32h7s78_dk + - nucleo_wb55rg + - nucleo_wba55cg + - nucleo_wl55jc + - stm32f3_disco@B - stm32h573i_dk + - stm32h7s78_dk integration_platforms: - nrf52840dk/nrf52840 - esp32_devkitc/esp32/procpu diff --git a/tests/boot/test_mcuboot/testcase.yaml b/tests/boot/test_mcuboot/testcase.yaml index 2af749005db14..4addeb5f77acd 100644 --- a/tests/boot/test_mcuboot/testcase.yaml +++ b/tests/boot/test_mcuboot/testcase.yaml @@ -48,6 +48,12 @@ tests: - vmu_rt1170/mimxrt1176/cm7 - nrf52840dk/nrf52840 - rd_rw612_bga + - nucleo_c071rb + - nucleo_g474re + - nucleo_u385rg_q + - nucleo_wba55cg + - nucleo_wl55jc + - stm32u083c_dk - esp32_devkitc/esp32/procpu - esp32s2_saola - esp32s3_devkitm/esp32s3/procpu diff --git a/tests/boot/with_mcumgr/testcase.yaml b/tests/boot/with_mcumgr/testcase.yaml index afaca20f90bdb..4727658d4112b 100644 --- a/tests/boot/with_mcumgr/testcase.yaml +++ b/tests/boot/with_mcumgr/testcase.yaml @@ -4,7 +4,10 @@ common: - nrf5340dk/nrf5340/cpuapp - nrf54l15dk/nrf54l15/cpuapp - nrf9160dk/nrf9160 - - nucleo_wba55cg + - nucleo_f091rc + - nucleo_g474re + - nucleo_u385rg_q + - nucleo_wl55jc timeout: 600 slow: true tags: @@ -15,6 +18,7 @@ tests: boot.with_mcumgr.test_upgrade: platform_allow: - nrf52840dk/nrf52840 + - nucleo_wba55cg integration_platforms: - nrf52840dk/nrf52840 harness: pytest @@ -28,6 +32,10 @@ tests: platform_exclude: - nrf9160dk/nrf9160 - nucleo_wba55cg + - nucleo_f091rc + - nucleo_g474re + - nucleo_u385rg_q + - nucleo_wl55jc integration_platforms: - nrf52840dk/nrf52840 extra_args: EXTRA_CONF_FILE="overlay-bt.conf" @@ -40,6 +48,7 @@ tests: boot.with_mcumgr.test_downgrade_prevention: platform_allow: - nrf52840dk/nrf52840 + - stm32u083c_dk integration_platforms: - nrf52840dk/nrf52840 harness: pytest diff --git a/tests/drivers/flash/stm32/boards/nucleo_f746zg.overlay b/tests/drivers/flash/stm32/boards/nucleo_f746zg.overlay index ad661beb63b67..c2a3cb7c4f447 100644 --- a/tests/drivers/flash/stm32/boards/nucleo_f746zg.overlay +++ b/tests/drivers/flash/stm32/boards/nucleo_f746zg.overlay @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +/delete-node/ &storage_partition; &flash0 { partitions { compatible = "fixed-partitions";