diff --git a/boards/st/b_l4s5i_iot01a/b_l4s5i_iot01a.dts b/boards/st/b_l4s5i_iot01a/b_l4s5i_iot01a.dts index d41c75c44bf0d..064d61fb69108 100644 --- a/boards/st/b_l4s5i_iot01a/b_l4s5i_iot01a.dts +++ b/boards/st/b_l4s5i_iot01a/b_l4s5i_iot01a.dts @@ -181,31 +181,23 @@ boot_partition: partition@0 { label = "mcuboot"; - reg = <0x00000000 DT_SIZE_K(64)>; + reg = <0x0 DT_SIZE_K(64)>; read-only; }; - /* - * The flash starting at offset 0x10000 and ending at - * offset 0x1ffff is reserved for use by the application. - */ - - slot0_partition: partition@20000 { + slot0_partition: partition@1000 { label = "image-0"; - reg = <0x00020000 DT_SIZE_K(432)>; + reg = <0x1000 DT_SIZE_K(976)>; }; - slot1_partition: partition@8c000 { + + slot1_partition: partition@104000 { label = "image-1"; - reg = <0x0008C000 DT_SIZE_K(432)>; - }; - scratch_partition: partition@f8000 { - label = "image-scratch"; - reg = <0x000F8000 DT_SIZE_K(16)>; + reg = <0x104000 DT_SIZE_K(976)>; }; - storage_partition: partition@fc000 { + storage_partition: partition@1f8000 { label = "storage"; - reg = <0x000fc000 DT_SIZE_K(16)>; + reg = <0x1f8000 DT_SIZE_K(32)>; }; }; }; diff --git a/boards/st/disco_l475_iot1/disco_l475_iot1.dts b/boards/st/disco_l475_iot1/disco_l475_iot1.dts index fbea236337d4e..33e6d973cf89c 100644 --- a/boards/st/disco_l475_iot1/disco_l475_iot1.dts +++ b/boards/st/disco_l475_iot1/disco_l475_iot1.dts @@ -224,23 +224,18 @@ boot_partition: partition@0 { label = "mcuboot"; - reg = <0x00000000 DT_SIZE_K(64)>; + reg = <0x0 DT_SIZE_K(64)>; read-only; }; - /* - * The flash starting at offset 0x10000 and ending at - * offset 0x1ffff is reserved for use by the application. - */ - - slot0_partition: partition@20000 { + slot0_partition: partition@1000 { label = "image-0"; - reg = <0x00020000 DT_SIZE_K(864)>; + reg = <0x1000 DT_SIZE_K(928)>; }; - scratch_partition: partition@f8000 { - label = "image-scratch"; - reg = <0x000F8000 DT_SIZE_K(16)>; + storage_partition: partition@f8000 { + label = "storage"; + reg = <0xf8000 DT_SIZE_K(32)>; }; }; }; @@ -343,8 +338,8 @@ zephyr_udc0: &usbotg_fs { reg = <0x00000000 DT_SIZE_K(864)>; }; - storage_partition: partition@d8000 { - label = "storage"; + slot2_partition: partition@d8000 { + label = "image-3"; reg = <0x000d8000 DT_SIZE_M(7)>; }; }; diff --git a/boards/st/nucleo_f207zg/nucleo_f207zg.dts b/boards/st/nucleo_f207zg/nucleo_f207zg.dts index 0c8d36af39bd9..4f3e8cafde3aa 100644 --- a/boards/st/nucleo_f207zg/nucleo_f207zg.dts +++ b/boards/st/nucleo_f207zg/nucleo_f207zg.dts @@ -197,12 +197,32 @@ zephyr_udc0: &usbotg_fs { #address-cells = <1>; #size-cells = <1>; - /* Last sector of size 128KB at the end of 1MB flash is set - * for storage. + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x0 DT_SIZE_K(32)>; + read-only; + }; + + /* + * nvs subsystem requires 2 sectors with a max total of 32K + * On F2 series, the only option is to use the following + * partition, which is compatible with mcuboot usage. + * Keep it commented in order it is not used by CI. + * + * storage_partition: partition@8000 { + * label = "storage"; + * reg = <0x8000 DT_SIZE_K(32)>; + * }; */ - storage_partition: partition@e0000 { - label = "storage"; - reg = <0x000e0000 DT_SIZE_K(128)>; + + slot0_partition: partition@20000 { + label = "image-0"; + reg = <0x20000 DT_SIZE_K(448)>; + }; + + slot1_partition: partition@90000 { + label = "image-1"; + reg = <0x90000 DT_SIZE_K(448)>; }; }; }; diff --git a/boards/st/nucleo_f429zi/nucleo_f429zi.dts b/boards/st/nucleo_f429zi/nucleo_f429zi.dts index 2e37e448655ac..29a36b1155573 100644 --- a/boards/st/nucleo_f429zi/nucleo_f429zi.dts +++ b/boards/st/nucleo_f429zi/nucleo_f429zi.dts @@ -194,18 +194,24 @@ zephyr_udc0: &usbotg_fs { #address-cells = <1>; #size-cells = <1>; - /* 64KB for bootloader */ + /* 32KB for bootloader */ boot_partition: partition@0 { label = "mcuboot"; - reg = <0x00000000 DT_SIZE_K(64)>; + reg = <0x00000000 DT_SIZE_K(32)>; read-only; }; - /* storage: 64KB for settings */ - storage_partition: partition@10000 { - label = "storage"; - reg = <0x00010000 DT_SIZE_K(64)>; - }; + /* + * nvs subsystem requires 2 sectors with a max total of 32K + * On F4 series, the only option is to use the following + * partition, which is compatible with mcuboot usage. + * Keep it commented in order it is not used by CI. + * + * storage_partition: partition@8000 { + * label = "storage"; + * reg = <0x0008000 DT_SIZE_K(32)>; + * }; + */ /* application image slot: 256KB */ slot0_partition: partition@20000 { diff --git a/boards/st/nucleo_f429zi/nucleo_f429zi.yaml b/boards/st/nucleo_f429zi/nucleo_f429zi.yaml index 8674acc45c831..bec17951950bc 100644 --- a/boards/st/nucleo_f429zi/nucleo_f429zi.yaml +++ b/boards/st/nucleo_f429zi/nucleo_f429zi.yaml @@ -23,7 +23,6 @@ supported: - adc - dac - dma - - nvs - rtc - usbd vendor: st diff --git a/boards/st/nucleo_g070rb/nucleo_g070rb.dts b/boards/st/nucleo_g070rb/nucleo_g070rb.dts index 7e976c930594b..d0491570d1dee 100644 --- a/boards/st/nucleo_g070rb/nucleo_g070rb.dts +++ b/boards/st/nucleo_g070rb/nucleo_g070rb.dts @@ -155,10 +155,10 @@ #address-cells = <1>; #size-cells = <1>; - /* Set 2KB of storage at the end of 128KB flash */ - storage_partition: partition@1f800 { + /* Set 4KB of storage at the end of 128KB flash */ + storage_partition: partition@1f000 { label = "storage"; - reg = <0x0001f800 DT_SIZE_K(2)>; + reg = <0x0001f000 DT_SIZE_K(4)>; }; }; }; diff --git a/boards/st/nucleo_g071rb/nucleo_g071rb.dts b/boards/st/nucleo_g071rb/nucleo_g071rb.dts index 6bfd17bd89398..553feebd2e959 100644 --- a/boards/st/nucleo_g071rb/nucleo_g071rb.dts +++ b/boards/st/nucleo_g071rb/nucleo_g071rb.dts @@ -169,10 +169,10 @@ #address-cells = <1>; #size-cells = <1>; - /* Set 2KB of storage at the end of 128KB flash */ - storage_partition: partition@1f800 { + /* Set 4KB of storage at the end of 128KB flash */ + storage_partition: partition@1f000 { label = "storage"; - reg = <0x0001f800 DT_SIZE_K(2)>; + reg = <0x0001f000 DT_SIZE_K(4)>; }; }; }; diff --git a/boards/st/nucleo_l152re/nucleo_l152re.dts b/boards/st/nucleo_l152re/nucleo_l152re.dts index fc308f5988fe3..afcccc8dd01db 100644 --- a/boards/st/nucleo_l152re/nucleo_l152re.dts +++ b/boards/st/nucleo_l152re/nucleo_l152re.dts @@ -145,10 +145,10 @@ #address-cells = <1>; #size-cells = <1>; - /* Set 2KB of storage at the end of 512KB flash */ - storage_partition: partition@7f800 { + /* Set 8KB of storage at the end of 512KB flash */ + storage_partition: partition@7e000 { label = "storage"; - reg = <0x0007f800 DT_SIZE_K(2)>; + reg = <0x0007e000 DT_SIZE_K(8)>; }; }; }; diff --git a/samples/subsys/nvs/boards/disco_l475_iot1.overlay b/samples/subsys/nvs/boards/disco_l475_iot1.overlay index 2c304977ce529..786a8ff489a10 100644 --- a/samples/subsys/nvs/boards/disco_l475_iot1.overlay +++ b/samples/subsys/nvs/boards/disco_l475_iot1.overlay @@ -5,7 +5,6 @@ */ -/delete-node/ &scratch_partition; /delete-node/ &storage_partition; / { diff --git a/samples/subsys/nvs/boards/nucleo_f429zi.overlay b/samples/subsys/nvs/boards/nucleo_f429zi.overlay index bf5a3ad768b88..43960ce3df6d5 100644 --- a/samples/subsys/nvs/boards/nucleo_f429zi.overlay +++ b/samples/subsys/nvs/boards/nucleo_f429zi.overlay @@ -4,8 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/delete-node/ &storage_partition; - &flash0 { partitions { /* Set 48KB of storage at the beginning of bank2 in order to have 3 sectors smaller than 32K diff --git a/tests/drivers/flash/common/src/main.c b/tests/drivers/flash/common/src/main.c index f7f7c6ee64ee7..a30f533f655d8 100644 --- a/tests/drivers/flash/common/src/main.c +++ b/tests/drivers/flash/common/src/main.c @@ -397,8 +397,10 @@ static void test_flash_copy_inner(const struct device *src_dev, off_t src_offset if ((expected_result == 0) && (size != 0) && (src_offset != dst_offset)) { /* verify a successful copy */ - zassert_ok(flash_read(flash_dev, TEST_AREA_OFFSET, expected, EXPECTED_SIZE)); - for (int i = 0; i < EXPECTED_SIZE; i++) { + off_t copy_size = MIN(size, EXPECTED_SIZE); + + zassert_ok(flash_read(flash_dev, TEST_AREA_OFFSET, expected, copy_size)); + for (int i = 0; i < copy_size; i++) { zassert_equal(buf[i], 0xaa, "incorrect data (%02x) at %d", buf[i], i); } } diff --git a/tests/drivers/flash/common/testcase.yaml b/tests/drivers/flash/common/testcase.yaml index 4c53bbba0840c..5b053e27321cd 100644 --- a/tests/drivers/flash/common/testcase.yaml +++ b/tests/drivers/flash/common/testcase.yaml @@ -46,28 +46,6 @@ tests: and dt_label_with_parent_compat_enabled("storage_partition", "fixed-partitions")) integration_platforms: - nrf9161dk/nrf9161/ns - drivers.flash.common.stm32: - platform_allow: - - nucleo_f103rb - - nucleo_f207zg - - stm32f3_disco - - nucleo_f429zi - - stm32f746g_disco - - nucleo_f767zi - - nucleo_g0b1re - - nucleo_g474re - - nucleo_h743zi - - nucleo_l152re - - disco_l475_iot1 - - nucleo_wb55rg - - nucleo_wl55jc - - stm32l562e_dk - - stm32l562e_dk/stm32l562xx/ns - integration_platforms: - - nucleo_f103rb - filter: (dt_compat_enabled("st,stm32-flash-controller") or - dt_compat_enabled("st,stm32h7-flash-controller")) and - dt_label_with_parent_compat_enabled("storage_partition", "fixed-partitions") drivers.flash.common.mx25r_high_perf: platform_allow: nrf52840dk/nrf52840 extra_args: diff --git a/tests/subsys/secure_storage/psa/its/testcase.yaml b/tests/subsys/secure_storage/psa/its/testcase.yaml index 0261c7961a370..c59c58532b493 100644 --- a/tests/subsys/secure_storage/psa/its/testcase.yaml +++ b/tests/subsys/secure_storage/psa/its/testcase.yaml @@ -3,7 +3,7 @@ common: - native_sim platform_exclude: - qemu_cortex_m0 # settings subsystem initialization fails - timeout: 120 + timeout: 600 tags: - psa.secure_storage tests: