Skip to content

Commit 0050ddf

Browse files
PavelVPVcursoragent
andcommitted
samples: net: aws_iot: disable Partition Manager for Wi-Fi
Kconfig.sysbuild PM default n; nrf7002dk NS overlay and .conf for DTS-based TF-M partitions and SRAM; nRF54L15 and nRF54LM20 A/B cpuapp overlays; adjust sysbuild MCUboot image Kconfig and add nrf7002dk MCUboot overlay for the PM-disabled flash map. Changelog entry. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
1 parent d6ef6be commit 0050ddf

9 files changed

Lines changed: 234 additions & 12 deletions

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ Networking samples
442442

443443
* Removed Partition Manager dependency for all Wi-Fi targets.
444444
Flash and SRAM partitions are supplied via Devicetree overlays instead.
445+
* :ref:`aws_iot` sample:
446+
447+
* Removed Partition Manager dependency for all Wi-Fi targets.
448+
Flash and SRAM partitions are supplied via Devicetree overlays instead.
445449

446450
* :ref:`azure_iot_hub` sample:
447451

samples/net/aws_iot/Kconfig.sysbuild

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ choice BOOTLOADER
1212
!BOARD_NRF54LM20DK_NRF54LM20B_CPUAPP
1313
endchoice
1414

15-
config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
16-
default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \
17-
BOARD_NRF5340DK_NRF5340_CPUAPP_NS || \
18-
BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP || \
19-
BOARD_NRF54LM20DK_NRF54LM20B_CPUAPP
20-
2115
config WIFI_NRF70
2216
default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || \
2317
BOARD_NRF54L15DK_NRF54L15_CPUAPP || \
2418
BOARD_NRF54H20DK_NRF54H20_CPUAPP || \
2519
BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP || \
2620
BOARD_NRF54LM20DK_NRF54LM20B_CPUAPP
2721

22+
config PARTITION_MANAGER
23+
default n if !BOARD_NRF9160DK_NRF9160_NS && \
24+
!BOARD_NRF9161DK_NRF9161_NS && \
25+
!BOARD_NRF9151DK_NRF9151_NS && \
26+
!BOARD_THINGY91_NRF9160_NS && \
27+
!BOARD_THINGY91X_NRF9151_NS
28+
2829
source "share/sysbuild/Kconfig"

samples/net/aws_iot/boards/nrf54l15dk_nrf54l15_cpuapp.overlay

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7+
/delete-node/ &boot_partition;
8+
/delete-node/ &slot0_partition;
9+
/delete-node/ &slot1_partition;
10+
/delete-node/ &storage_partition;
11+
712
&rram_controller {
813
/delete-node/ cpuflpr_sram;
914
/delete-node/ cpuflpr_rram;
@@ -18,4 +23,18 @@
1823
/* Adjust the cpuapp_rram to include the freed up cpuflpr_rram */
1924
&cpuapp_rram {
2025
reg = <0x0 DT_SIZE_K(1524)>;
26+
27+
partitions {
28+
slot0_partition: partition@0 {
29+
compatible = "zephyr,mapped-partition";
30+
label = "image-0";
31+
reg = <0x0 0x17b000>;
32+
};
33+
34+
storage_partition: partition@17b000 {
35+
compatible = "zephyr,mapped-partition";
36+
label = "storage";
37+
reg = <0x17b000 0x2000>;
38+
};
39+
};
2140
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/delete-node/ &boot_partition;
8+
/delete-node/ &slot0_partition;
9+
/delete-node/ &slot1_partition;
10+
/delete-node/ &storage_partition;
11+
12+
&cpuapp_rram {
13+
partitions {
14+
#address-cells = <1>;
15+
#size-cells = <1>;
16+
17+
slot0_partition: partition@0 {
18+
compatible = "zephyr,mapped-partition";
19+
label = "image-0";
20+
reg = <0x0 0x1fb000>;
21+
};
22+
23+
storage_partition: partition@1fb000 {
24+
compatible = "zephyr,mapped-partition";
25+
label = "storage";
26+
reg = <0x1fb000 0x2000>;
27+
};
28+
};
29+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/delete-node/ &boot_partition;
8+
/delete-node/ &slot0_partition;
9+
/delete-node/ &slot1_partition;
10+
/delete-node/ &storage_partition;
11+
12+
&cpuapp_rram {
13+
partitions {
14+
#address-cells = <1>;
15+
#size-cells = <1>;
16+
17+
slot0_partition: partition@0 {
18+
compatible = "zephyr,mapped-partition";
19+
label = "image-0";
20+
reg = <0x0 0x1fb000>;
21+
};
22+
23+
storage_partition: partition@1fb000 {
24+
compatible = "zephyr,mapped-partition";
25+
label = "storage";
26+
reg = <0x1fb000 0x2000>;
27+
};
28+
};
29+
};

samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ CONFIG_L2_WIFI_CONNECTIVITY_AUTO_DOWN=n
8888
CONFIG_SPI=y
8989
CONFIG_SPI_NOR=y
9090
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
91-
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
9291

9392
# Bootloader and FOTA related configurations
9493

@@ -116,8 +115,16 @@ CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y
116115

117116
# Optimize TF-M
118117
CONFIG_TFM_PROFILE_TYPE_SMALL=y
119-
CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000
120-
CONFIG_PM_PARTITION_SIZE_TFM=0x1fe00
118+
119+
# CONFIG_SRAM_BASE_ADDRESS / CONFIG_SRAM_SIZE override the Zephyr defaults so the
120+
# NS application linker map matches this sample's board *.overlay (chosen zephyr,sram
121+
# resolves to &sram0_ns_app). TF-M occupies the low 48 KiB (0xc000) of cpuapp SRAM; the NS
122+
# image therefore starts at 0x20000000 + 0xc000 == 0x2000c000. CONFIG_SRAM_SIZE is in kB
123+
# (see arch/Kconfig): 400 = 0x64000 bytes, the reg size of sram0_ns_app in the overlay.
124+
# The NS window (&sram0_ns) spans 0x74000; the top 0x10000 (64 KiB) is sram0_shared for
125+
# application/network-core IPC (nrf5340_shared_sram_partition.dtsi), so 0x64000 + 0x10000 == 0x74000.
126+
CONFIG_SRAM_BASE_ADDRESS=0x2000c000
127+
CONFIG_SRAM_SIZE=400
121128

122129
# Enable LTO to save flash memory
123130
CONFIG_LTO=y

samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.overlay

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,104 @@
1111
};
1212
};
1313

14+
/delete-node/ &boot_partition;
15+
/delete-node/ &slot0_partition;
16+
/delete-node/ &slot1_partition;
17+
/delete-node/ &tfm_its_partition;
18+
/delete-node/ &tfm_otp_partition;
19+
/delete-node/ &tfm_ps_partition;
20+
/delete-node/ &storage_partition;
21+
22+
&flash0 {
23+
partitions {
24+
boot_partition: partition@0 {
25+
compatible = "zephyr,mapped-partition";
26+
label = "mcuboot";
27+
reg = <0x0 0x10000>;
28+
};
29+
30+
slot0_partition: partition@10000 {
31+
compatible = "zephyr,mapped-partition";
32+
label = "image-0";
33+
reg = <0x10000 0xe4000>;
34+
ranges = <0x0 0x10000 0xe4000>;
35+
#address-cells = <1>;
36+
#size-cells = <1>;
37+
38+
slot0_s_partition: partition@0 {
39+
compatible = "zephyr,mapped-partition";
40+
label = "image-0-secure";
41+
reg = <0x0 0x20000>;
42+
};
43+
44+
slot0_ns_partition: partition@20000 {
45+
compatible = "zephyr,mapped-partition";
46+
label = "image-0-nonsecure";
47+
reg = <0x20000 0xc4000>;
48+
};
49+
};
50+
51+
tfm_storage_partition: partition@f4000 {
52+
compatible = "zephyr,mapped-partition";
53+
label = "tfm-storage";
54+
reg = <0xf4000 DT_SIZE_K(48)>;
55+
ranges = <0x0 0xf4000 DT_SIZE_K(48)>;
56+
#address-cells = <1>;
57+
#size-cells = <1>;
58+
59+
tfm_its_partition: partition@0 {
60+
compatible = "zephyr,mapped-partition";
61+
label = "tfm-its";
62+
reg = <0x0 DT_SIZE_K(8)>;
63+
};
64+
65+
tfm_otp_partition: partition@4000 {
66+
compatible = "zephyr,mapped-partition";
67+
label = "tfm-otp";
68+
reg = <0x4000 DT_SIZE_K(8)>;
69+
};
70+
71+
tfm_ps_partition: partition@8000 {
72+
compatible = "zephyr,mapped-partition";
73+
label = "tfm-ps";
74+
reg = <0x8000 DT_SIZE_K(16)>;
75+
};
76+
};
77+
};
78+
};
79+
1480
&mx25r64 {
1581
status = "okay";
82+
83+
partitions {
84+
compatible = "fixed-partitions";
85+
ranges;
86+
#address-cells = <1>;
87+
#size-cells = <1>;
88+
89+
slot1_partition: partition@0 {
90+
label = "image-1";
91+
reg = <0x0 0xe4000>;
92+
};
93+
};
94+
};
95+
96+
/*
97+
* TrustZone SRAM split from devicetree (region_defs.h for TF-M). The secure image uses
98+
* 48 KiB (0xc000) at the base of cpuapp SRAM (&sram0_s); NS RAM begins at 0x20000000 + 0xc000.
99+
* &sram0_ns spans 0x74000 bytes; &sram0_ns_app is 0x64000 because the top 0x10000 (64 KiB)
100+
* within that NS window is sram0_shared for application/network-core IPC
101+
* (nrf5340_shared_sram_partition.dtsi), i.e. 0x64000 + 0x10000 == 0x74000.
102+
*/
103+
&sram0_s {
104+
reg = <0x0 0xc000>;
105+
};
106+
107+
&sram0_ns {
108+
reg = <0xc000 0x74000>;
109+
ranges = <0x0 0xc000 0x74000>;
110+
};
111+
112+
&sram0_ns_app {
113+
reg = <0x0 0x64000>;
16114
};

samples/net/aws_iot/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ CONFIG_SPI_NOR=y
1717
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
1818
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
1919

20-
# MCUBoot and Partition Manager
21-
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
22-
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
20+
# MCUboot
2321
CONFIG_BOOT_MAX_IMG_SECTORS=256
2422
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
2523
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y

samples/net/aws_iot/sysbuild/mcuboot/boards/nrf7002dk_nrf5340_cpuapp.overlay

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,40 @@
1111
zephyr,code-partition = &boot_partition;
1212
};
1313
};
14+
15+
/delete-node/ &boot_partition;
16+
/delete-node/ &slot0_partition;
17+
/delete-node/ &slot1_partition;
18+
19+
&flash0 {
20+
partitions {
21+
boot_partition: partition@0 {
22+
compatible = "zephyr,mapped-partition";
23+
label = "mcuboot";
24+
reg = <0x0 0x10000>;
25+
};
26+
27+
/* Keep MCUboot primary slot aligned with the application devicetree layout. */
28+
slot0_partition: partition@10000 {
29+
compatible = "zephyr,mapped-partition";
30+
label = "image-0";
31+
reg = <0x10000 0xe4000>;
32+
};
33+
};
34+
};
35+
36+
&mx25r64 {
37+
status = "okay";
38+
39+
partitions {
40+
compatible = "fixed-partitions";
41+
ranges;
42+
#address-cells = <1>;
43+
#size-cells = <1>;
44+
45+
slot1_partition: partition@0 {
46+
label = "image-1";
47+
reg = <0x0 0xe4000>;
48+
};
49+
};
50+
};

0 commit comments

Comments
 (0)