diff --git a/.github/workflows/build_samples.yml b/.github/workflows/build_samples.yml index fb24d0332c..410d1b6af7 100644 --- a/.github/workflows/build_samples.yml +++ b/.github/workflows/build_samples.yml @@ -16,7 +16,7 @@ jobs: - runs-on=${{ github.run_id }} - runner=64cpu-linux-x64 # Keep aligned with target NCS version - container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.2.0 + container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.4.0-rc1 defaults: run: # Bash shell is needed to set toolchain related environment variables in docker container diff --git a/.github/workflows/twister.yml b/.github/workflows/twister.yml index 650b466585..78be898851 100644 --- a/.github/workflows/twister.yml +++ b/.github/workflows/twister.yml @@ -13,7 +13,7 @@ jobs: - runs-on=${{ github.run_id }} - runner=64cpu-linux-x64 # Keep aligned with target NCS version - container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.3.0 + container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.4.0-rc1 defaults: run: # Bash shell is needed to set toolchain related environment variables in docker container diff --git a/applications/firmware_loader/ble_mcumgr/prj.conf b/applications/firmware_loader/ble_mcumgr/prj.conf index 54de856684..b043256294 100644 --- a/applications/firmware_loader/ble_mcumgr/prj.conf +++ b/applications/firmware_loader/ble_mcumgr/prj.conf @@ -39,7 +39,7 @@ CONFIG_MCUMGR_GRP_OS_ECHO=y CONFIG_MCUMGR_GRP_OS_MCUMGR_PARAMS=y CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO=y CONFIG_NRF_SDH_BLE=y -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y CONFIG_BLE_MCUMGR=y diff --git a/applications/installer/src/main.c b/applications/installer/src/main.c index 4ba038f990..d74953c77a 100644 --- a/applications/installer/src/main.c +++ b/applications/installer/src/main.c @@ -30,6 +30,8 @@ LOG_MODULE_REGISTER(installer, CONFIG_INSTALLER_LOG_LEVEL); #define EXPECTED_HEADER { 0x92, 0x11, 0xf2, 0xe9 } #define PROCESS_SECTOR_SIZE 4096 +#define LOAD_OFFSET (PARTITION_ADDRESS(slot0_partition)) + extern uintptr_t _flash_used; static const uint8_t expected_header[] = EXPECTED_HEADER; @@ -63,7 +65,7 @@ int main(void) struct bm_installs replacement_metadata; struct flash_area fa_installer = { .fa_id = 1, - .fa_off = CONFIG_FLASH_LOAD_OFFSET, + .fa_off = LOAD_OFFSET, .fa_size = PROCESS_SECTOR_SIZE, .fa_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)), }; @@ -74,7 +76,7 @@ int main(void) static uint8_t write_buffer[CONFIG_ROM_START_OFFSET] = { 0x00 }; #endif - update_data = (struct bm_installs_update *)((int)&_flash_used + CONFIG_FLASH_LOAD_OFFSET); + update_data = (struct bm_installs_update *)((int)&_flash_used + LOAD_OFFSET); if (update_data == NULL) { LOG_ERR("Installer data is NULL"); diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts index eb8c578e7f..07d70655be 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(390)>; }; storage_partition: partition@61800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00061800 DT_SIZE_K(8)>; ranges = <0x0 0x61800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@63800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00063800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts index 1964588e9b..c9a06a61b0 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(292)>; }; slot1_partition: partition@53000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x00053000 DT_SIZE_K(64)>; }; softdevice_partition: partition@63000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00063000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@7ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts index 7f8e926d1d..7744da3baa 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(354)>; }; storage_partition: partition@58800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00058800 DT_SIZE_K(8)>; ranges = <0x0 0x58800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@5a800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005a800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts index 6e3272bb2a..bd2cacbc56 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(256)>; }; slot1_partition: partition@4a000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0004a000 DT_SIZE_K(64)>; }; softdevice_partition: partition@5a000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005a000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@7ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts index a842c0d585..48629d4e20 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(902)>; }; storage_partition: partition@e1800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x000e1800 DT_SIZE_K(8)>; ranges = <0x0 0xe1800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@e3800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts index f0faf33786..ce931ae861 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(804)>; }; slot1_partition: partition@d3000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000d3000 DT_SIZE_K(64)>; }; softdevice_partition: partition@e3000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts index ff504d7610..2612944690 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(866)>; }; storage_partition: partition@d8800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x000d8800 DT_SIZE_K(8)>; ranges = <0x0 0xd8800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@da800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000da800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts index 88159c5b7b..9839fe8b48 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(768)>; }; slot1_partition: partition@ca000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000ca000 DT_SIZE_K(64)>; }; softdevice_partition: partition@da000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000da000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts index 08bd89e82b..4002ec926b 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice.dts @@ -21,9 +21,9 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { label = "slot0"; @@ -31,7 +31,7 @@ }; storage_partition: partition@161800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00161800 DT_SIZE_K(8)>; ranges = <0x0 0x161800 DT_SIZE_K(8)>; @@ -39,17 +39,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@163800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00163800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts index 6c0de44fdf..07083f0270 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1316)>; }; slot1_partition: partition@153000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x00153000 DT_SIZE_K(64)>; }; softdevice_partition: partition@163000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00163000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@17ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0017ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts index 9e3cffe053..2153f6f119 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(1378)>; }; storage_partition: partition@158800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00158800 DT_SIZE_K(8)>; ranges = <0x0 0x158800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@15a800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0015a800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts index ca4de682f1..ac14db4049 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1280)>; }; slot1_partition: partition@14a000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0014a000 DT_SIZE_K(64)>; }; softdevice_partition: partition@15a000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0015a000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@17ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0017ce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54l15dk/sysbuild.cmake b/boards/nordic/bm_nrf54l15dk/sysbuild.cmake index b308610b59..1359ae9150 100644 --- a/boards/nordic/bm_nrf54l15dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54l15dk/sysbuild.cmake @@ -1,10 +1,9 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() set(board_qualifer_list) set(board_qualifer_list_len) - diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts index 0dcbdd5b04..0740aa244f 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(1926)>; }; storage_partition: partition@1e1800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x001e1800 DT_SIZE_K(8)>; ranges = <0x0 0x1e1800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@1e3800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001e3800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts index cf587e7978..1006ae525a 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s115_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1828)>; }; slot1_partition: partition@1d3000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x001d3000 DT_SIZE_K(64)>; }; softdevice_partition: partition@1e3000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001e3000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@1fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x001fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts index 682e8c5cf6..d08c8a07fe 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(1890)>; }; storage_partition: partition@1d8800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x001d8800 DT_SIZE_K(8)>; ranges = <0x0 0x1d8800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@1da800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001da800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts index b8edfb8642..56b4b41202 100644 --- a/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lm20dk/bm_nrf54lm20dk_nrf54lm20a_cpuapp_s145_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1792)>; }; slot1_partition: partition@1ca000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x001ca000 DT_SIZE_K(64)>; }; softdevice_partition: partition@1da000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x001da000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@1fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x001fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake b/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake index e718c4eaab..1359ae9150 100644 --- a/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54lm20dk/sysbuild.cmake @@ -1,7 +1,7 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts index 27059b12d7..d171408fcc 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(398)>; }; storage_partition: partition@63800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00063800 DT_SIZE_K(8)>; ranges = <0x0 0x63800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@65800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00065800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts index c262b9d708..3cf46abe8b 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s115_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(300)>; }; slot1_partition: partition@55000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x00055000 DT_SIZE_K(64)>; }; softdevice_partition: partition@65000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x00065000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@7ee00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ee00 0x200>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts index 7a0077bb46..37764ae39e 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(362)>; }; storage_partition: partition@5a800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x0005a800 DT_SIZE_K(8)>; ranges = <0x0 0x5a800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@5c800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005c800 DT_SIZE_K(137)>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts index 1a19cb38d5..1ad6fb342c 100644 --- a/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54ls05dk/bm_nrf54ls05dk_nrf54ls05b_cpuapp_s145_softdevice_mcuboot.dts @@ -29,17 +29,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -47,11 +48,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -60,21 +63,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(264)>; }; slot1_partition: partition@4c000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0004c000 DT_SIZE_K(64)>; }; softdevice_partition: partition@5c000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0005c000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@7ee00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0007ee00 0x200>; }; diff --git a/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake b/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake index e718c4eaab..1359ae9150 100644 --- a/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54ls05dk/sysbuild.cmake @@ -1,7 +1,7 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() diff --git a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts index baf10ddffc..3a71db3f8b 100644 --- a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts +++ b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice.dts @@ -21,17 +21,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; slot0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x00000000 DT_SIZE_K(902)>; }; storage_partition: partition@e1800 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x000e1800 DT_SIZE_K(8)>; ranges = <0x0 0xe1800 DT_SIZE_K(8)>; @@ -39,17 +40,20 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; softdevice_partition: partition@e3800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3800 DT_SIZE_K(101)>; }; diff --git a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts index ec469f9bf2..86063146f6 100644 --- a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s115_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(804)>; }; slot1_partition: partition@d3000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000d3000 DT_SIZE_K(64)>; }; softdevice_partition: partition@e3000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000e3000 (DT_SIZE_K(103) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts index a4c55f5814..5f5ff47443 100644 --- a/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts +++ b/boards/nordic/bm_nrf54lv10dk/bm_nrf54lv10dk_nrf54lv10a_cpuapp_s145_softdevice_mcuboot.dts @@ -32,17 +32,18 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(31)>; }; storage_partition: partition@7c00 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00007c00 DT_SIZE_K(8)>; ranges = <0x0 0x7c00 DT_SIZE_K(8)>; @@ -50,11 +51,13 @@ #size-cells = <1>; peer_manager_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "peer_manager"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage0_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00001000 DT_SIZE_K(4)>; }; @@ -63,21 +66,25 @@ /* Area from 0x9c00 to 0xa000 is unused due to alignment */ slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(768)>; }; slot1_partition: partition@ca000 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x000ca000 DT_SIZE_K(64)>; }; softdevice_partition: partition@da000 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x000da000 (DT_SIZE_K(139) + 0x200)>; }; metadata_partition: partition@fce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x000fce00 0x200>; }; diff --git a/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake b/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake index e718c4eaab..1359ae9150 100644 --- a/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake +++ b/boards/nordic/bm_nrf54lv10dk/sysbuild.cmake @@ -1,7 +1,7 @@ string(REPLACE "/" ";" board_qualifer_list "${BOARD_QUALIFIERS}") list(LENGTH board_qualifer_list board_qualifer_list_len) -if(${board_qualifer_list_len} LESS 4) +if(${board_qualifer_list_len} LESS 3) message(FATAL_ERROR "A board target must be supplied") endif() diff --git a/cmake/sysbuild/image_signing_installer.cmake b/cmake/sysbuild/image_signing_installer.cmake index 1aa22881c9..ee25f63722 100644 --- a/cmake/sysbuild/image_signing_installer.cmake +++ b/cmake/sysbuild/image_signing_installer.cmake @@ -1,6 +1,8 @@ # Copyright (c) 2025 Nordic Semiconductor ASA # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/bootloader_dts_utils.cmake) + function(bm_install_tasks output_hex output_bin) set(dependencies ${PROJECT_BINARY_DIR}/.config) @@ -51,6 +53,9 @@ function(bm_install_tasks output_hex output_bin) dt_chosen(flash_node TARGET ${DEFAULT_IMAGE} PROPERTY "zephyr,flash") dt_prop(write_block_size TARGET ${DEFAULT_IMAGE} PATH "${flash_node}" PROPERTY "write-block-size") + dt_nodelabel(slot0_path NODELABEL slot0_partition REQUIRED TARGET ${DEFAULT_IMAGE}) + dt_reg_size(slot0_size PATH "${slot0_path}" TARGET ${DEFAULT_IMAGE}) + if(NOT write_block_size) set(write_block_size 4) message(WARNING "slot0_partition write block size devicetree parameter is missing, assuming write block size is 4") @@ -58,11 +63,10 @@ function(bm_install_tasks output_hex output_bin) sysbuild_get(CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION IMAGE ${DEFAULT_IMAGE} VAR CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION KCONFIG) sysbuild_get(CONFIG_ROM_START_OFFSET IMAGE ${DEFAULT_IMAGE} VAR CONFIG_ROM_START_OFFSET KCONFIG) - sysbuild_get(CONFIG_FLASH_LOAD_SIZE IMAGE ${DEFAULT_IMAGE} VAR CONFIG_FLASH_LOAD_SIZE KCONFIG) # sysbuild_get(CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION IMAGE ${DEFAULT_IMAGE} VAR CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION KCONFIG) # Custom TLV 0x0a is set to 0x01 to indicate that this is an installer image - set(imgtool_sign ${PYTHON_EXECUTABLE} ${IMGTOOL} sign --version ${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} --align ${write_block_size} --slot-size ${CONFIG_FLASH_LOAD_SIZE} --header-size ${CONFIG_ROM_START_OFFSET} --overwrite-only --custom-tlv 0xa0 0x01) + set(imgtool_sign ${PYTHON_EXECUTABLE} ${IMGTOOL} sign --version ${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} --align ${write_block_size} --slot-size ${slot0_size} --header-size ${CONFIG_ROM_START_OFFSET} --overwrite-only --custom-tlv 0xa0 0x01) # if(CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION) # set(imgtool_args --security-counter ${CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE}) diff --git a/doc/nrf-bm/app_dev/dfu/ug_dfu.rst b/doc/nrf-bm/app_dev/dfu/ug_dfu.rst index c487f24e83..fb77a94b80 100644 --- a/doc/nrf-bm/app_dev/dfu/ug_dfu.rst +++ b/doc/nrf-bm/app_dev/dfu/ug_dfu.rst @@ -171,17 +171,18 @@ This board target will always enable DFU support when it is used to build the ap status = "okay"; partitions { - compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; + ranges; boot_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "boot"; reg = <0x00000000 DT_SIZE_K(32)>; }; storage_partition: partition@8000 { - compatible = "fixed-subpartitions"; + compatible = "zephyr,mapped-partition"; label = "storage"; reg = <0x00008000 DT_SIZE_K(8)>; ranges = <0x0 0x8000 DT_SIZE_K(8)>; @@ -189,32 +190,38 @@ This board target will always enable DFU support when it is used to build the ap #size-cells = <1>; storage0_partition: partition@0 { + compatible = "zephyr,mapped-partition"; label = "storage0"; reg = <0x00000000 DT_SIZE_K(4)>; }; storage1_partition: partition@1000 { + compatible = "zephyr,mapped-partition"; label = "storage1"; reg = <0x00001000 DT_SIZE_K(4)>; }; }; slot0_partition: partition@a000 { + compatible = "zephyr,mapped-partition"; label = "slot0"; reg = <0x0000a000 DT_SIZE_K(1290)>; }; slot1_partition: partition@14c800 { + compatible = "zephyr,mapped-partition"; label = "slot1"; reg = <0x0014c800 DT_SIZE_K(64)>; }; softdevice_partition: partition@15c800 { + compatible = "zephyr,mapped-partition"; label = "softdevice"; reg = <0x0015c800 (DT_SIZE_K(129) + 0x200)>; }; metadata_partition: partition@17ce00 { + compatible = "zephyr,mapped-partition"; label = "metadata"; reg = <0x0017ce00 0x200>; }; diff --git a/doc/nrf-bm/libraries/bluetooth/peer_manager.rst b/doc/nrf-bm/libraries/bluetooth/peer_manager.rst index 8258035e01..ec2f12b1ff 100644 --- a/doc/nrf-bm/libraries/bluetooth/peer_manager.rst +++ b/doc/nrf-bm/libraries/bluetooth/peer_manager.rst @@ -453,7 +453,7 @@ LE Secure Connections is an optional functionality of the Peer Manager and is di However, if you want to use it, keep in mind that it depends on nRF Security to generate the Diffie-Helman key pair. The following Kconfig options must be enabled to support LE Secure Connections: -* :kconfig:option:`CONFIG_NRF_SECURITY` +* :kconfig:option:`CONFIG_PSA_CRYPTO` * :kconfig:option:`CONFIG_PSA_WANT_ALG_ECDH` * :kconfig:option:`CONFIG_PSA_WANT_GENERATE_RANDOM` * :kconfig:option:`CONFIG_PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE` diff --git a/lib/bluetooth/peer_manager/modules/peer_data_storage.c b/lib/bluetooth/peer_manager/modules/peer_data_storage.c index a72bf4ca83..2ef90b23ca 100644 --- a/lib/bluetooth/peer_manager/modules/peer_data_storage.c +++ b/lib/bluetooth/peer_manager/modules/peer_data_storage.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -19,9 +20,8 @@ #include #include -#define PEER_MANAGER_NODE DT_NODELABEL(peer_manager_partition) -#define PEER_MANAGER_PARTITION_OFFSET DT_REG_ADDR(PEER_MANAGER_NODE) -#define PEER_MANAGER_PARTITION_SIZE DT_REG_SIZE(PEER_MANAGER_NODE) +#define PEER_MANAGER_PARTITION_OFFSET PARTITION_ADDRESS(peer_manager_partition) +#define PEER_MANAGER_PARTITION_SIZE PARTITION_SIZE(peer_manager_partition) LOG_MODULE_DECLARE(peer_manager, CONFIG_PEER_MANAGER_LOG_LEVEL); diff --git a/samples/bluetooth/ble_bms/prj.conf b/samples/bluetooth/ble_bms/prj.conf index 28c88fcd29..96de5e2f46 100644 --- a/samples/bluetooth/ble_bms/prj.conf +++ b/samples/bluetooth/ble_bms/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_cgms/prj.conf b/samples/bluetooth/ble_cgms/prj.conf index 73633f4be1..8bceb4db94 100644 --- a/samples/bluetooth/ble_cgms/prj.conf +++ b/samples/bluetooth/ble_cgms/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hids_keyboard/prj.conf b/samples/bluetooth/ble_hids_keyboard/prj.conf index 8ee6dd1481..ebf62d26f6 100644 --- a/samples/bluetooth/ble_hids_keyboard/prj.conf +++ b/samples/bluetooth/ble_hids_keyboard/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hids_mouse/prj.conf b/samples/bluetooth/ble_hids_mouse/prj.conf index 9053141026..1e5000ae6f 100644 --- a/samples/bluetooth/ble_hids_mouse/prj.conf +++ b/samples/bluetooth/ble_hids_mouse/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hrs/prj.conf b/samples/bluetooth/ble_hrs/prj.conf index dc2f08be16..46cbf3b546 100644 --- a/samples/bluetooth/ble_hrs/prj.conf +++ b/samples/bluetooth/ble_hrs/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_hrs_central/prj.conf b/samples/bluetooth/ble_hrs_central/prj.conf index a1384c1e79..fccba1490a 100644 --- a/samples/bluetooth/ble_hrs_central/prj.conf +++ b/samples/bluetooth/ble_hrs_central/prj.conf @@ -10,7 +10,7 @@ CONFIG_NRF_SDH_BLE_CENTRAL_LINK_COUNT=1 CONFIG_NRF_SDH_BLE_PERIPHERAL_LINK_COUNT=0 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_lbs/prj.conf b/samples/bluetooth/ble_lbs/prj.conf index c30ac82b08..a5331eaaa8 100644 --- a/samples/bluetooth/ble_lbs/prj.conf +++ b/samples/bluetooth/ble_lbs/prj.conf @@ -9,7 +9,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE_VS_UUID_COUNT=1 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_nus/prj.conf b/samples/bluetooth/ble_nus/prj.conf index ef02d7f04e..75becfde4e 100644 --- a/samples/bluetooth/ble_nus/prj.conf +++ b/samples/bluetooth/ble_nus/prj.conf @@ -9,7 +9,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE_VS_UUID_COUNT=1 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_nus_central/prj.conf b/samples/bluetooth/ble_nus_central/prj.conf index 1a14879da3..2155e23f8e 100644 --- a/samples/bluetooth/ble_nus_central/prj.conf +++ b/samples/bluetooth/ble_nus_central/prj.conf @@ -10,7 +10,7 @@ CONFIG_BM_GPIOTE=y CONFIG_BM_TIMER=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_pwr_profiling/prj.conf b/samples/bluetooth/ble_pwr_profiling/prj.conf index 057ab399d1..904b76b57f 100644 --- a/samples/bluetooth/ble_pwr_profiling/prj.conf +++ b/samples/bluetooth/ble_pwr_profiling/prj.conf @@ -9,7 +9,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE_VS_UUID_COUNT=1 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/ble_radio_notification/prj.conf b/samples/bluetooth/ble_radio_notification/prj.conf index 20a3ef6697..01697565e7 100644 --- a/samples/bluetooth/ble_radio_notification/prj.conf +++ b/samples/bluetooth/ble_radio_notification/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/hello_softdevice/prj.conf b/samples/bluetooth/hello_softdevice/prj.conf index 6f717569c0..b467862c60 100644 --- a/samples/bluetooth/hello_softdevice/prj.conf +++ b/samples/bluetooth/hello_softdevice/prj.conf @@ -6,6 +6,6 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/bluetooth/peripheral_nfc_pairing/prj.conf b/samples/bluetooth/peripheral_nfc_pairing/prj.conf index 72b28fa295..316e965d1b 100644 --- a/samples/bluetooth/peripheral_nfc_pairing/prj.conf +++ b/samples/bluetooth/peripheral_nfc_pairing/prj.conf @@ -6,7 +6,7 @@ CONFIG_SOFTDEVICE=y CONFIG_NRF_SDH_BLE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/boot/mcuboot_recovery_entry/prj.conf b/samples/boot/mcuboot_recovery_entry/prj.conf index 7ed988a663..4d17447c77 100644 --- a/samples/boot/mcuboot_recovery_entry/prj.conf +++ b/samples/boot/mcuboot_recovery_entry/prj.conf @@ -16,7 +16,7 @@ CONFIG_NRF_SDH_BLE_GAP_EVENT_LENGTH=10 CONFIG_NRF_SDH_BLE_GATT_MAX_MTU_SIZE=498 # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/subsys/fs/bm_zms/prj.conf b/samples/subsys/fs/bm_zms/prj.conf index f33b5e1355..203d5f5053 100644 --- a/samples/subsys/fs/bm_zms/prj.conf +++ b/samples/subsys/fs/bm_zms/prj.conf @@ -7,7 +7,7 @@ CONFIG_LOG_BUFFER_SIZE=2048 CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/subsys/fs/bm_zms/src/main.c b/samples/subsys/fs/bm_zms/src/main.c index af656da6d6..545acad607 100644 --- a/samples/subsys/fs/bm_zms/src/main.c +++ b/samples/subsys/fs/bm_zms/src/main.c @@ -7,12 +7,12 @@ #include #include #include +#include #include #include -#define STORAGE_NODE DT_NODELABEL(storage0_partition) -#define BM_ZMS_PARTITION_OFFSET DT_REG_ADDR(STORAGE_NODE) -#define BM_ZMS_PARTITION_SIZE DT_REG_SIZE(STORAGE_NODE) +#define BM_ZMS_PARTITION_OFFSET PARTITION_ADDRESS(storage0_partition) +#define BM_ZMS_PARTITION_SIZE PARTITION_SIZE(storage0_partition) #define IP_ADDRESS_ID 1 #define KEY_VALUE_ID 0xbeefdead diff --git a/samples/subsys/storage/bm_storage/prj.conf b/samples/subsys/storage/bm_storage/prj.conf index 646fa6e663..195905a3cf 100644 --- a/samples/subsys/storage/bm_storage/prj.conf +++ b/samples/subsys/storage/bm_storage/prj.conf @@ -6,7 +6,7 @@ CONFIG_LOG_BACKEND_BM_UARTE=y CONFIG_SOFTDEVICE=y # Enable RNG -CONFIG_NRF_SECURITY=y +CONFIG_PSA_CRYPTO=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_PSA_WANT_GENERATE_RANDOM=y diff --git a/samples/subsys/storage/bm_storage/src/main.c b/samples/subsys/storage/bm_storage/src/main.c index dd096a2110..54371654d3 100644 --- a/samples/subsys/storage/bm_storage/src/main.c +++ b/samples/subsys/storage/bm_storage/src/main.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -21,9 +22,8 @@ LOG_MODULE_REGISTER(sample, CONFIG_SAMPLE_BM_STORAGE_LOG_LEVEL); -#define STORAGE0_PARTITION DT_NODELABEL(storage0_partition) -#define STORAGE0_START DT_REG_ADDR(STORAGE0_PARTITION) -#define STORAGE0_SIZE DT_REG_SIZE(STORAGE0_PARTITION) +#define STORAGE0_START PARTITION_ADDRESS(storage0_partition) +#define STORAGE0_SIZE PARTITION_SIZE(storage0_partition) /* Write buffer size must be a multiple of the program unit. * To support both RRAM (16 bytes) and SoftDevice (4 bytes) backends, diff --git a/subsys/bm_installs/src/bm_installs.c b/subsys/bm_installs/src/bm_installs.c index d9aaf376cc..51247a0ee7 100644 --- a/subsys/bm_installs/src/bm_installs.c +++ b/subsys/bm_installs/src/bm_installs.c @@ -69,7 +69,7 @@ static bool bm_installs_validate(struct bm_installs *data) void bm_installs_init(void) { - uint32_t read_position = FIXED_PARTITION_OFFSET(metadata_partition); + uint32_t read_position = PARTITION_OFFSET(metadata_partition); bm_installs_index = 0; bm_installs_valid = false; @@ -103,7 +103,7 @@ void bm_installs_init(void) const struct flash_area *fap; int rc; - rc = flash_area_open(FIXED_PARTITION_ID(slot0_partition), &fap); + rc = flash_area_open(PARTITION_ID(slot0_partition), &fap); if (rc) { return; @@ -111,8 +111,8 @@ void bm_installs_init(void) metadata_slot.fa_id = fap->fa_id; metadata_slot.fa_dev = fap->fa_dev; - metadata_slot.fa_off = FIXED_PARTITION_OFFSET(metadata_partition); - metadata_slot.fa_size = FIXED_PARTITION_SIZE(metadata_partition); + metadata_slot.fa_off = PARTITION_OFFSET(metadata_partition); + metadata_slot.fa_size = PARTITION_SIZE(metadata_partition); #if CONFIG_FLASH_MAP_LABELS metadata_slot.fa_label = fap->fa_label; #endif @@ -172,7 +172,7 @@ int bm_installs_write(struct bm_installs *data) while (index < CONFIG_BM_INSTALL_ENTRIES) { uint32_t current_index_offset = index * sizeof(struct bm_installs); - uint32_t current_flash_offset = FIXED_PARTITION_OFFSET(metadata_partition) + + uint32_t current_flash_offset = PARTITION_OFFSET(metadata_partition) + current_index_offset; if (memcmp((void *)current_flash_offset, unerased_data, @@ -196,7 +196,7 @@ int bm_installs_write(struct bm_installs *data) if (index == CONFIG_BM_INSTALL_ENTRIES) { /* No free spaces, erase whole sector and start again */ index = 0; - rc = flash_area_erase(&metadata_slot, 0, FIXED_PARTITION_SIZE( + rc = flash_area_erase(&metadata_slot, 0, PARTITION_SIZE( metadata_partition)); if (rc) { @@ -226,7 +226,7 @@ int bm_installs_invalidate(void) } #if defined(CONFIG_FLASH_HAS_EXPLICIT_ERASE) - if ((index_offset + sizeof(bm_installs_data)) >= FIXED_PARTITION_SIZE( + if ((index_offset + sizeof(bm_installs_data)) >= PARTITION_SIZE( metadata_partition)) { /* Since this is at end of sector, it would be better to just erase the whole * sector @@ -235,7 +235,7 @@ int bm_installs_invalidate(void) metadata_slot.fa_dev); if (flash_params_get_erase_cap(fparams) & FLASH_ERASE_C_EXPLICIT) { - rc = flash_area_erase(&metadata_slot, 0, FIXED_PARTITION_SIZE( + rc = flash_area_erase(&metadata_slot, 0, PARTITION_SIZE( metadata_partition)); performed_erase = true; } diff --git a/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c b/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c index 2a1ccae936..c81da1f139 100644 --- a/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/img_mgmt/src/bm_img_mgmt.c @@ -26,11 +26,11 @@ LOG_MODULE_DECLARE(mcumgr_img_grp_data, CONFIG_MCUMGR_GRP_IMG_LOG_LEVEL); -#define S0_START FIXED_PARTITION_ADDRESS(slot0_partition) -#define S0_SIZE FIXED_PARTITION_SIZE(slot0_partition) +#define S0_START PARTITION_ADDRESS(slot0_partition) +#define S0_SIZE PARTITION_SIZE(slot0_partition) -#define S1_START FIXED_PARTITION_ADDRESS(slot1_partition) -#define S1_SIZE FIXED_PARTITION_SIZE(slot1_partition) +#define S1_START PARTITION_ADDRESS(slot1_partition) +#define S1_SIZE PARTITION_SIZE(slot1_partition) #define RRAMC_WRITE_BLOCK_SIZE 16 static struct bm_storage s0_storage; diff --git a/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c b/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c index 660237da7f..ef069ea7db 100644 --- a/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c +++ b/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c @@ -27,9 +27,11 @@ #include #include -#define FIXED_PARTITION_IS_RUNNING_APP_PARTITION(label) \ - (FIXED_PARTITION_OFFSET(label) <= CONFIG_FLASH_LOAD_OFFSET && \ - FIXED_PARTITION_OFFSET(label) + FIXED_PARTITION_SIZE(label) > CONFIG_FLASH_LOAD_OFFSET) +#define LOAD_OFFSET (PARTITION_ADDRESS(slot0_partition)) + +#define PARTITION_IS_RUNNING_APP_PARTITION(label) \ + (PARTITION_OFFSET(label) <= LOAD_OFFSET && \ + PARTITION_OFFSET(label) + PARTITION_SIZE(label) > LOAD_OFFSET) LOG_MODULE_REGISTER(mcumgr_img_grp, CONFIG_MCUMGR_GRP_IMG_LOG_LEVEL); @@ -79,7 +81,7 @@ int img_mgmt_active_slot(int image) { int slot = 0; /* This covers single image, including DirectXiP */ - if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) { + if (PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) { slot = 1; } LOG_DBG("(%d) => %d", image, slot); diff --git a/subsys/shell/backends/Kconfig.bm_uarte b/subsys/shell/backends/Kconfig.bm_uarte index a825c07bac..464005313e 100644 --- a/subsys/shell/backends/Kconfig.bm_uarte +++ b/subsys/shell/backends/Kconfig.bm_uarte @@ -51,4 +51,12 @@ config SHELL_BACKEND_SERIAL config SHELL_MINIMAL default y +# Workaround for added build assert in zephyr that should only be checked when multithreading is +# enabled. Kconfig is not used with multithreading disabled. +config SHELL_STACK_SIZE + int "Shell thread stack size" + default 32 + help + Stack size for thread created for each instance. + endif diff --git a/subsys/softdevice_handler/irq_connect.c b/subsys/softdevice_handler/irq_connect.c index 7b1ad13d49..54e54e49af 100644 --- a/subsys/softdevice_handler/irq_connect.c +++ b/subsys/softdevice_handler/irq_connect.c @@ -34,7 +34,7 @@ uint32_t softdevice_vector_forward_address; static void sd_enable_irq_forwarding(void) { - softdevice_vector_forward_address = FIXED_PARTITION_OFFSET(softdevice_partition); + softdevice_vector_forward_address = PARTITION_OFFSET(softdevice_partition); #ifdef CONFIG_BOOTLOADER_MCUBOOT softdevice_vector_forward_address += CONFIG_ROM_START_OFFSET; #endif diff --git a/subsys/softdevice_handler/nrf_sdh.c b/subsys/softdevice_handler/nrf_sdh.c index fb997273ea..903545357d 100644 --- a/subsys/softdevice_handler/nrf_sdh.c +++ b/subsys/softdevice_handler/nrf_sdh.c @@ -132,7 +132,7 @@ static int nrf_sdh_enable(void) }; if (IS_ENABLED(CONFIG_NRF_SDH_LOG_SD_INFO)) { - const uint32_t base = FIXED_PARTITION_OFFSET(softdevice_partition); + const uint32_t base = PARTITION_OFFSET(softdevice_partition); const struct nrf_sdh_info_version sd_ver = nrf_sdh_info_version_get(base); const struct nrf_sdh_info_unique_str sd_unique = nrf_sdh_info_unique_str_get(base); diff --git a/subsys/storage/flash_map/flash_map_mcumgr.c b/subsys/storage/flash_map/flash_map_mcumgr.c index 4cb17578e9..b08746665e 100644 --- a/subsys/storage/flash_map/flash_map_mcumgr.c +++ b/subsys/storage/flash_map/flash_map_mcumgr.c @@ -11,14 +11,14 @@ const struct flash_area default_flash_map[] = { { .fa_id = 1, - .fa_off = FIXED_PARTITION_OFFSET(slot0_partition), - .fa_size = FIXED_PARTITION_SIZE(slot0_partition), + .fa_off = PARTITION_OFFSET(slot0_partition), + .fa_size = PARTITION_SIZE(slot0_partition), .fa_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)), }, { .fa_id = 2, - .fa_off = FIXED_PARTITION_OFFSET(slot1_partition), - .fa_size = FIXED_PARTITION_SIZE(slot1_partition), + .fa_off = PARTITION_OFFSET(slot1_partition), + .fa_size = PARTITION_SIZE(slot1_partition), .fa_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller)), }, }; diff --git a/sysbuild/CMakeLists.txt b/sysbuild/CMakeLists.txt index 751b372d1e..8d80db8427 100644 --- a/sysbuild/CMakeLists.txt +++ b/sysbuild/CMakeLists.txt @@ -66,9 +66,9 @@ function(bm_install_setup) if(SB_CONFIG_SOC_SERIES_NRF54L) if(SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_NONE) - set_config_bool(mcuboot CONFIG_NRF_SECURITY y) + set_config_bool(mcuboot CONFIG_PSA_CRYPTO y) elseif(SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_ED25519) - set_config_bool(mcuboot CONFIG_NRF_SECURITY y) + set_config_bool(mcuboot CONFIG_PSA_CRYPTO y) # We are sure that ED25519 signature on MCUboot does not need these set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_AEAD_DRIVER n) diff --git a/tests/subsys/fs/bm_zms/src/main.c b/tests/subsys/fs/bm_zms/src/main.c index 1d9f37b6f4..f6ae13eafc 100644 --- a/tests/subsys/fs/bm_zms/src/main.c +++ b/tests/subsys/fs/bm_zms/src/main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -34,8 +35,7 @@ K_SEM_DEFINE(mount_sem, 0, 1); K_SEM_DEFINE(clear_sem, 0, 1); K_SEM_DEFINE(write_sem, 0, 1); #else -#define STORAGE_NODE DT_NODELABEL(storage_partition) -#define TEST_PARTITION_START DT_REG_ADDR(STORAGE_NODE) +#define TEST_PARTITION_START PARTITION_ADDRESS(storage_partition) #endif #if defined(CONFIG_SOFTDEVICE) diff --git a/west.yml b/west.yml index 463b672fb8..d88490d124 100644 --- a/west.yml +++ b/west.yml @@ -14,7 +14,7 @@ manifest: projects: - name: nrf repo-path: sdk-nrf - revision: v3.3.0 + revision: v3.4.0-rc1 import: name-allowlist: - cmsis