Closed
Description
I am using HomeSpan in the ratgdo32 project. It is built with platformio which I run from VScode. Changing HomeSpan release from 2.0.0 to 2.1.0 in platformio.ini causes build errors (see below). Solving for missing SPI.h by adding SPI to lib_deps, just causes the next error to surface (missing Network.h).
I solved the problem by adding -D CONFIG_ETH_ENABLED=1
to build_flags.
But I shouldn't have to... HomeSpan should not attempt to compile in ethernet support if ethernet is not available. Who knows what all the side effects are by me adding that define to my build flags... as I do not have ethernet h/w. I request that you wrap the ethernet code in a #ifdef
test.
Thanks.
Compiling .pio/build/ratgdo_esp32dev/src/softAP.cpp.o
In file included from .pio/libdeps/ratgdo_esp32dev/HomeSpan/src/HomeSpan.h:42,
from src/ratgdo.h:27,
from src/drycontact.cpp:16:
/home/david/.platformio/packages/framework-arduinoespressif32/libraries/Ethernet/src/ETH.h:73:10: fatal error: SPI.h: No such file or directory
*************************************************************
* Looking for SPI.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SPI.h"
* Web > https://registry.platformio.org/search?q=header:SPI.h
*
*************************************************************
73 | #include "SPI.h"
| ^~~~~~~
compilation terminated.
In file included from .pio/libdeps/ratgdo_esp32dev/HomeSpan/src/HomeSpan.h:42,
from src/ratgdo.h:27,
from src/config.cpp:22:
/home/david/.platformio/packages/framework-arduinoespressif32/libraries/Ethernet/src/ETH.h:73:10: fatal error: SPI.h: No such file or directory
*************************************************************
* Looking for SPI.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SPI.h"
* Web > https://registry.platformio.org/search?q=header:SPI.h
*
*************************************************************
73 | #include "SPI.h"
| ^~~~~~~
compilation terminated.
In file included from .pio/libdeps/ratgdo_esp32dev/HomeSpan/src/HomeSpan.h:42,
from src/ratgdo.h:27,
from src/comms.cpp:25:
/home/david/.platformio/packages/framework-arduinoespressif32/libraries/Ethernet/src/ETH.h:73:10: fatal error: SPI.h: No such file or directory
*************************************************************
* Looking for SPI.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SPI.h"
* Web > https://registry.platformio.org/search?q=header:SPI.h
*
*************************************************************
73 | #include "SPI.h"
| ^~~~~~~
compilation terminated.