This is an old revision of the document!
Note. this page is building on the assumption that the reader has read content in the pages
Platform IO is a “new generation toolset for embedded C/C++ development” built on Microsoft's Visual Studio Code. It can be used as an alternative IDE for “Arduino related work”.
It has a limited support for .ino files, as those have to be manually converted to normal C++ source files for full support.
This document is about enabling embedded C/C++ development for ANT+ protocols within PlatformIO. It describes how to add S340 SD support within Platform Io to the Adafruit nRF52 Core for the Arduino nRF52840 Express Feather.
This work is based on rtgree01's PlatformIO adaptation. See also the Credits section with the page S340 SoftDevice & Adafruit nRF52840 Express Feather
~/.platformio/packages/framework-arduinoadafruitnrf52/bootloader/feather_nrf52840_express/
%HOMEDIR%\.platformio\packages\framework-arduinoadafruitnrf52\bootloader\feather_nrf52840_express
0.3.0_s340_6.1.1.zip
) and .hex (0.3.0_s340_6.1.1.hex
) from the build directory of the freshly modified bootloader package here.…/.platformio/packages/framework-arduinoadafruitnrf52/
. Modify boards.txt
just like I did for the Arduino IDE. See sub-step “1” within the section Second major step: replace the bootloader with the modified bootloader at the Arduino IDE adaptation page. adafruit_feather_nrf52840.json
and name it adafruit_feather_nrf52840_s340.json
. Change the following entries:"ldscript": "nrf52840_s340_v6.ld", "softdevice": { "sd_flags": "-DS340", "sd_name": "s340", "sd_version": "6.1.1", "sd_fwid": "0x00B9" }
…/.platformio/packages/framework-arduinoadafruitnrf52/cores/nRF5/linker
. Copy/duplicate the S140 linker script as nrf52840_s140_v6.ld. Modify the linker script memory settings just like I did for the Arduino IDE. See sub-step “2” within the section Second major step: replace the bootloader with the modified bootloader at the Arduino IDE adaptation page.…/.platformio/packages/framework-arduinoadafruitnrf52/platform.txt
file because the Adafruit bootloader is now 0.3.0:# Bootloader version # tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.2.13_{build.sd_name}_{build.sd_version} tools.bootburn.bootloader.file={runtime.platform.path}/bootloader/{build.variant}/{build.variant}_bootloader-0.3.0_{build.sd_name}_{build.sd_version}
Now you should be ready to rock. Restart PlatformIO IDE and select Adafruit Bluefruit Feather nRF52840 Express w.ANT
as your board type :)