Hello,
I’m using PlatformIO in VSCode on Linux to program my ESP32 (board: esp32dev) implemented in Arduino framework.
I have several libraries design by myself, correctly implemented in /lib/ folder of my project.
I have a problem that I cannot solve. Actually, I’m not understanding the issue so it is hard for me to search for a solution and also to explain exactly what are happening. But I will try.
So, I can build my project successfully without any problems. But when I try to upload my code to the platform, I get a error:
In file included from lib/unixtime/unixtime.cpp:4:0:
lib/myutils/myutils.h:7:21: fatal error: sensors.h: No such file or directory
*****************************************************************
* Looking for sensors.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:sensors.h"
* Web > https://platformio.org/lib/search?query=header:sensors.h
*
*****************************************************************
compilation terminated.
In file included from lib/rctmodule/rtcmodule.cpp:6:0:
lib/myutils/myutils.h:7:21: fatal error: sensors.h: No such file or directory
*****************************************************************
* Looking for sensors.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:sensors.h"
* Web > https://platformio.org/lib/search?query=header:sensors.h
*
*****************************************************************
compilation terminated.
*** [.pio/build/esp32dev/lib2ad/unixtime/unixtime.cpp.o] Error 1
*** [.pio/build/esp32dev/lib63b/rctmodule/rtcmodule.cpp.o] Error 1
(sensors.h is one of my own header files)
This problem start appear just few days ago, before that I used that header file perfectly.
The #include statements are correct, that same file are included from other files with no errors and all my header files have include guards.
And the most curious is that I can build correctly but when uploading I get that errors.
This is my Github repository: GitHub - rafaelmaciel648/ESP32_TESE
Sorry, if I cannot explain well, but if you need more information, just ask for it.
This is my master thesis project and now I cannot keep advancing because of this.
Thank you in advance for your help.
Best regards,
Rafael Maciel
Error is not reproducable under Windows 10 x64. It correcftly detects the sensors
library as a dependency.
Building .pio\build\esp32dev\firmware.bin
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
esptool.py v2.6
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.0% (used 16444 bytes from 327680 bytes)
Flash: [== ] 21.9% (used 286855 bytes from 1310720 bytes)
============================ [SUCCESS] Took 14.44 seconds ============================
Can you open a PIO terminal, execute pio run -v
, abort it after the full dependency graph is shown, and post it here?
Thank you for your help!
After the command pio run -v
the result is this:
Dependency Graph
|-- <myutils> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/myutils)
| |-- <sensors> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors)
| | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | |-- <rctmodule> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule)
| | | |-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| | | | |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| | | | |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
| | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | |-- <device> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/device)
| | | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | |-- <filemanager> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/filemanager)
| | | | |-- <SD(esp32)> 1.0.5 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SD)
| | | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | | | |-- <FS> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/FS)
| | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | |-- <LinkedList> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/LinkedList)
|-- <rctmodule> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule)
| |-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| | |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| | |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
| |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
|-- <scheduler> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/scheduler)
|-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
|-- <LinkedList> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/LinkedList)
|-- <sigfox> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sigfox)
| |-- <myutils> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/myutils)
| | |-- <sensors> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors)
| | | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | |-- <rctmodule> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule)
| | | | |-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| | | | | |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| | | | | |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
| | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | |-- <device> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/device)
| | | | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | | |-- <filemanager> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/filemanager)
| | | | | |-- <SD(esp32)> 1.0.5 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SD)
| | | | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | | | | |-- <FS> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/FS)
| | | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | |-- <LinkedList> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/LinkedList)
|-- <datalogger> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/datalogger)
| |-- <myutils> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/myutils)
| | |-- <sensors> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors)
| | | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | |-- <rctmodule> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule)
| | | | |-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| | | | | |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| | | | | |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
| | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | |-- <device> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/device)
| | | | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | | | |-- <filemanager> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/filemanager)
| | | | | |-- <SD(esp32)> 1.0.5 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SD)
| | | | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | | | | |-- <FS> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/FS)
| | | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | |-- <LinkedList> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/LinkedList)
| |-- <rctmodule> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule)
| | |-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| | | |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| | | |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
| | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| |-- <filemanager> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/filemanager)
| | |-- <SD(esp32)> 1.0.5 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SD)
| | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | |-- <FS> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/FS)
| | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| |-- <LinkedList> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/LinkedList)
|-- <device> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/device)
| |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| |-- <filemanager> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/filemanager)
| | |-- <SD(esp32)> 1.0.5 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SD)
| | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | |-- <FS> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/FS)
| | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
|-- <sensors> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors)
| |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| |-- <rctmodule> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule)
| | |-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| | | |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| | | |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
| | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| |-- <device> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/device)
| | |-- <Adafruit_ADS1015> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/Adafruit_ADS1015)
| | | |-- <Wire> 1.0.1 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/Wire)
| | |-- <filemanager> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/filemanager)
| | | |-- <SD(esp32)> 1.0.5 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SD)
| | | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| | | | |-- <FS> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/FS)
| | | |-- <SPI> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/SPI)
| |-- <LinkedList> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/LinkedList)
|-- <unixtime> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/unixtime)
| |-- <NTPClient> (/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/NTPClient)
| |-- <WiFi> 1.0 (/home/inesmaciel/.platformio/packages/framework-arduinoespressif32/libraries/WiFi)
However, before the dependy graph there is this warnning:
Warning! Circular dependencies detected between `/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors` and `/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/rctmodule`
Warning! Circular dependencies detected between `/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/device` and `/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors`
Warning! Circular dependencies detected between `/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/sensors` and `/home/inesmaciel/Documents/PlatformIO/Projects/esp32_arduino_framework/lib/myutils`
Maybe it could cause the problem…
And I don’t know how and why but, without any change in the code, sometimes I can upload sometimes not…
Thank you!!