🛠 Programmer par glisser-déposer via le DAPLink

nRF52840-MDK (boards.json id: nrf52840-mdk) · debutant · Zéro outil à installer : déposez un .hex sur le lecteur DAPLINK et votre firmware tourne — à condition de savoir merger le SoftDevice.

The principle

The DAPLink debugger embedded on the nRF52840-MDK exposes a mass storage function: a removable drive DAPLINK appears on your machine. Dropping a .hex file onto it programs the flash — no SDK, no programmer, no command line required. After copying, press the Boot/Reset button to run the new firmware.

Step 1 — Get the right .hex

Two scenarios:

mergehex -m s140_nrf52_6.1.1_softdevice.hex \
           _build/mon_app_nrf52840_mdk.hex \
         -o firmware.hex

mergehex is provided with the nRF Command Line Tools (also installed by nRF Connect for Desktop).

Step 2 — Program via drag-and-drop

  1. Connect the board via USB; the DAPLINK drive appears.
  2. Drop firmware.hex onto the drive; the activity LED blinks during the copy.
  3. Once the copy is complete, press Boot/Reset: the board restarts on the new firmware.

Step 3 — The command-line alternative: pyOCD

The embedded probe speaks CMSIS-DAP; pyocd (installable via pip) does the same thing in a scriptable way:

pyocd flash -t nrf52840 firmware.hex
pyocd gdbserver        # débuggage GDB via la même sonde

Checks if nothing starts

Do not confuse

The UF2 bootloader (dropping a .uf2) concerns only the nRF52840 MDK USB Dongle variant, not the pin-header board documented here. On the dongle, reflashing the bootloader hex via the drive can put the device in an inconsistent state (“Bricked device” report on the Nordic DevZone) — only do this following the official recovery procedure.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials