Adding support for nrf52840 Sparkfun Pro nRF52840 Mini


I was able to get PIO working with the Sparkfun Pro NRF52840 Mini. This involved:

  • Creating a board definition .\core_dir\platforms\nordicnrf52\boards
  • Adding Arduino variant.h and variant.cpp files to .\core_dir\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini
  • Adding bootloader to .\core_dir\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini
  • Editing .\core_dir\packages\framework-arduinoadafruitnrf52\boards.txt and adding Sparkfun board info.

This Github repo has the needed files and instructions for manually performing this setup.

Is there a way to get these changes baked into PlatformIO proper?


Please file a feature request here Issues · platformio/platform-nordicnrf52 · GitHub

A better solution with patching could be as described here Redirecting...

Then, you can use default Adafruit board and just override variant via board_build.variant = sparkfun_pro_nrf52840_mini.

P.S: No need to copy boards.txt, we don’t use it.

Hi, I followed up the instructions and got stuck where pio cannot find the usb.h:

.platformio\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini\variant.cpp:26:10: fatal error: usb.h: No such file or directory

I have installed the arduino USB libraries but still the error won’t go.

Is there any update to this? I found some close devices in the list but not the sparkfun_pro_nrf52840_mini?