Platformio-core: Fatal error: SPI.h: No such file or directory

Created on 29 May 2019  Â·  4Comments  Â·  Source: platformio/platformio-core

What kind of issue is this?

  • [x ] PlatformIO Core.

Configuration

Operating system: ESPHOME
[email protected];

Description of problem

Adding Adafruit's new "Adafruit BusIO" library to ESPhome results in

In file included from /data/pod5/.piolibdeps/Adafruit BusIO_ID6214/Adafruit_SPIDevice.cpp:1:0:
/data/pod5/.piolibdeps/Adafruit BusIO_ID6214/Adafruit_SPIDevice.h:1:17: fatal error: SPI.h: No such file or directory

Most helpful comment

Just add to some of your files in src folder #include <SPI.h>

All 4 comments

Just add to some of your files in src folder #include <SPI.h>

They do in fact have that already.

Same error with ESP8266 framework:
Adafruit BusIO_ID6214/Adafruit_SPIDevice.h:1:17: fatal error: SPI.h: No such file or directory

Well as @ivankravets said, I could fix this issue by #including in one of the src files. I guess PlatformIO reads through src files, to get an overall view of all the dependencies, to ensure, for instance, their header files are well specified in compiler's header directories.

Was this page helpful?
0 / 5 - 0 ratings