Skip to content

Commit aa73fec

Browse files
committed
[nrf noup] smp_svr: nrf54h20dk serial sample
Add sample configuration for DFU over UART on nrf54h20dk_nrf54h20_cpuapp_iron board with MCUBoot support. Set as no-upstream beacuse of developmental stage of MCUBoot support on nrf54h20, in particular main dts file needs adjustments with simplified SDFW and there is no functional IPC for the moment. Signed-off-by: Michal Kozikowski <[email protected]>
1 parent a4c30ef commit aa73fec

File tree

7 files changed

+139
-0
lines changed

7 files changed

+139
-0
lines changed

boards/nordic/nrf54h20dk/Kconfig.defconfig

+7
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ config MAX_THREAD_BYTES
1717
default 3 if USERSPACE
1818

1919
endif # BOARD_NRF54H20DK_NRF54H20_CPURAD
20+
21+
if BOARD_NRF54H20DK_NRF54H20_CPUAPP_IRON
22+
23+
config ROM_START_OFFSET
24+
default 0x800 if BOOTLOADER_MCUBOOT
25+
26+
endif # BOARD_NRF54H20DK_NRF54H20_CPUAPP_IRON
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/delete-node/&cpuapp_slot0_partition;
8+
9+
/ {
10+
chosen {
11+
zephyr,code-partition = &slot0_partition;
12+
zephyr,uart-mcumgr = &uart136;
13+
};
14+
};
15+
16+
&mram1x {
17+
cpuapp_rx_partitions: cpuapp-rx-partitions {
18+
boot_partition: partition@2c000 {
19+
label = "mcuboot";
20+
reg = <0x2c000 DT_SIZE_K(64)>;
21+
};
22+
23+
slot0_partition: partition@3c000 {
24+
label = "image-0";
25+
reg = <0x3c000 DT_SIZE_K(200)>;
26+
};
27+
28+
slot1_partition: partition@6E000 {
29+
label = "image-1";
30+
reg = <0x6E000 DT_SIZE_K(200)>;
31+
};
32+
};
33+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Enable MCUmgr and dependencies.
2+
CONFIG_NET_BUF=y
3+
CONFIG_ZCBOR=y
4+
CONFIG_CRC=y
5+
CONFIG_MCUMGR=y
6+
CONFIG_STREAM_FLASH=y
7+
CONFIG_FLASH_MAP=y
8+
9+
# Some command handlers require a large stack.
10+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
11+
CONFIG_MAIN_STACK_SIZE=2176
12+
13+
# Ensure an MCUboot-compatible binary is generated.
14+
CONFIG_BOOTLOADER_MCUBOOT=y
15+
16+
# Enable flash operations.
17+
CONFIG_FLASH=y
18+
19+
# Required by the `taskstat` command.
20+
CONFIG_THREAD_MONITOR=y
21+
22+
# Support for taskstat command
23+
CONFIG_MCUMGR_GRP_OS_TASKSTAT=y
24+
25+
# Enable statistics and statistic names.
26+
CONFIG_STATS=y
27+
CONFIG_STATS_NAMES=y
28+
29+
# Enable most core commands.
30+
CONFIG_FLASH=y
31+
CONFIG_IMG_MANAGER=y
32+
CONFIG_MCUMGR_GRP_IMG=y
33+
CONFIG_MCUMGR_GRP_OS=y
34+
CONFIG_MCUMGR_GRP_STAT=y
35+
36+
# Enable logging
37+
CONFIG_LOG=y
38+
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y
39+
40+
# Disable debug logging
41+
CONFIG_LOG_MAX_LEVEL=3
42+
43+
# Disable GPD because no IPC is enabled in SSDFW
44+
CONFIG_SOC_NRF54H20_GPD=n
45+
CONFIG_PM=n
46+
47+
# If cpusec_cpuapp_ipc node is present in dtc, it automatically enables canonical ZCBOR encoding.
48+
# Canonical ZCBOR encoding needs legacy RC behaviour to work with mcumgr-client and other PC tools.
49+
# When tools are updated, this can be removed.
50+
CONFIG_MCUMGR_SMP_LEGACY_RC_BEHAVIOUR=y

samples/subsys/mgmt/mcumgr/smp_svr/sample.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,14 @@ tests:
225225
- nrf5340dk/nrf5340/cpuapp
226226
integration_platforms:
227227
- nrf5340dk/nrf5340/cpuapp
228+
sample.mcumgr.smp_svr.serial.nrf54h20dk:
229+
extra_args:
230+
- FILE_SUFFIX=nrf54h20
231+
- EXTRA_CONF_FILE="overlay-serial.conf"
232+
- SB_CONFIG_PARTITION_MANAGER=n
233+
- SB_CONFIG_SUIT_MPI_GENERATE=n
234+
- SB_CONFIG_SUIT_ENVELOPE=n
235+
platform_allow:
236+
- nrf54h20dk/nrf54h20/cpuapp/iron
237+
integration_platforms:
238+
- nrf54h20dk/nrf54h20/cpuapp/iron

samples/subsys/mgmt/mcumgr/smp_svr/sysbuild/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ if("${FILE_SUFFIX}" STREQUAL "ram_load")
44
set(mcuboot_EXTRA_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/nrf52840dk_nrf52840_mcuboot_ram_load.overlay" CACHE INTERNAL "" FORCE)
55
endif()
66

7+
if("${FILE_SUFFIX}" STREQUAL "nrf54h20")
8+
set(mcuboot_EXTRA_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/nrf54h20dk_nrf54h20_mcuboot_cpuapp_iron.overlay" CACHE INTERNAL "" FORCE)
9+
endif()
10+
711
find_package(Sysbuild REQUIRED HINTS $ENV{ZEPHYR_BASE})
812

913
project(sysbuild LANGUAGES)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/delete-node/&cpuapp_slot0_partition;
8+
9+
/ {
10+
chosen {
11+
zephyr,code-partition = &boot_partition;
12+
zephyr,uart-mcumgr = &uart136;
13+
};
14+
};
15+
16+
&mram1x {
17+
cpuapp_rx_partitions: cpuapp-rx-partitions {
18+
boot_partition: partition@2c000 {
19+
label = "mcuboot";
20+
reg = <0x2c000 DT_SIZE_K(64)>;
21+
};
22+
23+
slot0_partition: partition@3c000 {
24+
label = "image-0";
25+
reg = <0x3c000 DT_SIZE_K(200)>;
26+
};
27+
28+
slot1_partition: partition@6E000 {
29+
label = "image-1";
30+
reg = <0x6E000 DT_SIZE_K(200)>;
31+
};
32+
};
33+
};

soc/nordic/nrf54h/Kconfig.soc

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config SOC_NRF54H20_CPUFLPR
3535

3636
config SOC_NRF54H20_IRON
3737
bool
38+
select EXPERIMENTAL
3839
help
3940
Indicates that local domain firmware is compatible with Nordic IRONside SE.
4041

0 commit comments

Comments
 (0)