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
~/.platformio
on Unix and%HOMEPATH%\.platformio
on Windows. - Install board file from
files_to_install
.- Copy
sparkfun_pro_nrf52840_mini.json
from.\files_to_install\platforms\nordicnrf52\boards
to.\core_dir\platforms\nordicnrf52\boards
- Run
pio run
again 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.h
andvariant.cpp
from.\files_to_install\packages\framework-arduinoadafruitnrf52\variants\sparkfun_pro_nrf52840_mini
to.\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.hex
andsparkfun_pro_nrf52840_mini_bootloader-0.2.9_s140_6.1.1.zip
from.\files_to_install\packages\framework-arduinoadafruitnrf52\bootloader\sparkfun_pro_nrf52840_mini
to.\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.txt
intoboards.txt
and save it.
- Edit
- Run
pio run
again in the project directory. It should now compile successfully. You can test the program by runningpio run -t upload
and connecting to the device with NRF Connect. See the Sparkfun guide nRF52840 Development with Arduino and CircuitPython for more details.