platformio-core
platformio-core copied to clipboard
LDF default-includes wrong libs for "Arduino IoT Cloud" + Portenta H7
What kind of issue is this?
- [x] PlatformIO Core. If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Windows 10 x64
PlatformIO Version (platformio --version): 6.1.12a6
Description of problem
Derived from community topic.
Attempting to compile the [ArduinoIoTCloud-Basic}(https://github.com/arduino-libraries/ArduinoIoTCloud/tree/1.13.0/examples/ArduinoIoTCloud-Basic) example for a Portenta H7 fails to compile, even with LDF mode set to deep+, because of the inclusion of wrong libraries.
Users should not have the expertise or trouble to manually pick out the wrong libraries with lib_ignore and are expecting it to work the same as in the Arduino IDE, which does compile it cleanly.
Steps to Reproduce
- Create a new Portenta H7 project
- Use the
platformio.ini
[env:portenta_h7_m7]
platform = ststm32
board = portenta_h7_m7
framework = arduino
lib_ldf_mode = deep+
lib_deps =
arduino-libraries/ArduinoIoTCloud@^1.13.0
- Copy over all files in the example to
src/ - Hit build
Actual Results
Tons of build errors from libraries that should not be built, like WiFiNINA, WiFi101
Expected Results
Compiles okay, the same way as in the Arduino IDE.
If problems with PlatformIO Build System:
platformio.ini and code per above.
Additional info
It does build with
lib_ignore =
WiFiNINA
WiFi101
MKRNB
MKRGSM
Arduino_ESP32_OTA
RTCZero
added. Per above that's not too user-friendly. PlatformIO should user stricter checking if sub-dependencies are downloaded and included.
Another note is that setting
lib_compat_mode = strict
will fail the build more drastically, since even the Arduino IoT libary is filtered out completely. PlatformIO does not seem to recognize that board = portenta_h7_m7, framework = arduino matches mbed_portenta within the declared architectures
https://github.com/arduino-libraries/ArduinoIoTCloud/blob/d436b80f099be3bbc9132248aae24c3042836446/library.properties#L9