Visual Studio Code c_cpp_properties content to satisfy IntelliSense and to stop annoy people
Posted: Wed Apr 07, 2021 8:15 am
Hello,
After hours of googling and testing various c_cpp_properties settings, my current version looks like this:
IntelliSense no more screams at me about any of libraries but it does not like some of the sdkconfig defined constants. For example, if I put this in c_cpp_properties.json in the blink example project, IntelliSense says that CONFIG_BLINK_PERIOD is undefined and portTICK_PERIOD_MS definition includes CONFIG_FREERTOS_HZ which is also undefined. In case of wifi station example, IntelliSense warns me about EXAMPLE_ESP_MAXIMUM_RETRY as it thinks that CONFIG_ESP_MAXIMUM_RETRY is undefined etc. This is really annoying so I would be really happy if any of you could tell me what else should I add to my c_cpp_properties.json so that I could happily use the ESP-IDF on Visual Studio Code.
I am using ESP-IDF 4.2, if that helps.
After hours of googling and testing various c_cpp_properties settings, my current version looks like this:
Code: Select all
{
"configurations": [
{
"name": "Linux",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"${config:idf.espIdfPath}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
},
"compilerPath": "/home/myname/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc"
}
],
"version": 4
}
I am using ESP-IDF 4.2, if that helps.