platformionrf52

Programming NRF52840 dongle from PlatformIO


I am following https://docs.platformio.org/en/latest/boards/nordicnrf52/nrf52840_dk.html but I don't actually have a DK, I have an NRF52840 "Dongle". Does anybody know if it's possible for that to work directly with PlatformIO? It has a built in bootloader, but I don't think it emulates the right kind of programmer. I have nrfutil installed but that wants a package (.zip) and platformio is producing .elf/.hex ... not sure how to connect these tools.


Solution

  • You can use nrfutil nrf5sdk-tools pkg generate (was nrfutil pkg generate in older versions) to convert the hex files into a package:

    https://docs.nordicsemi.com/bundle/nrfutil/page/nrfutil-nrf5sdk-tools/guides/dfu_generating_packages.html

    FYI, you might not get much benefit from using PlatformIO since you don't have a debugging interface. Depending on the framework you're using, there might be other options, like this documentation for Zephyr:

    https://docs.zephyrproject.org/latest/boards/arm/nrf52840dongle_nrf52840/doc/index.html