Instructions for setting up PlatformIO for SparkFun Pro nRF52840 Mini development.
PlatformIO IDE is installed.
All files needed to copy to PlatformIO directories are contained in this project's files_to_install directory.
- Checkout this Git project.
- Build the project to download the support packages for nrf52. The build is expected to fail. Run
pio run. - Navigate to the PlatformIO core_dir. This is
~/.platformioon Unix and%HOMEPATH%\.platformioon Windows. - Install board file from
files_to_install.- Copy
sparkfun_pro_nrf52840_mini.jsonfrom.\files_to_install\platforms\nordicnrf52\boardsto.\core_dir\platforms\nordicnrf52\boards - Run
pio runagain to download additional files. Thie build will fail.
- Copy
- Install variant from
files_to_install.- Create directory
.\core_dir\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini - Copy
variant.handvariant.cppfrom.\files_to_install\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_minito.\core_dir\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini
- Create directory
- Install bootloader from
files_to_install.- Create directory
.\core_dir\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini - Copy
sparkfun_pro_nrf52840_mini_bootloader-0.2.9_s140_6.1.1.hexandsparkfun_pro_nrf52840_mini_bootloader-0.2.9_s140_6.1.1.zipfrom.\files_to_install\packages\framework-arduinoadafruitnrf52\bootloader\sparkfun_pro_nrf52840_minito.\core_dir\packages\framework-arduinoadafruitnrf52\bootloader\sparkfun_pro_nrf52840_mini
- Create directory
- Install boards.txt data.
- Edit
.\core_dir\packages\framework-arduinoadafruitnrf52\boards.txt - Copy the contents of
.\files_to_install\packages\framework-arduinoadafruitnrf52\boards_sparkfun.txtintoboards.txtand save it.
- Edit
- Run
pio runagain in the project directory. It should now compile successfully. You can test the program by runningpio run -t uploadand connecting to the device with NRF Connect. See the Sparkfun guide nRF52840 Development with Arduino and CircuitPython for more details.