Skip to content

Commit cc9b887

Browse files
nvlsianpuDamian-Nordic
authored andcommitted
samples: bluetooth: central_uart: sign nRF54LM20 Dongle image
nRF54LM20 Dongle image needs to be signed to be programmable with nRF Util (that uses MCUBoot firmware loader mode). As for now, this implies that MCUBoot build must be enabled for the dongle. Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no> Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
1 parent f529e45 commit cc9b887

7 files changed

Lines changed: 148 additions & 0 deletions

samples/bluetooth/central_uart/Kconfig.sysbuild

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,29 @@ config NRF_DEFAULT_IPC_RADIO
1313
config NETCORE_IPC_RADIO_BT_HCI_IPC
1414
default y
1515

16+
config SAMPLE_NRF54LM20DONGLE_BOOTLOADER
17+
bool
18+
default y
19+
depends on BOARD_NRF54LM20DONGLE
20+
select MCUBOOT_MODE_FIRMWARE_UPDATER_BOOT_MODE_ENTRANCE
21+
select MCUBOOT_SIGNATURE_USING_KMU
22+
select MCUBOOT_GENERATE_DEFAULT_KEY_FILE
23+
select BOOT_SIGNATURE_TYPE_PURE
24+
25+
if SAMPLE_NRF54LM20DONGLE_BOOTLOADER
26+
27+
choice BOOTLOADER
28+
default BOOTLOADER_MCUBOOT
29+
endchoice
30+
31+
choice MCUBOOT_MODE
32+
default MCUBOOT_MODE_FIRMWARE_UPDATER
33+
endchoice
34+
35+
choice FIRMWARE_LOADER
36+
default FIRMWARE_LOADER_IMAGE_USB_MCUMGR
37+
endchoice
38+
39+
endif # SAMPLE_NRF54LM20DONGLE_BOOTLOADER
40+
1641
source "share/sysbuild/Kconfig"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* This file modifies RRAM partitioning for MCUboot and firmware loader by
8+
* extending slot0_partition (application image) to the end of RRAM.
9+
*
10+
* While the application may use extra partitions, such as storage_partition
11+
* defined by default, this partitioning of application-dedicated region is
12+
* irrelevant to the bootloader images.
13+
*/
14+
15+
/delete-node/ &storage_partition;
16+
17+
&slot0_partition {
18+
/* Start matches board layout */
19+
reg = <0x23000 DT_SIZE_K(1896)>;
20+
21+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Copyright (c) 2026 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
CONFIG_SYS_CLOCK_EXISTS=n
7+
CONFIG_NRF_GRTC_TIMER=n
8+
CONFIG_CRACEN_IKG=n
9+
CONFIG_FPROTECT=y
10+
11+
# Disable run-time CRACEN provisioning of TRNG data.
12+
# KMU slots 248, 249 shall be pre-provisioned while programming with secret TRNG values instead.
13+
CONFIG_CRACEN_PROVISION_PROT_RAM_INV_SLOTS_ON_INIT=n
14+
15+
CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=32
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,code-partition = &boot_partition;
10+
};
11+
};
12+
13+
/* ensure same RRAM layout in firmware_loader as in MCUboot */
14+
#include "../../../nrf54lm20dongle_dfu_partitions.dtsi"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
# Copyright (c) 2026 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
CONFIG_BOOT_FIRMWARE_LOADER_ENTRANCE_GPIO=y
8+
CONFIG_BOOT_FIRMWARE_LOADER_NO_APPLICATION=y
9+
10+
CONFIG_PM=n
11+
12+
CONFIG_MAIN_STACK_SIZE=10240
13+
14+
CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
15+
CONFIG_BOOT_ENCRYPT_IMAGE=n
16+
17+
CONFIG_BOOT_UPGRADE_ONLY=n
18+
CONFIG_BOOT_BOOTSTRAP=n
19+
20+
CONFIG_FLASH=y
21+
CONFIG_GPIO=y
22+
23+
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
24+
CONFIG_CBPRINTF_NANO=y
25+
### Use picolibc to reduce flash usage
26+
CONFIG_PICOLIBC=y
27+
### Disable malloc arena because we don't need it
28+
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=0
29+
30+
# Reduce memory consumption
31+
CONFIG_BOOT_BANNER=n
32+
CONFIG_NCS_BOOT_BANNER=n
33+
CONFIG_CLOCK_CONTROL=n
34+
CONFIG_NRF_GRTC_START_SYSCOUNTER=n
35+
CONFIG_SPI_NOR=n
36+
CONFIG_SERIAL=n
37+
CONFIG_CONSOLE=n
38+
CONFIG_UART_CONSOLE=n
39+
CONFIG_PRINTK=n
40+
CONFIG_USE_SEGGER_RTT=n
41+
42+
# Activate Link Time Optimization (LTO)
43+
CONFIG_LTO=y
44+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
45+
46+
# Improve debugging experience by disabling reset on fatal error
47+
CONFIG_RESET_ON_FATAL_ERROR=n
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_CDC_ACM_SERIAL_VID=0x1915
2+
CONFIG_CDC_ACM_SERIAL_PID=0x541A
3+
CONFIG_CDC_ACM_SERIAL_MANUFACTURER_STRING="Nordic Semiconductor ASA"
4+
CONFIG_CDC_ACM_SERIAL_PRODUCT_STRING="nRF54LM20 Dongle Bootloader"
5+
CONFIG_MCUMGR_GRP_ZBASIC_STORAGE_ERASE=n
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
/delete-property/ zephyr,console;
10+
/delete-property/ zephyr,shell-uart;
11+
/delete-property/ zephyr,bt-mon-uart;
12+
/delete-property/ zephyr,bt-c2h-uart;
13+
};
14+
};
15+
16+
&zephyr_udc0 {
17+
/delete-node/ board_cdc_acm_uart;
18+
};
19+
20+
/* ensure same RRAM layout in firmware_loader as in MCUboot */
21+
#include "../nrf54lm20dongle_dfu_partitions.dtsi"

0 commit comments

Comments
 (0)