Skip to content

Commit 908b07f

Browse files
travis3630rlubos
authored andcommitted
sample: dfu: smp_svr: add nrf7120-ns support to smpsvr sample
Add nrf7120-ns tfm-mcuboot integrated sample to smpsvr, the overlay file added in smp_svr contains full flash layout for a MCUBoot sample integrated with tfm. Where flash layout is includes boot partition, slot0, slot1, secure storage, non-secure storage. Slot 1 ad non secure storage are set as non secure. Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
1 parent abbbbf3 commit 908b07f

4 files changed

Lines changed: 137 additions & 1 deletion

File tree

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&cpuapp_mram {
8+
/delete-node/ partitions;
9+
};
10+
11+
&cpuapp_mram {
12+
/*
13+
* Default NVM layout on NRF7120 NS Application MCU with MCUBoot:
14+
*
15+
* 0x0000_0000 Boot Partition (64 KB)
16+
*
17+
* 0x0001_0000 Primary image area (1952 KB):
18+
* - 0x0001_0000 Secure image primary (192 KB)
19+
* - 0x0004_0000 Non-secure image primary (1760 KB)
20+
*
21+
* 0x001F_8000 Secondary image area (1952 KB):
22+
* - 0x001F_8000 Secure image secondary (192 KB)
23+
* - 0x0022_8000 Non-secure image secondary (1760 KB)
24+
*
25+
* 0x003E_0000 Protected Storage Area (16 KB)
26+
* 0x003E_4000 Internal Trusted Storage Area (16 KB)
27+
* 0x003E_8000 OTP / NV counters area (8 KB)
28+
*
29+
* 0x003E_A000 Non-secure storage, used when built with NRF_NS_STORAGE=ON,
30+
* otherwise unused (68 KB)
31+
*/
32+
partitions {
33+
#address-cells = <1>;
34+
#size-cells = <1>;
35+
ranges;
36+
37+
boot_partition: partition@0 {
38+
compatible = "zephyr,mapped-partition";
39+
label = "mcuboot";
40+
reg = <0x00000000 DT_SIZE_K(64)>;
41+
};
42+
43+
slot0_partition: partition@10000 {
44+
compatible = "zephyr,mapped-partition";
45+
label = "image-0";
46+
reg = <0x00010000 DT_SIZE_K(1952)>;
47+
ranges = <0x0 0x00010000 DT_SIZE_K(1952)>;
48+
#address-cells = <1>;
49+
#size-cells = <1>;
50+
51+
slot0_s_partition: partition@0 {
52+
compatible = "zephyr,mapped-partition";
53+
label = "image-0-secure";
54+
reg = <0x0 DT_SIZE_K(192)>;
55+
};
56+
57+
slot0_ns_partition: partition@30000 {
58+
compatible = "zephyr,mapped-partition";
59+
label = "image-0-nonsecure";
60+
reg = <0x30000 DT_SIZE_K(1760)>;
61+
};
62+
};
63+
64+
slot1_partition: partition@1f8000 {
65+
compatible = "zephyr,mapped-partition";
66+
label = "image-1";
67+
reg = <0x001f8000 DT_SIZE_K(1952)>;
68+
ranges = <0x0 0x001f8000 DT_SIZE_K(1952)>;
69+
#address-cells = <1>;
70+
#size-cells = <1>;
71+
72+
slot1_s_partition: partition@0 {
73+
compatible = "zephyr,mapped-partition";
74+
label = "image-1-secure";
75+
reg = <0x0 DT_SIZE_K(192)>;
76+
};
77+
78+
slot1_ns_partition: partition@30000 {
79+
compatible = "zephyr,mapped-partition";
80+
label = "image-1-nonsecure";
81+
reg = <0x30000 DT_SIZE_K(1760)>;
82+
};
83+
};
84+
85+
tfm_ps_partition: partition@3e0000 {
86+
compatible = "zephyr,mapped-partition";
87+
label = "tfm-ps";
88+
reg = <0x003e1000 DT_SIZE_K(16)>;
89+
};
90+
91+
tfm_its_partition: partition@3e4000 {
92+
compatible = "zephyr,mapped-partition";
93+
label = "tfm-its";
94+
reg = <0x003e5000 DT_SIZE_K(16)>;
95+
};
96+
97+
tfm_otp_partition: partition@3e8000 {
98+
compatible = "zephyr,mapped-partition";
99+
label = "tfm-otp";
100+
reg = <0x003e9000 DT_SIZE_K(8)>;
101+
};
102+
103+
storage_partition: partition@3ea000 {
104+
compatible = "zephyr,mapped-partition";
105+
label = "storage";
106+
reg = <0x003eb000 DT_SIZE_K(68)>;
107+
};
108+
};
109+
};
110+
111+
/ {
112+
chosen {
113+
zephyr,code-partition = &slot0_ns_partition;
114+
};
115+
};

samples/dfu/smp_svr/sample.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ tests:
5656
integration_platforms:
5757
- nrf54h20dk/nrf54h20/cpuapp
5858
- nrf54l15dk/nrf54l15/cpuapp
59+
60+
sample.dfu.smp_svr.serial.tfm_mcuboot:
61+
platform_allow:
62+
- nrf7120dk/nrf7120/cpuapp/ns
63+
sysbuild: true
64+
extra_args:
65+
- FILE_SUFFIX=tfm_mcuboot
66+
5967
sample.dfu.smp_svr.mcuboot_flags.direct_xip_withrevert:
6068
extra_args:
6169
- SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP_WITH_REVERT=y
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "../../../boards/nrf7120dk_nrf7120_cpuapp_ns.overlay"
8+
9+
/ {
10+
chosen {
11+
zephyr,code-partition = &boot_partition;
12+
};
13+
};

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ manifest:
6565
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
6666
- name: zephyr
6767
repo-path: sdk-zephyr
68-
revision: pull/4232/head
68+
revision: c76c5621f4f2083be82b5c8acbff9b0c3a80b67c
6969
import:
7070
# In addition to the zephyr repository itself, NCS also
7171
# imports the contents of zephyr/west.yml at the above

0 commit comments

Comments
 (0)