Skip to content

Commit 93b2cce

Browse files
committed
app: Enable DTS partitions
Replace Partition Manager with DTS partitions. Added overlay-trace-backend.overlay - Adds sram partition for traces - Moves application non-secure sram partition Added overlay-carrier.overlay - Adds NVS flash partition for Carrier library Added overlay-disable-b0.overlay - Disables B0 flash partition - Moves MCUboot and application flash partitions Added overlay-full-fota.overlay - Enlarges flash and sram partitions for TF-M - Adds flash partitions for TF-M ITS, PS, and non-volatile counters - Moves application flash and sram partitions - Trace sram partition enabled by default Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
1 parent 46f9a0a commit 93b2cce

20 files changed

Lines changed: 903 additions & 448 deletions

app/boards/nrf9151dk_nrf9151_ns.overlay

Lines changed: 144 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/ {
88
chosen {
99
ncs,sm-uart = &dtr_uart0;
10-
nordic,pm-ext-flash = &gd25wb256;
1110
zephyr,console = &uart1;
1211
};
1312
};
@@ -78,3 +77,147 @@
7877
status = "okay";
7978
current-speed = <1000000>;
8079
};
80+
81+
/*
82+
* Flash partition layout for nRF9151 DK (same with B0, MCUboot and application):
83+
*
84+
* 0x0000_0000 b0 (NSIB) ( 32 kB)
85+
* 0x0000_8000 s0 (MCUBoot image, slot 0) ( 48 kB)
86+
* 0x0001_4000 s1 (MCUBoot image, slot 1) ( 48 kB)
87+
* 0x0002_0000 slot0 (primary app) (444 kB)
88+
* 0x0002_0000 TF-M secure ( 32 kB)
89+
* 0x0002_8000 Application (non-secure) (412 kB - (MCUBoot swap sector + MCUboot trailer))
90+
* 0x0008_f000 slot1 (secondary app) (440 kB)
91+
* 0x000f_d000 Non-secure storage ( 12 kB)
92+
*/
93+
94+
/delete-node/ &boot_partition;
95+
/delete-node/ &slot0_partition;
96+
/delete-node/ &slot1_partition;
97+
/delete-node/ &tfm_ps_partition;
98+
/delete-node/ &tfm_its_partition;
99+
/delete-node/ &tfm_otp_partition;
100+
/delete-node/ &storage_partition;
101+
102+
&flash0 {
103+
partitions {
104+
compatible = "fixed-partitions";
105+
106+
b0_partition: partition@0 {
107+
label = "b0";
108+
reg = <0x0 0x8000>;
109+
};
110+
111+
s0_partition: boot_partition: partition@8000 {
112+
label = "mcuboot-0";
113+
reg = <0x8000 0xc000>;
114+
};
115+
116+
s1_partition: partition@14000 {
117+
label = "mcuboot-1";
118+
reg = <0x14000 0xc000>;
119+
};
120+
121+
slot0_partition: partition@20000 {
122+
compatible = "fixed-subpartitions";
123+
label = "image-0";
124+
reg = <0x20000 0x6f000>;
125+
ranges = <0x0 0x20000 0x6f000>;
126+
#address-cells = <1>;
127+
#size-cells = <1>;
128+
129+
slot0_s_partition: partition@0 {
130+
label = "image-0-secure";
131+
reg = <0x0 0x8000>;
132+
};
133+
134+
slot0_ns_partition: partition@8000 {
135+
label = "image-0-nonsecure";
136+
reg = <0x8000 0x67000>;
137+
};
138+
};
139+
140+
slot1_partition: partition@8f000 {
141+
compatible = "fixed-subpartitions";
142+
label = "image-1";
143+
reg = <0x8f000 0x6e000>;
144+
ranges = <0x0 0x8f000 0x6e000>;
145+
#address-cells = <1>;
146+
#size-cells = <1>;
147+
148+
slot1_s_partition: partition@0 {
149+
label = "image-1-secure";
150+
reg = <0x0 0x8000>;
151+
};
152+
153+
slot1_ns_partition: partition@8000 {
154+
label = "image-1-nonsecure";
155+
reg = <0x8000 0x66000>;
156+
};
157+
};
158+
159+
nonsecure_storage: storage_partition: partition@fd000 {
160+
label = "nonsecure-storage";
161+
reg = <0xfd000 0x3000>;
162+
};
163+
};
164+
};
165+
166+
/*
167+
* Application SRAM layout for nRF9151 DK:
168+
*
169+
* 0x2000_0000 Secure RAM ( 16 kB)
170+
* 0x2000_4000 Non-secure RAM area ( 240 kB)
171+
* 0x2000_4000 Modem shared area ( 34 kB)
172+
* 0x2000_4000 control (1832 B)
173+
* 0x2000_4728 app -> cell (8408 B)
174+
* 0x2000_6000 cell -> app ( 8 kB)
175+
* 0x2000_8800 Application RAM ( 222 kB)
176+
*/
177+
178+
/delete-node/ &sram0_s;
179+
/delete-node/ &sram0_ns;
180+
181+
&sram0 {
182+
183+
sram0_s: sram@0 {
184+
reg = <0x0 0x4000>;
185+
};
186+
187+
sram0_ns: sram@4000 {
188+
reg = <0x4000 0x3c000>;
189+
#address-cells = <1>;
190+
#size-cells = <1>;
191+
ranges = <0x0 0x4000 0x3c000>;
192+
193+
/* Must be in first 128 kB of RAM. */
194+
sram0_ns_modem: sram0_ns@0 {
195+
/* Modem (shared) memory */
196+
reg = <0x0 0x4800>;
197+
#address-cells = <1>;
198+
#size-cells = <1>;
199+
ranges = <0x0 0x0 0x4800>;
200+
201+
cpuapp_cpucell_ipc_shm_ctrl: sram0_ns_modem@0 {
202+
/* Modem IPC control */
203+
reg = <0x0 0x728>;
204+
};
205+
206+
cpuapp_cpucell_ipc_shm_heap: sram0_ns_modem@728 {
207+
/* Modem IPC transmit */
208+
reg = <0x728 0x20d8>;
209+
};
210+
211+
cpucell_cpuapp_ipc_shm_heap: sram0_ns_modem@2800 {
212+
/* Modem IPC receive */
213+
reg = <0x2800 0x2000>;
214+
};
215+
216+
};
217+
218+
sram0_ns_app: sram0_ns@4800 {
219+
/* Non-Secure application memory */
220+
reg = <0x4800 0x37800>;
221+
};
222+
};
223+
};

app/overlay-carrier.overlay

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*
6+
* Flash partition overlay for nRF9151DK with LwM2M carrier partition.
7+
*/
8+
9+
/ {
10+
chosen {
11+
lwm2m_carrier = &lwm2m_carrier;
12+
};
13+
};
14+
15+
/delete-node/ &nonsecure_storage;
16+
17+
&flash0 {
18+
partitions {
19+
20+
nonsecure_storage: storage_partition: partition@fd000 {
21+
label = "nonsecure-storage";
22+
reg = <0xfd000 0x2000>;
23+
};
24+
25+
lwm2m_carrier: partition@ff000 {
26+
label = "lwm2m-carrier";
27+
reg = <0xff000 0x1000>;
28+
};
29+
};
30+
};

app/overlay-disable-b0.overlay

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*
6+
* Flash partition layout for nRF9151 DK with MCUBoot.
7+
*
8+
* 0x0000_0000 s0 (MCUBoot image, slot 0) ( 64 kB)
9+
* 0x0001_0000 slot0 (primary app) (472 kB)
10+
* 0x0001_0000 TF-M secure ( 32 kB)
11+
* 0x0001_8000 Application (non-secure) (440 kB - (MCUBoot swap sector + MCUboot trailer))
12+
* 0x0008_6000 slot1 (secondary app) (472 kB)
13+
* 0x000f_c000 Non-secure storage ( 16 kB)
14+
*/
15+
16+
/delete-node/ &b0_partition;
17+
/delete-node/ &s0_partition;
18+
/delete-node/ &s1_partition;
19+
/delete-node/ &slot0_partition;
20+
/delete-node/ &slot1_partition;
21+
/delete-node/ &nonsecure_storage;
22+
23+
&flash0 {
24+
partitions {
25+
s0_partition: boot_partition: partition@0 {
26+
label = "mcuboot-0";
27+
reg = <0x0 0x10000>;
28+
};
29+
30+
slot0_partition: partition@10000 {
31+
compatible = "fixed-subpartitions";
32+
label = "image-0";
33+
reg = <0x10000 0x76000>;
34+
ranges = <0x0 0x10000 0x76000>;
35+
#address-cells = <1>;
36+
#size-cells = <1>;
37+
38+
slot0_s_partition: partition@0 {
39+
label = "image-0-secure";
40+
reg = <0x0 0x8000>;
41+
};
42+
43+
slot0_ns_partition: partition@8000 {
44+
label = "image-0-nonsecure";
45+
reg = <0x8000 0x6e000>;
46+
};
47+
};
48+
49+
slot1_partition: partition@86000 {
50+
compatible = "fixed-subpartitions";
51+
label = "image-1";
52+
reg = <0x86000 0x76000>;
53+
ranges = <0x0 0x86000 0x76000>;
54+
#address-cells = <1>;
55+
#size-cells = <1>;
56+
57+
slot1_s_partition: partition@0 {
58+
label = "image-1-secure";
59+
reg = <0x0 0x8000>;
60+
};
61+
62+
slot1_ns_partition: partition@8000 {
63+
label = "image-1-nonsecure";
64+
reg = <0x8000 0x6e000>;
65+
};
66+
};
67+
68+
nonsecure_storage: storage_partition: partition@fc000 {
69+
label = "nonsecure-storage";
70+
reg = <0xfc000 0x4000>;
71+
};
72+
};
73+
};

0 commit comments

Comments
 (0)