From 66c5939dea0e36f5150974c07b6ba6d43cc1d461 Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Wed, 9 Jul 2025 11:43:39 +0200 Subject: [PATCH 1/2] doc: Add support for nRF52840 dongle bare variant Add a documentation, describing nRF52840 dongle bare variant. Signed-off-by: Tomasz Chyrowicz --- doc/nrf/app_dev/board_names.rst | 28 ++++++++++++++----- doc/nrf/app_dev/device_guides/nrf52/index.rst | 3 +- doc/nrf/includes/sample_board_rows.txt | 4 +++ west.yml | 4 +-- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/doc/nrf/app_dev/board_names.rst b/doc/nrf/app_dev/board_names.rst index 33b78130f269..669f20b34277 100644 --- a/doc/nrf/app_dev/board_names.rst +++ b/doc/nrf/app_dev/board_names.rst @@ -46,15 +46,27 @@ While the board name is always present, other elements, such as the board revisi Check the Product Specification of the given SoC for more information about the available CPU clusters. * :ref:`Variant ` - You can use this board qualifier to build for a particular type or configuration of a build for a combination of SoC and CPU cluster. - In the |NCS|, variants are used for indicating the usage of Cortex-M Security Extensions (CMSE) (security by separation): + In the |NCS|, board variants are used for the following purposes: - * Entries without ``*/ns`` (for example, ``cpuapp``) - When you choose this target, you build the application core firmware as a single execution environment that does not use CMSE (:ref:`Trusted Firmware-M (TF-M) `). - * Entries with ``*/ns`` (for example, ``cpuapp/ns``) - Recommended for more security. - When you choose this target, you build the application with CMSE using security by separation. - The application core firmware is placed in Non-Secure Processing Environment (NSPE) and uses Secure Processing Environment (SPE) for security features. - By default, the build system automatically includes :ref:`Trusted Firmware-M (TF-M) ` in SPE and merges it with NSPE. + * Changing the default memory map: + This applies to the entry for the nRF52840 Dongle with the ``*/bare`` variant (``nrf52840dongle/nrf52840/bare``). + When you select this target, the firmware does not account for the onboard USB bootloader. + This corresponds to using :zephyr:board:`flashing option 3 with an external debug probe `. - Read more about separation of processing environments on the :ref:`ug_tfm_security_by_separation` page. + * Indicating the use of Cortex-M Security Extensions (CMSE), also known as security by separation: + + * Variants without ``*/ns`` (for example, ``cpuapp``): + When you select this target, you build the application core firmware as a single execution environment without CMSE. + See :ref:`Trusted Firmware-M (TF-M) ` for more information. + + * Variants with ``*/ns`` (for example, ``cpuapp/ns``): + Recommended for enhanced security. + When you select this target, you build the application with CMSE enabled, using security by separation. + + The application core firmware is placed in Non-Secure Processing Environment (NSPE) and uses Secure Processing Environment (SPE) for security features. + By default, the build system automatically includes :ref:`Trusted Firmware-M (TF-M) ` in SPE and merges it with NSPE. + + Read more about separation of processing environments on the :ref:`ug_tfm_security_by_separation` page. .. note:: This board name scheme was introduced in the |NCS| before the v2.7.0 release following changes in Zephyr v3.6.0. @@ -125,6 +137,8 @@ Also see the :ref:`zephyr:boards` section in the Zephyr documentation. | | | :ref:`nrf52840dk ` | ``nrf52840dk/nrf52811`` | +-------------------+------------+-----------------------------------------------------+-----------------------------------------------------------------------+ | nRF52840 Dongle | PCA10059 | :zephyr:board:`nrf52840dongle ` | ``nrf52840dongle/nrf52840`` | +| | | | | +| | | | ``nrf52840dongle/nrf52840/bare`` | +-------------------+------------+-----------------------------------------------------+-----------------------------------------------------------------------+ | nRF52833 DK | PCA10100 | :zephyr:board:`nrf52833dk ` | ``nrf52833dk/nrf52833`` | | | | | | diff --git a/doc/nrf/app_dev/device_guides/nrf52/index.rst b/doc/nrf/app_dev/device_guides/nrf52/index.rst index 55a30318694a..6f5f0752275a 100644 --- a/doc/nrf/app_dev/device_guides/nrf52/index.rst +++ b/doc/nrf/app_dev/device_guides/nrf52/index.rst @@ -55,7 +55,8 @@ Zephyr and the |NCS| provide support and contain board definitions for developin - `Product Specification `_ * - :zephyr:board:`nrf52840dongle` - PCA10059 - - ``nrf52840dongle/nrf52840`` + - | ``nrf52840dongle/nrf52840`` + | ``nrf52840dongle/nrf52840/bare`` - | `Product Specification `_ | `User Guide `_ * - :zephyr:board:`nrf21540dk` diff --git a/doc/nrf/includes/sample_board_rows.txt b/doc/nrf/includes/sample_board_rows.txt index 0d23750ec7b3..c39b93b59281 100644 --- a/doc/nrf/includes/sample_board_rows.txt +++ b/doc/nrf/includes/sample_board_rows.txt @@ -14,6 +14,10 @@ | :ref:`nRF52840 Dongle ` | PCA10059 | :zephyr:board:`nrf52840dongle ` | ``nrf52840dongle/nrf52840`` | +.. nrf52840dongle_nrf52840_bare + +| nRF52840 Dongle (:ref:`variant without onboard USB bootloader `) | PCA10059 | :zephyr:board:`nrf52840dongle ` | ``nrf52840dongle/nrf52840/bare`` | + .. nrf9160dk_nrf9160 | :ref:`nRF9160 DK ` | PCA10090 | :ref:`nrf9160dk ` | ``nrf9160dk/nrf9160`` | diff --git a/west.yml b/west.yml index 0fd14808b61f..60f41cf4834e 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 476ad665287a8b92e90ba1ec9a1ebd3241018b7a + revision: pull/3007/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -128,7 +128,7 @@ manifest: compare-by-default: true - name: mcuboot repo-path: sdk-mcuboot - revision: 1b1a37fb7abf8b6e5f7d1e05daacd0081ce2844e + revision: pull/469/head path: bootloader/mcuboot - name: qcbor url: https://github.com/laurencelundblade/QCBOR From 49b3378da31050bff6d9c725db383fd3b2f4ee5a Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Wed, 9 Jul 2025 12:55:50 +0200 Subject: [PATCH 2/2] applications: Do not unset nRF5 bootloader Remove override for (now promptless) Kconfig. Remove the override to ROM_START_OFFSET, which is already changes if the partition manager is enabled. Signed-off-by: Tomasz Chyrowicz --- applications/nrf_desktop/board_configuration.rst | 3 +++ .../configuration/nrf52840dongle_nrf52840/images/b0/prj.conf | 2 -- .../nrf52840dongle_nrf52840/images/b0/prj_3bleconn.conf | 2 -- .../nrf52840dongle_nrf52840/images/b0/prj_4llpmconn.conf | 2 -- .../nrf52840dongle_nrf52840/images/b0/prj_release.conf | 2 -- .../images/b0/prj_release_4llpmconn.conf | 2 -- .../configuration/nrf52840dongle_nrf52840/pm_static.yml | 3 +++ .../nrf52840dongle_nrf52840/pm_static_3bleconn.yml | 3 +++ .../nrf52840dongle_nrf52840/pm_static_4llpmconn.yml | 3 +++ .../nrf52840dongle_nrf52840/pm_static_release.yml | 3 +++ .../nrf52840dongle_nrf52840/pm_static_release_4llpmconn.yml | 3 +++ .../nrf_desktop/configuration/nrf52840dongle_nrf52840/prj.conf | 3 --- .../configuration/nrf52840dongle_nrf52840/prj_3bleconn.conf | 3 --- .../configuration/nrf52840dongle_nrf52840/prj_4llpmconn.conf | 3 --- .../configuration/nrf52840dongle_nrf52840/prj_release.conf | 3 --- .../nrf52840dongle_nrf52840/prj_release_4llpmconn.conf | 3 --- 16 files changed, 18 insertions(+), 25 deletions(-) diff --git a/applications/nrf_desktop/board_configuration.rst b/applications/nrf_desktop/board_configuration.rst index 6bc49f157bc7..4904f9adb637 100644 --- a/applications/nrf_desktop/board_configuration.rst +++ b/applications/nrf_desktop/board_configuration.rst @@ -93,6 +93,9 @@ nRF52840 USB Dongle (``nrf52840dongle/nrf52840``) and nRF52833 USB Dongle (``nrf * Bluetooth uses Nordic Semiconductor's SoftDevice link layer and is configured to act as a central. Input data comes from Bluetooth and is retransmitted to USB. * The configuration with the B0 bootloader is set as default for the ``nrf52840dongle/nrf52840`` board and with the MCUboot bootloader is set as default for the ``nrf52833dongle`` board. + * The nRF5 MBR partition (``nrf5_mbr``) added by the ``nrf52840dongle/nrf52840`` board is not used. + It is statically defined with address and size both set to zero to prevent Partition Manager from trying to place it dynamically. + The application did not switch to the ``bare`` board variant to keep backwards compatibility. nRF52820 USB Dongle (``nrf52820dongle``) * The application is configured to act as a dongle that forwards data from both mouse and keyboard. diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj.conf index 24e531697d56..8064623bb2bd 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj.conf @@ -40,8 +40,6 @@ CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ASSERT=n -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - # Use minimal C library instead of the Picolib CONFIG_MINIMAL_LIBC=y diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_3bleconn.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_3bleconn.conf index 24e531697d56..8064623bb2bd 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_3bleconn.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_3bleconn.conf @@ -40,8 +40,6 @@ CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ASSERT=n -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - # Use minimal C library instead of the Picolib CONFIG_MINIMAL_LIBC=y diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_4llpmconn.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_4llpmconn.conf index 24e531697d56..8064623bb2bd 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_4llpmconn.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_4llpmconn.conf @@ -40,8 +40,6 @@ CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ASSERT=n -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - # Use minimal C library instead of the Picolib CONFIG_MINIMAL_LIBC=y diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release.conf index 57988ce9b55e..2aec5cc33de1 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release.conf @@ -40,8 +40,6 @@ CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ASSERT=n -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - # Use minimal C library instead of the Picolib CONFIG_MINIMAL_LIBC=y diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release_4llpmconn.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release_4llpmconn.conf index 57988ce9b55e..2aec5cc33de1 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release_4llpmconn.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/images/b0/prj_release_4llpmconn.conf @@ -40,8 +40,6 @@ CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_ASSERT=n -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - # Use minimal C library instead of the Picolib CONFIG_MINIMAL_LIBC=y diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static.yml b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static.yml index 161188eeac70..da460342ddfa 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static.yml +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static.yml @@ -38,3 +38,6 @@ s1_image: settings_storage: address: 0xfe000 size: 0x2000 +nrf5_mbr: + address: 0x0 + size: 0x0 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_3bleconn.yml b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_3bleconn.yml index 161188eeac70..da460342ddfa 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_3bleconn.yml +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_3bleconn.yml @@ -38,3 +38,6 @@ s1_image: settings_storage: address: 0xfe000 size: 0x2000 +nrf5_mbr: + address: 0x0 + size: 0x0 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_4llpmconn.yml b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_4llpmconn.yml index 161188eeac70..da460342ddfa 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_4llpmconn.yml +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_4llpmconn.yml @@ -38,3 +38,6 @@ s1_image: settings_storage: address: 0xfe000 size: 0x2000 +nrf5_mbr: + address: 0x0 + size: 0x0 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release.yml b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release.yml index 161188eeac70..da460342ddfa 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release.yml +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release.yml @@ -38,3 +38,6 @@ s1_image: settings_storage: address: 0xfe000 size: 0x2000 +nrf5_mbr: + address: 0x0 + size: 0x0 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release_4llpmconn.yml b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release_4llpmconn.yml index 161188eeac70..da460342ddfa 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release_4llpmconn.yml +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/pm_static_release_4llpmconn.yml @@ -38,3 +38,6 @@ s1_image: settings_storage: address: 0xfe000 size: 0x2000 +nrf5_mbr: + address: 0x0 + size: 0x0 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj.conf index c8a9b6d961d4..b780f9cf4f34 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj.conf @@ -36,9 +36,6 @@ CONFIG_DESKTOP_BLE_QOS_ENABLE=y ################################################################################ # Zephyr Configuration -CONFIG_ROM_START_OFFSET=0 -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1280 CONFIG_MAIN_STACK_SIZE=840 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_3bleconn.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_3bleconn.conf index 12910a637cee..480ba5ea1cd0 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_3bleconn.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_3bleconn.conf @@ -47,9 +47,6 @@ CONFIG_DESKTOP_BLE_QOS_ENABLE=y ################################################################################ # Zephyr Configuration -CONFIG_ROM_START_OFFSET=0 -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1280 CONFIG_MAIN_STACK_SIZE=840 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_4llpmconn.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_4llpmconn.conf index a77fd9f7282c..e894e7fa4e73 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_4llpmconn.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_4llpmconn.conf @@ -46,9 +46,6 @@ CONFIG_DESKTOP_BLE_QOS_ENABLE=y ################################################################################ # Zephyr Configuration -CONFIG_ROM_START_OFFSET=0 -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1280 CONFIG_MAIN_STACK_SIZE=840 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release.conf index 5c90497718a8..d2b11fdb984f 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release.conf @@ -34,9 +34,6 @@ CONFIG_DESKTOP_BLE_QOS_ENABLE=y ################################################################################ # Zephyr Configuration -CONFIG_ROM_START_OFFSET=0 -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1280 CONFIG_MAIN_STACK_SIZE=840 diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release_4llpmconn.conf b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release_4llpmconn.conf index 1bb1bd7684e0..165ef6ab9d97 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release_4llpmconn.conf +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/prj_release_4llpmconn.conf @@ -44,9 +44,6 @@ CONFIG_DESKTOP_BLE_QOS_ENABLE=y ################################################################################ # Zephyr Configuration -CONFIG_ROM_START_OFFSET=0 -CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n - CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 CONFIG_ISR_STACK_SIZE=1280 CONFIG_MAIN_STACK_SIZE=840