I am developing a library (GitHub - iotexproject/arduino-sdk) which has two platform dependent dependencies, FlashStorage and WiFiNINA.
I have specified them in library.json, along with "libCompatibilityMode": "strict"
However, it doesn’t look like platformio is reconizing the dependencies. In order to reproduce, follow the steps below:
- Clone the repo
git clone https://github.com/iotexproject/arduino-sdk.git
- As the library is not yet in pio library manager, we need to tell platformio where to locate it. For this, set the value of PLATFORMIO_LIB_EXTRA_DIRS to the current directory (where we have cloned the repo)
export PLATFORMIO_LIB_EXTRA_DIRS=`pwd`
- Change directory to any example and try to run for nano_33_iot.
cd arduino-sdk/examples/GetAccountMetadata
platformio run --environment nano_33_iot
Expected: platformio recognizes FlashStorage and WiFiNINA as dependencies.
Actual: platformio does not recognize any of them as dependencies. See output below:
Processing nano_33_iot (platform: atmelsam; board: nano_33_iot; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/nano_33_iot.html
PLATFORM: Atmel SAM (6.3.1) > NANO 33 IoT
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES:
- framework-arduino-samd 1.8.11
- framework-cmsis 1.40500.0 (4.5.0)
- framework-cmsis-atmel 1.2.2
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
Converting GetAccountMetadata.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep+, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <IoTeX-blockchain-client> 0.0.1
| |-- <SPI> 1.0
Building in release mode
Compiling .pio/build/nano_33_iot/src/GetAccountMetadata.ino.cpp.o