Tested against: NCS v3.2.0-rc1 · Zephyr 4.3.99 · Board:
nrf52840_mdk_usb_dongle/nrf52840
If your NCS version differs, commands may need adjustment. Check the version header first.
One-time setup — see docs/DEV_SETUP.md for full environment setup.
# Activate workspace
cd ~/your-workspace
source .venv/bin/activateThe MDK USB Dongle uses UF2, not J-Link. Patch the board runner once:
nano zephyr/boards/makerdiary/nrf52840_mdk_usb_dongle/board.cmakeChange the runner line to:
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)Also enable Read/Write permissions in your repo:
GitHub → Settings → Actions → General → Workflow permissions → Read and write
west build -b nrf52840_mdk_usb_dongle/nrf52840 lima-node/firmware \
-- -DCONFIG_BUILD_OUTPUT_UF2=yClean build:
west build -p always -b nrf52840_mdk_usb_dongle/nrf52840 lima-node/firmware \
-- -DCONFIG_BUILD_OUTPUT_UF2=y- Put dongle in bootloader mode — hold RESET while plugging in
- RGB LED pulses red → bootloader active, mounts as
UF2BOOT - Flash:
west flashOpen a serial monitor to confirm firmware is running:
screen /dev/ttyACM0 115200
# or
minicom -D /dev/ttyACM0 -b 115200| Error | Fix |
|---|---|
runner not configured |
board.cmake not patched — see One-Time Board Fix above |
uf2 file location unknown |
Missing -DCONFIG_BUILD_OUTPUT_UF2=y in build command |
build.ninja not found |
Stale build dir — use -p always flag |
| Dongle not mounting as UF2BOOT | Not in bootloader mode — hold RESET while plugging in |
west flash finds no device |
Check ls /dev/tty* — may be ttyACM1 not ttyACM0 |
For full background on this setup including NCS workspace initialization and toolchain install, see the complete flash howto.