Open Jaggana69 opened 1 month ago
@Jaggana69 Your includePath may not be configured correctly. You can run C/C++: Log Diagnostics to get more info on what is being used for configuring IntelliSense.
I was thinking that PlatformIO is supposed to write the configuration. Can you share what's inside the .vscode/c_cpp_properties.json
file that should have been written to the root of your workspace folder?
EDIT: I think this is the repo where bugs with PlatformIO configuration should be opened: https://github.com/platformio/platformio-core
Thank you for your replies. To be honnest, I don't know if it's due to PlatformIO or cpptools.
Here is the content of my .vscode\c_cpp_properties.json
// !!! WARNING !!! AUTO-GENERATED FILE!
// PLEASE DO NOT MODIFY IT AND USE "platformio.ini":
// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
//
{
"configurations": [
{
"name": "PlatformIO",
"includePath": [
"c:/Sam/3D print/Wanhao D12 300 PRO MAX/Marlin-bugfix-2.1.x/Marlin",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/SPI/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/Wire/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/cores/arduino",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/variants/mega",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/HID/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src",
""
],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"path": [
"c:/Sam/3D print/Wanhao D12 300 PRO MAX/Marlin-bugfix-2.1.x/Marlin",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/SPI/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/Wire/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/cores/arduino",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/variants/mega",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/HID/src",
"C:/Users/samuel/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src",
""
]
},
"defines": [
"PLATFORMIO=60116",
"ARDUINO_AVR_MEGA2560",
"__MARLIN_FIRMWARE__",
"NDEBUG",
"F_CPU=16000000L",
"ARDUINO_ARCH_AVR",
"ARDUINO=10808",
"__AVR_ATmega2560__",
""
],
"cStandard": "gnu11",
"cppStandard": "gnu++17",
"compilerPath": "C:/Users/samuel/.platformio/packages/toolchain-atmelavr/bin/avr-gcc.exe",
"compilerArgs": [
"-mmcu=atmega2560",
""
]
}
],
"version": 4
}
If I try to change something it's automaticly reset with those values.
The #include errors detected
message only appears when the project is not configured correctly. Since PlatformIO owns this part, my intuition is that you should report this to them. The one case I can think of that may not be their fault would be if we are not mapping your header files to a valid source file (.c or .cpp). If you open any of your .c or .cpp files and still have errors, then it's definitely a PlatformIO issue. One last idea is if PlatformIO is supposed to generate any header files for you and maybe that step has not completed yet.
@Jaggana69 Yeah, seems like a PlatformIO issue to me. If you're able to find which include header is not being found and find it's location (such as via doing Go to Definition on the #include
statements) you may be able to locate the include path that is incorrect or missing (or possibly an incorrect define which is triggering the wrong include path to be used).
Your C/C++: Log Diagnostics output (after doing the repro) might also show more info on what is actually used, such as the system includes we add from querying the compiler.
Hello,
I just intall "Visual Studio Code" to build my 3D printer firmware, I load the folder, install "PlatformIO IDE" (which install "C/C++ for Visual Studio Code"). When opening my *.h files I have an error "#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit", I look for more than 2h on internet but couldn't find anything, maybe something about IntelliSense but I don't understand what to do.
What's going on?