Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformIO fails to build for RP2040 using earlephilhower core (With workaround) #62

Open
mlaga97 opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mlaga97
Copy link

mlaga97 commented May 8, 2024

Describe the bug

Building with the following platformio.ini:

[env:rp2040]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
lib_deps =
  fabianoriccardi/Dimmable Light for Arduino@^1.6.0

fails due to conflicts with the built-in STL, which the dimmable-light documentation recommends solving by adding

lib_compat_mode = strict

to the platform.ini file.

However...

This still fails to build with the following error:

src/main.cpp:4:10: fatal error: dimmable_light.h: No such file or directory

Running pio build with the -v flag shows the following additional information:

LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ strict
Platform incompatible library /Parlor/Lauren/Projects/LARPANet-boards/Firmware/LampDimmer/.pio/libdeps/rp2040/ArduinoSTL
Platform incompatible library /Parlor/Lauren/Projects/LARPANet-boards/Firmware/LampDimmer/.pio/libdeps/rp2040/Dimmable Light for Arduino

For some reason, this library is not counted as being compatible with this platformio configuration.

Workaround

Through some trial and error, I was able to determine that lib_compat_mode = strict needs to be removed and lib_ldf_mode = off added, giving the following working platformio.ini:

[env:rp2040]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
lib_deps =
  fabianoriccardi/Dimmable Light for Arduino@^1.6.0
lib_ldf_mode = off

In theory lib_ldf_mode = chain+ or lib_ldf_mode = deep+ should work since the #include <ArduinoSTL.h> is properly #ifdef'd, but it doesn't for some reason.

Version Info

  • Library version: 1.6
  • Arduino core: earlephilhower rp2040 core
  • Enviroment/IDE: PlatformIO
  • Dimmer board: N/A
  • Board: Raspberry Pi Pico
@mlaga97 mlaga97 added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant