Hi,
I am realtively new to PlatfromIO. I try to use a modified board definition for my adafruit_feather_nrf52840 board, therefore I want to use
platform_packages = framework-arduinoadafruitnrf52 @ https://github.com/…
option in the platformio.ini env section. However, the build does not work, the error message is:
Error: This board doesn’t support platform_packages = framework-arduinoadafruitnrf52 @ https://github.com/…
What is the problem, any clue? Thanks in advance
What’s the exact platformio.ini
you’re using?
@maxgerhardt:
[env:adafruit_feather_nrf52840_s340]
platform = nordicnrf52
board = adafruit_feather_nrf52840
framework = arduino
platform_packages = framework-arduinoadafruitnrf52 @ https://github.com/orrmany/Adafruit_nRF52_Arduino.git#develop-ant-plus-ble
build_flags =
;monitor_filters = log2file, default
framework = arduino
platform_packages = framework-arduinoadafruitnrf52 @ https://github.com/orrmany/Adafruit_nRF52_Arduino.git#develop-ant-plus-ble
build_flags =
Are these two spaces also there in your actual platformio.ini
or a copy-paste error? This is a syntactic error if there are spaces.
A sample project builds perfectly fine for me:
platformio -f -c eclipse run
Processing adafruit_feather_nrf52840_s340 (platform: nordicnrf52; board: adafruit_feather_nrf52840; framework: arduino)
--------------------------------------------------------------------------------
PackageManager: Installing framework-arduinoadafruitnrf52
git version 2.16.2.windows.1
Cloning into 'C:\Users\Maxi\.platformio\packages\_tmp_installing-6gcbusnp-package'...
Submodule 'cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore' (https://github.com/adafruit/Adafruit_TinyUSB_ArduinoCore.git) registered for path 'cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore'
Cloning into 'C:/Users/Maxi/.platformio/packages/_tmp_installing-6gcbusnp-package/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore'...
Submodule path 'cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore': checked out 'f96bfb250c06c447600e1befbc6601b49672d381'
framework-arduinoadafruitnrf52 @ 5aaf2fb has been successfully installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/adafruit_feather_nrf52840.html
PLATFORM: Nordic nRF52 4.2.0 > Adafruit Feather nRF52840 Express
HARDWARE: NRF52840 64MHz, 243KB RAM, 796KB Flash
DEBUG: Current (jlink) External (jlink, stlink)
PACKAGES:
- framework-arduinoadafruitnrf52 5aaf2fb
- tool-sreccat 1.164.0 (1.64)
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 13 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\adafruit_feather_nrf52840_s340\src\main.cpp.o
[..]
Linking .pio\build\adafruit_feather_nrf52840_s340\firmware.elf
Building .pio\build\adafruit_feather_nrf52840_s340\firmware.hex
Checking size .pio\build\adafruit_feather_nrf52840_s340\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 2.7% (used 6744 bytes from 248832 bytes)
Flash: [ ] 4.5% (used 36636 bytes from 815104 bytes)
Building .pio\build\adafruit_feather_nrf52840_s340\firmware.zip
Zip created at .pio\build\adafruit_feather_nrf52840_s340\firmware.zip
========================= [SUCCESS] Took 18.29 seconds =========================
OMG! You are right. The leading whitespace was the probem! It never, ever occured to me that could be problem! Such a stupid, dumb parser!
(facepalm)
Thank you very much for your kind help, @maxgerhardt !
Preceeding a line with space is actually an important feature which means “line continuation for the previous declared option”, so that multi-line options are possible like (docs)
lib_deps =
ArduinoJSON
RTC
So the parser is doing its job correctly
. You put the space before a line with the framework =
line and it told you it doesn’t support the framework platform_pacakges ..
, so that’s where the error message comes from.
Glad you have it solved.