Skip to content

Commit 49decd8

Browse files
PavelVPVcursoragent
andcommitted
samples: net: azure_iot_hub: disable Partition Manager; NS and MCUboot layouts
Kconfig.sysbuild PM default n. nrf7002dk NS overlay and .conf for static partitions and SRAM; nrf54lm20dk A/B NS overlays (image-1 on external flash, image-0 on RRAM) and drop redundant NS .conf lines; nrf7002dk and nrf54lm20dk MCUboot board snippets for external flash / partition alignment. Changelog entry. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
1 parent 92f6cc6 commit 49decd8

12 files changed

Lines changed: 410 additions & 12 deletions

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,33 +395,42 @@ Networking samples
395395

396396
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
397397
Flash and SRAM partitions are supplied via Devicetree overlays instead.
398+
398399
* :ref:`udp_sample` sample:
399400

400401
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
401402
Flash and SRAM partitions are supplied via Devicetree overlays instead.
403+
402404
* :ref:`net_coap_client_sample` sample:
403405

404406
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
405407
Flash and SRAM partitions are supplied via Devicetree overlays instead.
408+
406409
* :ref:`download_sample` sample:
407410

408411
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
409412
Flash and SRAM partitions are supplied via Devicetree overlays instead.
413+
410414
* :ref:`https_client` sample:
411415

412416
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
413417
Flash and SRAM partitions are supplied via Devicetree overlays instead.
418+
414419
* :ref:`http_server` sample:
415420

416421
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
417422
Flash and SRAM partitions are supplied via Devicetree overlays instead.
423+
418424
* :ref:`aws_iot` sample:
419425

420426
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
421427
Flash and SRAM partitions are supplied via Devicetree overlays instead.
422428

423429
* :ref:`azure_iot_hub` sample:
424430

431+
* Removed Partition Manager dependency for builds where sysbuild disables it (including common Wi-Fi targets).
432+
Flash and SRAM partitions are supplied via Devicetree overlays instead.
433+
425434
* Added support for the nRF54LM20 DK with the nRF7002-EB II shield.
426435

427436
NFC samples

samples/net/azure_iot_hub/Kconfig.sysbuild

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
1515
config WIFI_NRF70
1616
default y if BOARD_NRF7002DK_NRF5340_CPUAPP_NS || BOARD_NRF54LM20DK_NRF54LM20A_CPUAPP_NS
1717

18+
config PARTITION_MANAGER
19+
default n if !BOARD_NRF9160DK_NRF9160_NS && \
20+
!BOARD_NRF9161DK_NRF9161_NS && \
21+
!BOARD_NRF9151DK_NRF9151_NS
22+
1823
source "share/sysbuild/Kconfig"

samples/net/azure_iot_hub/boards/nrf54lm20dk_nrf54lm20a_cpuapp_ns.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ CONFIG_DOWNLOADER_STACK_SIZE=4096
115115
CONFIG_SPI=y
116116
CONFIG_SPI_NOR=y
117117
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
118-
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
119118

120119
# TLS credentials
121120
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y

samples/net/azure_iot_hub/boards/nrf54lm20dk_nrf54lm20a_cpuapp_ns.overlay

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,120 @@
1111
};
1212
};
1313

14+
/delete-node/ &slot0_partition;
15+
/delete-node/ &tfm_ps_partition;
16+
/delete-node/ &tfm_its_partition;
17+
/delete-node/ &tfm_otp_partition;
18+
/delete-node/ &slot0_ns_partition;
19+
/delete-node/ &storage_partition;
20+
21+
&cpuapp_rram {
22+
partitions {
23+
boot_partition: partition@0 {
24+
compatible = "zephyr,mapped-partition";
25+
label = "mcuboot";
26+
reg = <0x0 0xd800>;
27+
};
28+
29+
tfm_storage_partition: partition@e000 {
30+
compatible = "zephyr,mapped-partition";
31+
label = "tfm-storage";
32+
reg = <0xe000 DT_SIZE_K(40)>;
33+
ranges = <0x0 0xe000 DT_SIZE_K(40)>;
34+
#address-cells = <1>;
35+
#size-cells = <1>;
36+
37+
tfm_its_partition: partition@0 {
38+
compatible = "zephyr,mapped-partition";
39+
label = "tfm-its";
40+
reg = <0x0 DT_SIZE_K(16)>;
41+
};
42+
43+
tfm_otp_partition: partition@4000 {
44+
compatible = "zephyr,mapped-partition";
45+
label = "tfm-otp";
46+
reg = <0x4000 DT_SIZE_K(8)>;
47+
};
48+
49+
tfm_ps_partition: partition@6000 {
50+
compatible = "zephyr,mapped-partition";
51+
label = "tfm-ps";
52+
reg = <0x6000 DT_SIZE_K(16)>;
53+
};
54+
};
55+
56+
slot0_partition: partition@18000 {
57+
compatible = "zephyr,mapped-partition";
58+
label = "image-0";
59+
reg = <0x18000 0x1e3000>;
60+
ranges = <0x0 0x18000 0x1e3000>;
61+
#address-cells = <1>;
62+
#size-cells = <1>;
63+
64+
slot0_s_partition: partition@0 {
65+
compatible = "zephyr,mapped-partition";
66+
label = "image-0-secure";
67+
reg = <0x0 0x40000>;
68+
};
69+
70+
slot0_ns_partition: partition@40000 {
71+
compatible = "zephyr,mapped-partition";
72+
label = "image-0-nonsecure";
73+
reg = <0x40000 0x1a3000>;
74+
};
75+
};
76+
77+
nonsecure_storage: partition@1fb000 {
78+
compatible = "zephyr,mapped-partition";
79+
label = "nonsecure-storage";
80+
reg = <0x1fb000 DT_SIZE_K(8)>;
81+
ranges = <0x0 0x1fb000 DT_SIZE_K(8)>;
82+
#address-cells = <1>;
83+
#size-cells = <1>;
84+
85+
storage_partition: partition@0 {
86+
compatible = "zephyr,mapped-partition";
87+
label = "storage";
88+
reg = <0x0 DT_SIZE_K(8)>;
89+
};
90+
};
91+
};
92+
};
93+
1494
&mx25r64 {
1595
status = "okay";
96+
97+
partitions {
98+
compatible = "fixed-partitions";
99+
ranges;
100+
#address-cells = <1>;
101+
#size-cells = <1>;
102+
103+
slot1_partition: partition@0 {
104+
label = "image-1";
105+
reg = <0x0 0x1e3000>;
106+
};
107+
};
108+
};
109+
110+
/*
111+
* CPUAPP SRAM TrustZone split: TF-M uses the first 64 KiB (&sram0_s, reg 0x10000); the NS
112+
* workload uses the remainder (&sram0_ns). These sizes must match the TF-M platform RAM
113+
* layout for nRF54LM20.
114+
*/
115+
&cpuapp_sram {
116+
reg = <0x20000000 0x7fe40>;
117+
ranges = <0x0 0x20000000 0x7fe40>;
118+
};
119+
120+
&sram0_s {
121+
reg = <0x0 0x10000>;
122+
ranges = <0x0 0x0 0x10000>;
123+
};
124+
125+
&sram0_ns {
126+
reg = <0x10000 0x6fe40>;
127+
ranges = <0x0 0x10000 0x6fe40>;
16128
};
17129

18130
/*

samples/net/azure_iot_hub/boards/nrf54lm20dk_nrf54lm20b_cpuapp_ns.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ CONFIG_DOWNLOADER_STACK_SIZE=4096
115115
CONFIG_SPI=y
116116
CONFIG_SPI_NOR=y
117117
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
118-
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
119118

120119
# TLS credentials
121120
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y

samples/net/azure_iot_hub/boards/nrf54lm20dk_nrf54lm20b_cpuapp_ns.overlay

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,120 @@
1111
};
1212
};
1313

14+
/delete-node/ &slot0_partition;
15+
/delete-node/ &tfm_ps_partition;
16+
/delete-node/ &tfm_its_partition;
17+
/delete-node/ &tfm_otp_partition;
18+
/delete-node/ &slot0_ns_partition;
19+
/delete-node/ &storage_partition;
20+
21+
&cpuapp_rram {
22+
partitions {
23+
boot_partition: partition@0 {
24+
compatible = "zephyr,mapped-partition";
25+
label = "mcuboot";
26+
reg = <0x0 0xd800>;
27+
};
28+
29+
tfm_storage_partition: partition@e000 {
30+
compatible = "zephyr,mapped-partition";
31+
label = "tfm-storage";
32+
reg = <0xe000 DT_SIZE_K(40)>;
33+
ranges = <0x0 0xe000 DT_SIZE_K(40)>;
34+
#address-cells = <1>;
35+
#size-cells = <1>;
36+
37+
tfm_its_partition: partition@0 {
38+
compatible = "zephyr,mapped-partition";
39+
label = "tfm-its";
40+
reg = <0x0 DT_SIZE_K(16)>;
41+
};
42+
43+
tfm_otp_partition: partition@4000 {
44+
compatible = "zephyr,mapped-partition";
45+
label = "tfm-otp";
46+
reg = <0x4000 DT_SIZE_K(8)>;
47+
};
48+
49+
tfm_ps_partition: partition@6000 {
50+
compatible = "zephyr,mapped-partition";
51+
label = "tfm-ps";
52+
reg = <0x6000 DT_SIZE_K(16)>;
53+
};
54+
};
55+
56+
slot0_partition: partition@18000 {
57+
compatible = "zephyr,mapped-partition";
58+
label = "image-0";
59+
reg = <0x18000 0x1e3000>;
60+
ranges = <0x0 0x18000 0x1e3000>;
61+
#address-cells = <1>;
62+
#size-cells = <1>;
63+
64+
slot0_s_partition: partition@0 {
65+
compatible = "zephyr,mapped-partition";
66+
label = "image-0-secure";
67+
reg = <0x0 0x40000>;
68+
};
69+
70+
slot0_ns_partition: partition@40000 {
71+
compatible = "zephyr,mapped-partition";
72+
label = "image-0-nonsecure";
73+
reg = <0x40000 0x1a3000>;
74+
};
75+
};
76+
77+
nonsecure_storage: partition@1fb000 {
78+
compatible = "zephyr,mapped-partition";
79+
label = "nonsecure-storage";
80+
reg = <0x1fb000 DT_SIZE_K(8)>;
81+
ranges = <0x0 0x1fb000 DT_SIZE_K(8)>;
82+
#address-cells = <1>;
83+
#size-cells = <1>;
84+
85+
storage_partition: partition@0 {
86+
compatible = "zephyr,mapped-partition";
87+
label = "storage";
88+
reg = <0x0 DT_SIZE_K(8)>;
89+
};
90+
};
91+
};
92+
};
93+
1494
&mx25r64 {
1595
status = "okay";
96+
97+
partitions {
98+
compatible = "fixed-partitions";
99+
ranges;
100+
#address-cells = <1>;
101+
#size-cells = <1>;
102+
103+
slot1_partition: partition@0 {
104+
label = "image-1";
105+
reg = <0x0 0x1e3000>;
106+
};
107+
};
108+
};
109+
110+
/*
111+
* CPUAPP SRAM TrustZone split: TF-M uses the first 64 KiB (&sram0_s, reg 0x10000); the NS
112+
* workload uses the remainder (&sram0_ns). These sizes must match the TF-M platform RAM
113+
* layout for nRF54LM20.
114+
*/
115+
&cpuapp_sram {
116+
reg = <0x20000000 0x7fe40>;
117+
ranges = <0x0 0x20000000 0x7fe40>;
118+
};
119+
120+
&sram0_s {
121+
reg = <0x0 0x10000>;
122+
ranges = <0x0 0x0 0x10000>;
123+
};
124+
125+
&sram0_ns {
126+
reg = <0x10000 0x6fe40>;
127+
ranges = <0x0 0x10000 0x6fe40>;
16128
};
17129

18130
/*

samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,22 @@ CONFIG_DOWNLOADER_STACK_SIZE=4096
103103
CONFIG_SPI=y
104104
CONFIG_SPI_NOR=y
105105
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
106-
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
107106

108107
# TLS credentials
109108
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y
110109

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

116123
# Enable LTO to save flash memory
117124
CONFIG_LTO=y

0 commit comments

Comments
 (0)