Skip to content

Commit 1d59812

Browse files
MarekPietakapi-no
authored andcommitted
applications: nrf_desktop: Add dongle_small config for nRF52833 DK
Change introduces `dongle_small` configuration for nRF52833 DK. The configuration is used to debug memory-tailored configurations used by dongles with small SoCs. Jira: NCSDK-31675 Signed-off-by: Marek Pieta <[email protected]> Signed-off-by: Divya Pillai <[email protected]>
1 parent 7910fc5 commit 1d59812

File tree

9 files changed

+279
-1
lines changed

9 files changed

+279
-1
lines changed

applications/nrf_desktop/board_configuration.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ Sample mouse, keyboard or dongle (``nrf52840dk/nrf52840``)
6565
Sample dongle (``nrf52833dk/nrf52833``)
6666
* The configuration uses the nRF52833 Development Kit.
6767
* The application is configured to act as a dongle that forwards data from both mouse and keyboard.
68-
* Bluetooth uses Nordic Semiconductor's SoftDevice link layer and is configured to act as a central.
68+
The dongle acts as a Bluetooth central.
6969
Input data comes from Bluetooth and is retransmitted to USB.
70+
* For most of the build types, Bluetooth uses Nordic Semiconductor's SoftDevice link layer.
71+
* The ``dongle_small`` configuration enables logs and mimics the dongle configuration used for small SoCs.
72+
The configuration is used to verify the correct behavior of the memory-tailored configurations.
7073
* The configuration with the MCUboot bootloader is set as default.
7174

7275
Sample dongle (``nrf52833dk/nrf52820``)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,bt-hci = &bt_hci_controller;
10+
};
11+
12+
/* Configure DTS nodes used for USB next HID support. */
13+
hid_dev_0: hid_dev_0 {
14+
compatible = "zephyr,hid-device";
15+
interface-name = "HID0";
16+
protocol-code = "none";
17+
in-polling-period-us = <1000>;
18+
in-report-size = <64>;
19+
};
20+
hid_dev_1: hid_dev_1 {
21+
compatible = "zephyr,hid-device";
22+
interface-name = "HID1";
23+
protocol-code = "none";
24+
in-polling-period-us = <1000>;
25+
in-report-size = <64>;
26+
};
27+
28+
gpioled0 {
29+
compatible = "gpio-leds";
30+
status = "okay";
31+
label = "LED System State";
32+
33+
led0_g: led_0 {
34+
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
35+
label = "Green LED 0";
36+
};
37+
};
38+
39+
gpioled1 {
40+
compatible = "gpio-leds";
41+
status = "okay";
42+
label = "LED Peer State";
43+
led1_g: led_1 {
44+
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
45+
label = "Green LED 1";
46+
};
47+
48+
};
49+
leds {
50+
status = "disabled";
51+
};
52+
};
53+
54+
55+
&usbd {
56+
compatible = "nordic,nrf-usbd";
57+
status = "okay";
58+
num-bidir-endpoints = <0>;
59+
num-in-endpoints = <4>;
60+
num-out-endpoints = <2>;
61+
num-isoin-endpoints = <0>;
62+
num-isoout-endpoints = <0>;
63+
};
64+
65+
&bt_hci_controller {
66+
status = "okay";
67+
};
68+
69+
&bt_hci_sdc {
70+
status = "disabled";
71+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
CONFIG_SIZE_OPTIMIZATIONS=y
8+
9+
CONFIG_HW_STACK_PROTECTION=y
10+
11+
CONFIG_SYSTEM_CLOCK_NO_WAIT=y
12+
13+
CONFIG_MAIN_STACK_SIZE=10240
14+
CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"
15+
16+
CONFIG_BOOT_BOOTSTRAP=n
17+
18+
CONFIG_FLASH=y
19+
CONFIG_FPROTECT=y
20+
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
21+
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
22+
23+
# Serial
24+
CONFIG_CONSOLE=n
25+
CONFIG_SERIAL=y
26+
CONFIG_UART_CONSOLE=n
27+
CONFIG_UART_NRFX=n
28+
CONFIG_UART_INTERRUPT_DRIVEN=y
29+
30+
# MCUBoot serial
31+
CONFIG_GPIO=y
32+
CONFIG_GPIO_NRFX_INTERRUPT=n
33+
CONFIG_MCUBOOT_SERIAL=y
34+
CONFIG_BOOT_SERIAL_CDC_ACM=y
35+
CONFIG_BOOT_SERIAL_UART=n
36+
37+
# Required by USB
38+
CONFIG_MULTITHREADING=y
39+
40+
# USB
41+
CONFIG_USB_DEVICE_MANUFACTURER="Nordic Semiconductor ASA"
42+
CONFIG_USB_DEVICE_PRODUCT="Bootloader nRF52 Desktop"
43+
CONFIG_USB_DEVICE_VID=0x1915
44+
CONFIG_USB_DEVICE_PID=0x52DF
45+
CONFIG_USB_DEVICE_STACK=y
46+
CONFIG_USB_DEVICE_REMOTE_WAKEUP=n
47+
CONFIG_USB_CDC_ACM=y
48+
49+
# Decrease memory footprint
50+
CONFIG_CBPRINTF_NANO=y
51+
CONFIG_UART_USE_RUNTIME_CONFIGURE=n
52+
CONFIG_UART_LINE_CTRL=n
53+
CONFIG_TIMESLICING=n
54+
CONFIG_BOOT_BANNER=n
55+
CONFIG_NCS_BOOT_BANNER=n
56+
57+
# Use minimal C library instead of the Picolib
58+
CONFIG_MINIMAL_LIBC=y
59+
60+
# Improve firmware reliability
61+
CONFIG_RESET_ON_FATAL_ERROR=y
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
mcuboot:
2+
address: 0x0
3+
size: 0xd000
4+
mcuboot_pad:
5+
address: 0xd000
6+
size: 0x200
7+
app:
8+
address: 0xd200
9+
size: 0x70e00
10+
mcuboot_primary:
11+
orig_span: &id001
12+
- mcuboot_pad
13+
- app
14+
span: *id001
15+
address: 0xd000
16+
size: 0x71000
17+
mcuboot_primary_app:
18+
orig_span: &id002
19+
- app
20+
span: *id002
21+
address: 0xd200
22+
size: 0x70e00
23+
settings_storage:
24+
address: 0x7e000
25+
size: 0x2000
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
# dongle_small: Dongle on small SoC version (with logs)
8+
#
9+
# The configuration mimics dongle configuration for small SoCs by using SW Split
10+
# link layer and enabling memory consumption optimizations. The configuration
11+
# also enables logs to simplify debugging.
12+
# Application Configuration
13+
14+
CONFIG_DESKTOP_INIT_LOG_MOTION_EVENT=n
15+
CONFIG_DESKTOP_INIT_LOG_HID_REPORT_EVENT=n
16+
CONFIG_DESKTOP_INIT_LOG_HID_REPORT_SENT_EVENT=n
17+
CONFIG_CAF_INIT_LOG_KEEP_ALIVE_EVENTS=n
18+
19+
CONFIG_CAF_BUTTONS=y
20+
CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y
21+
CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n
22+
23+
CONFIG_CAF_CLICK_DETECTOR=y
24+
25+
CONFIG_CAF_LEDS=y
26+
27+
CONFIG_DESKTOP_ROLE_HID_DONGLE=y
28+
CONFIG_DESKTOP_DEVICE_PID=0x52E1
29+
30+
CONFIG_DESKTOP_BLE_PEER_CONTROL=y
31+
CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000
32+
CONFIG_DESKTOP_BLE_NEW_PEER_SCAN_REQUEST=y
33+
CONFIG_DESKTOP_BLE_NEW_PEER_SCAN_ON_BOOT=y
34+
CONFIG_DESKTOP_BLE_PEER_ERASE=y
35+
36+
CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y
37+
38+
################################################################################
39+
# Zephyr Configuration
40+
41+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
42+
CONFIG_ISR_STACK_SIZE=1280
43+
CONFIG_MAIN_STACK_SIZE=840
44+
CONFIG_IDLE_STACK_SIZE=128
45+
CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
46+
CONFIG_BT_HCI_TX_STACK_SIZE=1536
47+
48+
# Reuse system workqueue as Bluetooth RX context to reduce memory consumption
49+
CONFIG_BT_RECV_WORKQ_SYS=y
50+
51+
CONFIG_BOOT_BANNER=n
52+
CONFIG_NCS_BOOT_BANNER=n
53+
54+
CONFIG_NUM_COOP_PRIORITIES=10
55+
CONFIG_NUM_PREEMPT_PRIORITIES=11
56+
CONFIG_TIMESLICING=n
57+
58+
CONFIG_HEAP_MEM_POOL_SIZE=1024
59+
60+
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
61+
CONFIG_SYSTEM_CLOCK_NO_WAIT=y
62+
63+
CONFIG_HW_STACK_PROTECTION=y
64+
CONFIG_RESET_ON_FATAL_ERROR=n
65+
66+
CONFIG_GPIO=y
67+
68+
CONFIG_REBOOT=y
69+
70+
CONFIG_SIZE_OPTIMIZATIONS=y
71+
72+
CONFIG_LED=y
73+
CONFIG_LED_GPIO=y
74+
75+
CONFIG_USB_NRFX_EVT_QUEUE_SIZE=16
76+
77+
CONFIG_BT_PRIVACY=y
78+
CONFIG_BT_LL_SW_SPLIT=y
79+
80+
# Optimize Bluetooth controller for size to reduce memory consumption
81+
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
82+
CONFIG_BT_CTLR_OPTIMIZE_FOR_SIZE=y
83+
84+
CONFIG_BT_BUF_ACL_TX_SIZE=35
85+
CONFIG_BT_CTLR_DATA_LENGTH_MAX=35
86+
CONFIG_BT_ATT_TX_COUNT=6
87+
88+
################################################################################
89+
90+
CONFIG_ASSERT=y
91+
CONFIG_ASSERT_LEVEL=2
92+
93+
CONFIG_DESKTOP_LOG=y
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
8+
SB_CONFIG_BOOTLOADER_MCUBOOT=y
9+
SB_CONFIG_MCUBOOT_MODE_SINGLE_APP=y
10+
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
11+
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private.pem"

applications/nrf_desktop/sample.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ tests:
6868
integration_platforms:
6969
- nrf52840dk/nrf52840
7070
extra_args: FILE_SUFFIX=wwcb
71+
applications.nrf_desktop.zdebug_dongle_small:
72+
build_only: true
73+
platform_allow: nrf52833dk/nrf52833
74+
integration_platforms:
75+
- nrf52833dk/nrf52833
76+
extra_args: FILE_SUFFIX=dongle_small
7177
applications.nrf_desktop.zdebug_fast_pair.gmouse.uart.kmu_provision:
7278
platform_allow:
7379
- nrf54l15dk/nrf54l10/cpuapp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ nRF Desktop
242242
* Application configurations for the nRF54L05 and nRF54L10 SoCs (emulated on the nRF54L15 DK).
243243
The configurations are supported through ``nrf54l15dk/nrf54l10/cpuapp`` and ``nrf54l15dk/nrf54l05/cpuapp`` board targets.
244244
For details, see the :ref:`nrf_desktop_board_configuration`.
245+
* The ``dongle_small`` configuration for the nRF52833 DK.
246+
The configuration enables logs and mimics the dongle configuration used for small SoCs.
245247

246248
nRF Machine Learning (Edge Impulse)
247249
-----------------------------------

scripts/quarantine_integration.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,12 @@
514514
- nrf52840dk/nrf52840
515515
comment: "Configurations excluded to limit resources usage in integration builds"
516516

517+
- scenarios:
518+
- applications.nrf_desktop.zdebug_dongle_small
519+
platforms:
520+
- nrf52833dk/nrf52833
521+
comment: "Configurations excluded to limit resources usage in integration builds"
522+
517523
- scenarios:
518524
- applications.nrf_desktop.zdebug_3bleconn
519525
- applications.nrf_desktop.zrelease_4llpmconn

0 commit comments

Comments
 (0)