Skip to content

USB CDC ACM serial firmware loader + dfu/single_slot sample project integration#27185

Merged
nvlsianpu merged 7 commits into
nrfconnect:mainfrom
nvlsianpu:usb_fw_loader
Mar 27, 2026
Merged

USB CDC ACM serial firmware loader + dfu/single_slot sample project integration#27185
nvlsianpu merged 7 commits into
nrfconnect:mainfrom
nvlsianpu:usb_fw_loader

Conversation

@nvlsianpu
Copy link
Copy Markdown
Contributor

@nvlsianpu nvlsianpu commented Feb 24, 2026

  • added USB CDC-ACM Virtual port firmware loader basing on SMP MCUmgr.
  • a sysbuild project can select this firmware loader instance using SB_CONFIG_FIRMWARE_LOADER_IMAGE_USB_MCUMGR=y
  • added configuration with this loader for nRF54lm20DK to the dfu/single_slot sample.

ref.: NCSDK-37252

next steep PR:
dfu/single_slot: Application entering fw_loader via USB MCUmgr

@NordicBuilder NordicBuilder added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Feb 24, 2026
@NordicBuilder
Copy link
Copy Markdown
Contributor

NordicBuilder commented Feb 24, 2026

CI Information

To view the history of this post, click the 'edited' button above
Build number: 38

Inputs:

Sources:

sdk-nrf: PR head: ff3782b4ad4744a5075854023d5990f60a949ced

more details

sdk-nrf:

PR head: ff3782b4ad4744a5075854023d5990f60a949ced
merge base: 620b4c310b8cf584dacc859356c215b1deadf214
target head (main): 929c3b20559a2976619646dda17684ce9a7f9b89
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (13)
doc
│  ├── nrf
│  │  ├── links.txt
│  │  ├── releases_and_maturity
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
samples
│  ├── dfu
│  │  ├── fw_loader
│  │  │  ├── usb_mcumgr
│  │  │  │  ├── CMakeLists.txt
│  │  │  │  ├── README.rst
│  │  │  │  ├── app.overlay
│  │  │  │  ├── boards
│  │  │  │  │  │ nrf54lm20dk_nrf54lm20a_cpuapp.overlay
│  │  │  │  ├── prj.conf
│  │  │  │  ├── sample.yaml
│  │  │  │  │ sysbuild.conf
│  │  ├── single_slot
│  │  │  ├── README.rst
│  │  │  ├── sample.yaml
│  │  │  │ sysbuild_usb.conf
sysbuild
│  │ Kconfig.firmware_loader

Outputs:

Toolchain

Version: 911f4c5c26
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:911f4c5c26_5ea73affbf

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister - Skipped: Skipping Build & Test as it succeeded in a previous run: 37
  • ✅ Integration tests
    • ✅ test-sdk-audio - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ desktop52_verification - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-apps - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test_ble_nrf_config - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ble_mesh - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ble_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-chip - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nfc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_libmodem-nrf - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_lwm2m - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_thingy91 - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_crypto - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rpc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rs - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-fem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-tfm - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-thread-main - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-find-my - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_lrcs_mosh - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_lrcs_positioning - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-low-level - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-mcuboot - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-dfu - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ps-main - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-secdom-samples-public - Skipped: Job was skipped as it succeeded in a previous run

Note: This message is automatically posted and updated by the CI

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 24, 2026

@NordicBuilder NordicBuilder added the doc-required PR must not be merged without tech writer approval. label Feb 25, 2026
@nvlsianpu nvlsianpu changed the title Usb fw loader [WIP] USB CDC ACM serial firmware loader Feb 25, 2026
@nvlsianpu nvlsianpu changed the title [WIP] USB CDC ACM serial firmware loader [WIP, Do Not Review] USB CDC ACM serial firmware loader Feb 25, 2026
@nvlsianpu nvlsianpu force-pushed the usb_fw_loader branch 5 times, most recently from 3072221 to 189ffda Compare February 26, 2026 13:52
@nvlsianpu nvlsianpu marked this pull request as ready for review February 26, 2026 14:33
@nvlsianpu nvlsianpu requested review from a team as code owners February 26, 2026 14:33
@nvlsianpu nvlsianpu changed the title [WIP, Do Not Review] USB CDC ACM serial firmware loader USB CDC ACM serial firmware loader + dfu/single_slot sample project integration Feb 26, 2026
@@ -0,0 +1,40 @@
mcuboot:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This partition manager file seems only to be necessary for building the usb_mcumgr fw_loader as a standalone application - it is not used if the fw_loader is used by an outside application.
Can't we use devicetree for building the standalone application?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sample is not intended to function as a standalone sample.

*/

/ {
chosen {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this file won't be necessary at all in case of the dongle due to the line (this will already be done by default on the dongle):

#include <../boards/common/usb/cdc_acm_serial.dtsi>

This all will happen automatically there.

Perhaps here you should also simply include the file from zephyr: boards/common/usb/cdc_acm_serial.dtsi for the DK

Also - take a look at

source "boards/common/usb/Kconfig.cdc_acm_serial.defconfig"
- perhaps some of the configuration from prj.conf won't be needed (although I doubt it)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of the dongle configuration will be more complex (firmware_loader) that this and what you pointed:

  • dedicated cdc_acm_uart assigned for SMP MCUmgr
  • dedicated cdc_acm_uart assigned for LOG

@umapraseeda
Copy link
Copy Markdown
Contributor

Changelog entry missing.

@nvlsianpu nvlsianpu force-pushed the usb_fw_loader branch 2 times, most recently from cfaecd7 to 8d8b140 Compare March 3, 2026 11:13

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(ble_mcumgr)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project name is invalid

CONFIG_COMMON_LIBC_MALLOC=y
CONFIG_LOG=n

CONFIG_UART_CONSOLE=n #? Why is this disabled?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you elaborate?

Comment on lines +31 to +34
# Enable the mcumgr Packet Reassembly feature over Bluetooth and its configuration dependencies.
# MCUmgr buffer size is optimized to fit one SMP packet divided into five Bluetooth Write Commands,
# transmitted with the maximum possible MTU value: 247 bytes.
#CONFIG_MCUMGR_TRANSPORT_BT_REASSEMBLY=y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this file contain complete irrelevant comments?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

CONFIG_DEVICE_SHELL=n
CONFIG_DEVMEM_SHELL=n
CONFIG_FLASH_SHELL=n
########
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
########

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fixed

Comment thread sysbuild/Kconfig.firmware_loader
CONFIG_BASE64=y
CONFIG_CRC=y

# Enable the mcumgr Packet Reassembly feature over Bluetooth and its configuration dependencies.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments as above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment thread samples/dfu/single_slot/sysbuild/usb_mcumgr/prj.conf
Comment thread samples/dfu/fw_loader/usb_mcumgr/README.rst Outdated
@nvlsianpu nvlsianpu requested a review from a team as a code owner March 3, 2026 14:09
@NordicBuilder NordicBuilder removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Mar 3, 2026
@nvlsianpu nvlsianpu force-pushed the usb_fw_loader branch 2 times, most recently from 56048b6 to b5ea6a9 Compare March 4, 2026 15:23
@nvlsianpu nvlsianpu requested a review from nordicjm March 4, 2026 15:24
Comment thread doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst Outdated
Comment thread doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst Outdated
Comment thread doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst Outdated
Comment thread samples/dfu/fw_loader/usb_mcumgr/README.rst
Comment thread samples/dfu/fw_loader/usb_mcumgr/README.rst
Comment thread samples/dfu/fw_loader/usb_mcumgr/README.rst
Copy link
Copy Markdown
Contributor

@FrancescoSer FrancescoSer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but implement these suggestions

Comment thread samples/dfu/single_slot/README.rst Outdated
Comment thread samples/dfu/single_slot/README.rst Outdated
Comment thread samples/dfu/single_slot/README.rst Outdated
Comment thread samples/dfu/single_slot/README.rst Outdated
@nvlsianpu nvlsianpu force-pushed the usb_fw_loader branch 3 times, most recently from 27de1b1 to 9a619d0 Compare March 26, 2026 13:58
@NordicBuilder
Copy link
Copy Markdown
Contributor

NordicBuilder commented Mar 26, 2026

Memory footprint analysis revealed the following potential issues

applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 12662[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icbmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 9410[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High RAM usage: 9014[B] - link (cc: @nrfconnect/ncs-ll-ursus)
applications.hpf.gpio.icmsg[nrf54l15dk/nrf54l15/cpuflpr]: High ROM usage: 5770[B] - link (cc: @nrfconnect/ncs-ll-ursus)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-27185/37)

Added USB CDC-ACM (Virtual COM) SMP MCUmgr firmware loader
project, so it will be aveilable as firmware loader image.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added SB_CONFIG_FIRMWARE_LOADER_IMAGE_USB_MCUMGR option which
enables USB CDC-ACM firmware loader for a build.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added configuration which allow to build the sample with
USB CDC-ACM SMP MCUmgr firmeare loader.
This can be build for nRF54LM20DK with FILE_SUFFIX=usb.

Somewhy when building on Windows machine with FILE_SUFFIX=usb
need to create sysbuild/usb_mcumgr image configuration
explicitelly.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Updated doc for covering building and testing the sample
with USB CDC ACM firmware loader.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add link to nRFUtil mcumanager page.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Doc added (pattern for ble_mcumgr repalyed).

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added reevant records on usb cdc acm smp mcumgr
support in NCS.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
@nvlsianpu nvlsianpu added this to the 3.3.0 milestone Mar 27, 2026
@nvlsianpu nvlsianpu merged commit 8b6a6f1 into nrfconnect:main Mar 27, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants