In my PlatformIO project I have a custom library defined. It supports both native
and espressif32
platforms. It has different dependencies based on which platform it is being compile to. These are defined like in the custom library’s library.json
as follows:
...,
"dependencies": [
{
"platforms": "native",
"name": "NimBLE-Arduino",
"version": "https://github.com/h2zero/esp-nimble-cpp.git#master"
},
{
"platforms": "native",
"name": "FreeRTOS",
"version": "https://github.com/FreeRTOS/FreeRTOS-Kernel.git#V10.4.3"
},
{
"platforms": "espressif32",
"frameworks": "arduino",
"name": "NimBLE-Arduino",
"version": "https://github.com/espressif/arduino-esp32.git#master"
}
],
...
"build": {
"libLDFMode": "chain+",
"libCompatMode": "strict"
},
...
The pertinent bits of the platformio.ini
for my project are:
[env:espressif32]
lib_ldf_mode = chain+
lib_compat_mode = strict
platform = espressif32
framework = arduino
...
lib_deps = lib/SS2K
...
[env:native]
platform = native
lib_deps = lib/SS2K
lib_ldf_mode = chain+
lib_compat_mode = strict
When I run platformio lib install
if installs the FreeRTOS
library to both .pio/libdeps/espressif32/FreeRTOS
and to pio/libdeps/native/FreeRTOS
. This seems incorrect and platformio should only be installing this library to pio/libdeps/native/FreeRTOS
.