earlephilhower / arduino-pico

Raspberry Pi Pico Arduino core, for all RP2040 and RP2350 boards
GNU Lesser General Public License v2.1
2.03k stars 421 forks source link

Picow compilation errors in lwIP #2013

Closed jhmaloney closed 8 months ago

jhmaloney commented 8 months ago

I'm getting some compilations errors when compiling for picow:

22 | #include "CEspControl.h" | ^~~~~~~ compilation terminated. *** [.pio/build/pico-w/lib1b0/lwIP_ESPHost/ESPHost.cpp.o] Error 1 In file included from /Users/johnmaloney/.platformio/packages/framework-arduinopico/libraries/lwIP_ESPHost/src/lwIP_ESPHost.cpp:21: /Users/johnmaloney/.platformio/packages/framework-arduinopico/libraries/lwIP_ESPHost/src/lwIP_ESPHost.h:24:10: fatal error: CCtrlWrapper.h: No such file or directory

24 | #include "CCtrlWrapper.h" | ^~~~ compilation terminated.

I use platformio. I started getting these errors after updating my arduino-pico installation yesterday.

earlephilhower commented 8 months ago

As part of CI we build all the PicoW WiFi examples using arduino-cli so this is P.IO related. Can you post your INI files and a small sketch showing the failure?

If you don't actually define ESPHOSTSPI the core will ifdef out all refs to the ESPHost library (not included, you must separately pull it in per the README in the lwip_ESPHost dir).

I don't use P.IO, but this reminds me of problems before where P.IO was being lazy and not actually probing to see what includes were really needed. There's some sort of level setting option to have it actually evaluate #defines that fixes that problem.

jhmaloney commented 8 months ago

Thanks for the super-quick response! This makes sense; I did not define ESPHOSTSPI so I was wondering why it was even trying to compile ESPHost.cpp.

I will try some other settings for the PlatformIO dependency detection system. Will let you know...

jhmaloney commented 8 months ago

Got it! I just needed to add:

lib_ignore = lwIP_ESPHost

To the PlatformIO entry for the pico-w. Thanks for putting me on the right track!