Hello, I see red squiggly lines under #include <Arduino.h>. The project will build but obviously this is not ideal. I have seen a few other posts with similar issues but no real resolutions were provided. Any idea where to start with troubleshooting this? Thank you.
What’s in your `platformio.ini’?
i.e. for a Arduino Uno it would look something like…
[env:uno]
platform = atmelavr
board = uno
framework = arduino
Sounds like my issue, which was solved by deleting the .vscode directory in the project folder and restarting vscode.
I have the same problem.
I have this problem too
PLEASE HELP !!! the minimum on a packet is explaining include paths
or do not advertise a c/C++ project. Making things complex leads to 1000 of different explanations all over the world With as only result people are more confused and more annoyed…
PLATFORM IO ADVICES tot add arduino.h At least explain how it is to be found !!!
If your project compiles properly (try pressing theBuild
button), Arduino.h
has been found, and you have once again been deceived by IntelliSense (which once again, has nothing to do with PlatformIO) into thinking there is something wrong with your project.
Arduino.h
is part of the Arduino core, meaning that it does not need to be installed separately, and IntelliSense should find it as it is located in a standard include path. There is one caveat that I know of… if you have a new install of PlatformIO, and have NOT tried to build a project yet, it is possible the Arduino board support package has not been installed yet, making the error valid. However, PlatformIO will install it automatically as part of the dependency checks at the start of the build, hence everything will compile fine. If IntelliSense detects that the files are now present is another matter, but in this edge case, it should go away after a restart of the VSCode code editor.
Please offer some help on this FIRST STEP ISSUE
-Restarting platform IO after erasing is NO HELP
TELL ME
A) WHERE DO I FIND Arduino.H ( Needed by documentation as convertion change !!!0
B) HOw to get rid ONCE AND FOR EVER OF THE STUPID ERROR
in case it matters
following HUGE CODE
#include <Arduino.h> ;//erase .vscode if it fails
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println(“I am the HALL 2000 and I never made an error !”);
}
void loop() {
// put your main code here, to run repeatedly:
}
platformIO.ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...
[env:ttgo-lora32-v1]
platform = espressif32
board = ttgo-lora32-v1
framework = arduino
Please give something ONE CAN UNDERSTAND or EVEN BETTER WRITE A DOC THAT EXPLAINS
Platform IO is supposed to be platform independent ??? its so dependent on who knows what it does not even find its OWN SUGGESTION !
but on first use, proves completely useless because it is completely empty
goal: do arduino/esp32 development !!!
envir: windows 10
Vscode known and setup
Platform IO setup
ini file
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = espidf
monitor_speed = 115200
upload_options=COM4
code
code simplified
#include <Arduino.h> <<<<<<<<<<<<<<NOT FOUND so somethinh about include paths /libraries is not setup correctly
//erase .vscode if it fails
void setup() {
// put your setup code here, to run once:
Serial.begin(115200); <<<<<<<<<<<<<<<<< Serial not defined confirms remark above !!!!!!
Serial.println("I am the HALL 2000 and I never made an error !");
}
void loop() {
// put your main code here, to run repeatedly:
}
There is NO C++ error but it can not start missing include paths and libraries
it sometimes comiles some of the libraries involved
THis is the basis of the basis AND I GET NO REAONABLE ANSWER IN MONTHS (big FRUSTRATION,Product worthless!!!)
Question as … where is Arduimo.h Library not found !!! … is crypticaly answered
explaining you should use TH library manager … but load WHAT
there is no respect for the beginner… it claims the include paths and library paths are NOT setup correctly.
upon asking for a way to setup include paths?libraries I getting the fourth degree.
Everyone can create MISTORIES THIS IS GETTING VERY ANNOYING THEY ARE NOT HELPFULL
IF ONE CAN USE THE LIBRARY MANAGER WHERE ARE THE FILES in ARDUINO (to copy) and to be placed in PLATFORMIO…
lib_extra_dirs =c:\Install\Arduino\Arduino\libraries <<<arduino install location
c:\use\Devlo\libraries
seems NOT HELPFULL AT ALL
What are the KEYWORDS to LOAD ties
a) THE core arduino library ( ARDUINO.h, Serial .....) there is enough doc how to find json , wifi ....
THE CORE arduino 8266 libary ( ARDUINO.h, Serial .....) there is enough doc how to find json , wifi ....
THE CORE ESP32 library ( ARDUINO.h, Serial .....) there is enough doc how to find json , wifi ....
THE CORE RTOS library ( ARDUINO.h, Serial .....) there is enough doc how to find json , wifi ....
...
all frameworks .... MINIMUM ALL THE CORES !!!!!!
B)
Can they be inserted with the LIBRARY MANAGER [ YES/ NO ]
Can I Reuse the arduino IDE include/library (same updates .... it takes MONTHS ... to get an answer from platform IO
Can I add my OWN INCLUDES/LIBRARIES
CAN I INSTALL THIS ABOVE MY PROJECT (common to all MY projects )
C) Arduino IDE is an all containing packet
PLEASE DOCUMENT WHERE TO FIND THESE CORE LIBRARIES !!!!!!
WILL THIS SOLVE THE ARDUINI.H proroble m and simular FOR EVER ..... [ YES /NO ]
PLease do NOT refer me to standards Using any off the utility libraries
please Platform IO on its own caused MONTHS of delay .... BE EXPLICT
FOR ARDUINO IDE the y can be INTERNAL ( included in the packet !!!!)
FOR PLATFORM IO THIS MUST BE EXPLICITELY DOCUMENTED NOT INTERNAL IN THE PACKET
Sorry for the capitals MONTHS frustration ......
Why have you defined the framework as framework = espidf
when you are doing Arduino code?
Change it to :
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
upload_port = COM4
And try compiling that code again. The IntelliSense (red squiggle underlines) should then go away, and compilation should be successful. If it compiles successfully, but the squiggles remain and there is stuff listed in the Problems
tab then there is still something wrong with the Microsoft C/C++ extension’s IntelliSense configuration.
Addendum: upload_options
is also not valid, it should have been upload_port
.
Negatve it does not.
I m that hopeless i tried everything including all frameworks.
Need to know where it picks rhe libraries typicaly the arduino core libraries using esp32 mainly.
Os windows 10.
Leads to failed link --verbose without errors at random…
Even after 100 reinstalls…
Compilers do not do things randomly, so that is not the case.
With the following platformio.ini
and main.cpp
, what is the compiler output / build log?
platformio.ini
:
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
upload_port = COM4
main.cpp
:
#include <Arduino.h>
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("I am the HAL 2000 and I never made an error !");
}
void loop() {
// put your main code here, to run repeatedly:
delay(100);
}
You should get something something like this. Post yours in the reply.
Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 1.12.0 > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10004.200129 (1.0.4)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 26 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\esp-wrover-kit\src\main.cpp.o
Generating partitions .pio\build\esp-wrover-kit\partitions.bin
Archiving .pio\build\esp-wrover-kit\libFrameworkArduinoVariant.a
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\Esp.cpp.o
Indexing .pio\build\esp-wrover-kit\libFrameworkArduinoVariant.a
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\Print.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\WString.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\base64.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\main.cpp.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\esp-wrover-kit\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\esp-wrover-kit\libFrameworkArduino.a
Indexing .pio\build\esp-wrover-kit\libFrameworkArduino.a
Linking .pio\build\esp-wrover-kit\firmware.elf
Retrieving maximum program size .pio\build\esp-wrover-kit\firmware.elf
Checking size .pio\build\esp-wrover-kit\firmware.elf
Building .pio\build\esp-wrover-kit\firmware.bin
esptool.py v2.6
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 4.7% (used 15436 bytes from 327680 bytes)
Flash: [== ] 16.5% (used 216653 bytes from 1310720 bytes)
======================================================= [SUCCESS] Took 37.89 seconds =======================================================
It keeps coming back as soon as you re-edit the file!
EDITED/SOLUTION:
Disabled ’ C/C++ Clang Command Adapter, by Yasuaki MITANI’.
‘C/C++ for Visual Studio Code, by Microsoft’ seems to be doing the job…
I noticed that problem appeared after cmake installation… so I deleted cmake and extensions
What is your OS where you have installer PlatformIO ?
OS version / Linux Kernel ?