Configuration
Operating system: Windows 7 Ultimate 64bit Service Pack 1
PlatformIO Version (platformio --version
): 3.5.0rc9
Visual Studio Code Version: 1.18.0
Atom Version: 1.23.1 x64
Description of problem
Include files not found anymore after update to Core 3.5.0rc9
Steps to Reproduce
- Update to latest core
- Build existing code which compiled before core update
Actual Results
> Executing task in folder ESP32-Weatherstation: platformio.exe run <
[12/16/17 14:25:46] Processing esp32dev (build_flags: -Os -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG; platform: https://github.com/platformio/platform-espressif32.git#feature/stage; board: esp32dev; framework: arduino; lib_extra_dirs: B:\Projects\ESP32\ESP32Lib; upload_port: ESP32-Test-2481CE9C.local)
----------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 37 compatible libraries
Looking for dependencies...
Library Dependency Graph ( http://bit.ly/configure-pio-ldf )
|-- <SPI> v1.0
|-- <DHT sensor library for ESP32> v1.0.2
|-- <Adafruit Unified Sensor> v1.0.2
|-- <Adafruit TSL2561> v1.0.0
| |-- <Adafruit Unified Sensor> v1.0.2
| |-- <Wire> v1.0
Compiling .pioenvs\esp32dev\src\emq.o
Compiling .pioenvs\esp32dev\src\graphics.o
Compiling .pioenvs\esp32dev\src\leds.o
Compiling .pioenvs\esp32dev\src\light.o
In file included from src\emq.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
In file included from src\leds.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
In file included from src\graphics.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
Compiling .pioenvs\esp32dev\src\main.o
In file included from src\light.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
Compiling .pioenvs\esp32dev\src\ota.o
In file included from src\main.cpp:1:0:
src/setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
Compiling .pioenvs\esp32dev\src\reset_reason.o
In file included from src\ota.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
*** [.pioenvs\esp32dev\src\emq.o] Error 1
C*ompiling .pioenvs\esp32dev\src\setup.o** [.pioenvs\esp32dev\src\leds.o] Error 1
*** [.pioenvs\esp32dev\src\graphics.o] Error 1
*** [.pioenvs\esp32dev\src\light.o] Error 1
*** [.pioenvs\esp32dev\src\main.o] Error 1
*** [.pioenvs\esp32dev\src\ota.o] Error 1
In file included from src\reset_reason.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
*** [.pioenvs\esp32dev\src\reset_reason.o] Error 1
In file included from src\setup.cpp:1:0:
src\setup.h:22:18: fatal error: WiFi.h: No such file or directory
compilation terminated.
*** [.pioenvs\esp32dev\src\setup.o] Error 1
========================================================= [ERROR] Took 1.36 seconds =========================================================
The terminal process terminated with exit code: 1
Expected Results
Under previous Core version the code compiled without any warnings or errors and is uploaded to the ESP32.
If problems with PlatformIO Build System:
The content of platformio.ini
:
[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git#feature/stage
board = esp32dev
framework = arduino
upload_port = ESP32-Test-2481CE9C.local
build_flags = -Os -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
lib_extra_dirs = B:\Projects\ESP32\ESP32Lib
Source file to reproduce issue:
#ifndef setup_h
#define setup_h
// Standard libraries
#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <esp_system.h>
#include <rom/rtc.h>
// Declarations and function definitions
#include <TFT_eSPI.h>
#endif
Additional info
After update of PlatfomIO Core to 3.5.0rc9 the xxx.h No such file or directory
error occurs on all my projects (ESP32 or ESP8266).
Error occurs on both Visual Studio Code and Atom.
Platforms, packages and libs are all installed.
I tried to remove all projects from the workspace, close Atom (or VSC), delete C:\Users\beegee\.platformio\homestate.json
, restart the editor. Still same problem.
I tried to uninstall PlatformIO from both editors, deleted C:\Users\beegee\.platformio
, reinstalled PlatformIO on both editors. Still same problem.
Then I tried with an empty new created project.
First I just included “WiFi.h” and had only one file main.cpp:
#include <Arduino.h>
#include "WiFI.h"
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
That compiles without problems.
Then I changed to the file structure that I use in my projects, code in main.cpp (and other .cpp files) and separate .h files.
main.cpp:
#include <setup.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
setup.h:
#include <Arduino.h>
#include "WiFI.h"
That fails to compile with the output:
> Executing task in folder CompileTest: platformio.exe run --target upload <
[12/16/17 15:31:46] Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 29 compatible libraries
Looking for dependencies...
No dependencies
Compiling .pioenvs\esp32dev\src\main.o
Generating partitions .pioenvs\esp32dev\partitions.bin
Archiving .pioenvs\esp32dev\libFrameworkArduinoVariant.a
In file included from src\main.cpp:1:0:
src/setup.h:2:18: fatal error: WiFI.h: No such file or directory
compilation terminated.
Compiling .pioenvs\esp32dev\FrameworkArduino\Esp.o
Compiling .pioenvs\esp32dev\FrameworkArduino\HardwareSerial.o
Compiling .pioenvs\esp32dev\FrameworkArduino\IPAddress.o
Compiling .pioenvs\esp32dev\FrameworkArduino\IPv6Address.o
Compiling .pioenvs\esp32dev\FrameworkArduino\MD5Builder.o
*** [.pioenvs\esp32dev\src\main.o] Error 1
========================================================= [ERROR] Took 2.04 seconds =========================================================
The terminal process terminated with exit code: 1
If I change in setup.h
from
#include "WiFI.h"
to
#include "C:/Users/beegee/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFI.h"
it compiles. ???