I have arduino ver 1.8.13 installed, and the latest plaformIO, i added board support for esp8266 and esp32, i created a project and selected the NodeMCU 12E board, the project was created and i opened the main.cpp and just compiled it… and i get the following error.
main.cpp:1:10: fatal error: Arduino.h: No such file or directory
however if i right click on arduino.h and goto definition , it displays the header file.
here is my platformIO.ini
You can try and reinstall the Arduino-ESP8266 framework by removing C:\Users\<user>\.platformio\packages\framework-arduinoespressif8266 and rebuilding the project (auto-downloads).
This doesn’t look like a build process which is kicked off when using the “Build” / “Upload” buttons in PlatformIO but something custom… What did you click so that this output appears?
Maybe you have some extension installed which makes this option appear? In any case, your logs hows that it attempts to invoke the system’s GCC compiler which is wrong. It doesn’t know anything about the PlatformIO build system and attempts to build it itself, which it can’t.
The build and upload process must be triggered through the buttons from the PlatformIO extension, not the menu you have. If you need to ‘run’ the code you need to execute ‘Upload’ to push the code to the microcontroller for it to run it.
The build log shows already that your PlatformIO installation was able to successfully compile the project, so there isn’t actually a problem .
This is what i get when i use the Build and debug option.
i’m thinking i will completely remove vscode and reinstall along with PlatformIO
and try the process again…
I thank you very much for helping me…