I am very new to embedded development and just spent a night and a day figuring out how to use the Nordic nRF52840 Dongle under the Arduino framework with PlatformIO. I don’t have JLink or anything similar and finally succeeded in programming the device with the default bootloader over just a USB connection.
Everything described in this post was the situation on 11/15/2025. Keep in mind that versions may change over time, and the instructions in this post may eventually be obsoleted as software changes.
The process I ended up with is very similar to the one described at nrf52 - Programming NRF52840 dongle from PlatformIO - Stack Overflow. That might be enough to get everything working. If not, I elaborate on some of the problems I ran into below. I spent hours looking for help on the internet late into the night and didn’t find the Stack Overflow post previously linked until after I solved my problem. I want to make sure all the details are documented here so that others may be able to get out of a place of confusion.
Nordic Semiconductor claims in the datasheet for the dongle that you can use nrfutil to program it. In getting that to work, there were two major hurdles to overcome. First, I wasn’t able to coax the nrfutil program that Nordic Semiconductor links to in their datasheet into uploading application firmware without specifying a SoftDevice version requirement for it. The solution was to download the SoftDevice firmware version of my choice from Nordic Semiconductor and use the Programmer tool that can be installed from nRFConnect to write the SoftDevice firmware to the device. I haven’t yet found a way to do this with nrfutil, although my experience troubleshooting this suggests that it may be possible, just not clearly documented. I’d be happy to hear if someone knows how to do it.
In my troubleshooting, I found the nrfutil device fw-info command helpful, as well as the list of firmware IDs in the nrfutil nrf5sdk-tools pkg generate --help output. And that leads into the second problem.
There are three different nrfutil versions that I found so far. There is a Python package maintained by Nordic, a separate, newer implementation maintained by Nordic (this is the one they link to from the datasheet), and an adafruit-nrfutil Python module, which seems to be the one that PlatformIO uses by default if you specify “nrfutil” as the upload method in your platformio.ini.
At the time I write this comment, Nordic’s nrfutil Python module does not have a version compatible with the version requirements of the Click module that PlatformIO and nrfutil both depend on. I was not able to get past compilation with Nordic’s nrfutil Python module installed in the same environment as PlatformIO.
The adafruit-nrfutil module puts a dfu_version: 0.5 in the manifest.json which is packaged in the zipfile that nrfutil needs to upload to the device. Upon uploading, the bootloader will reject the upload because the version is too old. When I manually took that line out of manifest.json and rezipped the archive, adafruit-nrfutil got far enough to complain that my SoftDevice version was incompatible. That was before I solved my SoftDevice problem, and I haven’t tested that approach since solving that. I do not know whether it may be possible to work around the issue with the adafruit-nrfutil.
The trick I found was to use the nrfutil binary linked to from the datasheet. It knows how to talk to the Open Bootloader with the right version. But a lot of the commands changed. A lot of instructions you can find the internet are for the Nordic Python module mentioned above, and do not work with their new implementation. These are the commands to package a .hex file for the nRF52840 Dongle and upload it with the Open Bootloader DFU, using Nordic Semiconductor’s modern nrfutil:
nrfutil nrf5sdk-tools pkg generate --application firmware.hex --hw-version 52 --sd-req 0x123 --application-version-string “0.1.0” firmware.zip
nrfutil device program --traits nordicDfu --firmware firmware.zip
Note that I used–-sd-req 0x123 because 0x123 is the firmware ID for the SoftDevice version that I first uploaded with nrfConnect Programmer. As I described above, you can find the firmware ID for each version in the helppage for the pkg generate command. If you end up with a SoftDevice with version number 5001000 (which you can find from the fw-info command) then your device has the s140 5.0.0 alpha release of SoftDevice on it, which does not have a firmware ID. Therefore, it seems it may not be possible to upload for that SoftDevice version (there could be a workaround I did not find).
It should be possible to construct an uploading script with these commands for PlatformIO to use similar to the one shown at the Stack Overflow link above.