IDE cannot detect the sdkconfig.h setting
-
- Posts: 53
- Joined: Sun Aug 29, 2021 1:50 pm
IDE cannot detect the sdkconfig.h setting
Hi. I am using VScode and always found that the IDE seem cannot detect the sdkconfig.h setting before or after the build.
I have done a idf.py full clean and idf.py menuconfig and save, but the error seem still here. The weird part is I can still build normally. Any solution for this???
I have done a idf.py full clean and idf.py menuconfig and save, but the error seem still here. The weird part is I can still build normally. Any solution for this???
- Attachments
-
- Screenshot 2021-10-22 at 9.38.54 AM.png (593.52 KiB) Viewed 21099 times
Re: IDE cannot detect the sdkconfig.h setting
Add "${workspaceFolder}/build/config" to your includePath in c_cpp_properties.json
Also helps to include sdkconfig.h directly in files where CONFIG_ values are used.
Also helps to include sdkconfig.h directly in files where CONFIG_ values are used.
-
- Posts: 53
- Joined: Sun Aug 29, 2021 1:50 pm
Re: IDE cannot detect the sdkconfig.h setting
Seem not really work. The error still stuck here.
Code: Select all
{
"configurations": [
{
"name": "MACOS",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/include/**",
"${workspaceFolder}/components/**",
"/Users/esp32/.espressif/esp-mdf/components/**",
"/Users/esp32/.espressif/esp-mdf/esp-idf/components/**",
"${workspaceFolder}/build/config"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"compilerPath": "/Users/esp32/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
"intelliSenseMode": "macos-gcc-x64",
"browse": {
"path": [
"${workspaceFolder}/",
"${workspaceFolder}/include/",
"${workspaceFolder}/components/",
"/Users/esp32/.espressif/esp-mdf/components/",
"/Users/esp32/.espressif/esp-mdf/esp-idf/components/",
"${workspaceFolder}/build/config"
]
}
}
],
"version": 4
}
- Attachments
-
- Screenshot 2021-10-22 at 10.29.25 AM.png (586.24 KiB) Viewed 21059 times
Re: IDE cannot detect the sdkconfig.h setting
Some suggestions:
Add compileCommands: https://github.com/espressif/vscode-esp ... mmandsjson
Move the build/config entry to first in the includePath list
Improve other settings: cStandard to "c11", cppStandard to "c++17", intellisenseMode to "gcc-x86"
Ensure the Intellisense configuration is selected ("C/C++: Select a Configuration..."). I would expect to see the name, "MACOS", somewhere along the status bar.
Reset Intellisense database, restart VS Code, rescan workspace.
Add compileCommands: https://github.com/espressif/vscode-esp ... mmandsjson
Move the build/config entry to first in the includePath list
Improve other settings: cStandard to "c11", cppStandard to "c++17", intellisenseMode to "gcc-x86"
Ensure the Intellisense configuration is selected ("C/C++: Select a Configuration..."). I would expect to see the name, "MACOS", somewhere along the status bar.
Reset Intellisense database, restart VS Code, rescan workspace.
-
- Posts: 53
- Joined: Sun Aug 29, 2021 1:50 pm
Re: IDE cannot detect the sdkconfig.h setting
This one seem work now. Thanks
Code: Select all
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "/Users/esp32/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"${workspaceFolder}/build/config",
"${config:idf.espIdfPath}/components/**",
"${config:idf.espIdfPathWin}/components/**",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${config:idf.espMdfPath}/components/**",
"${config:idf.espMdfPathWin}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${workspaceFolder}/build/config",
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${config:idf.espMdfPath}/components/**",
"${config:idf.espMdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
},
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
-
- Posts: 53
- Joined: Sun Aug 29, 2021 1:50 pm
Re: IDE cannot detect the sdkconfig.h setting
updated the compiler Path
Code: Select all
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"${workspaceFolder}/build/config",
"${config:idf.espIdfPath}/components/**",
"${config:idf.espIdfPathWin}/components/**",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${config:idf.espMdfPath}/components/**",
"${config:idf.espMdfPathWin}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${workspaceFolder}/build/config",
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${config:idf.espMdfPath}/components/**",
"${config:idf.espMdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
},
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
Re: IDE cannot detect the sdkconfig.h setting
I'm hitting this issue still.
Edit: deleting compileCommands seems to have fixed it.
Edit: deleting compileCommands seems to have fixed it.
Code: Select all
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/build/config",
"${workspaceFolder}/../../esp-idf/components/nvs_flash/include",
"${workspaceFolder}/../jamcorder_common",
"${workspaceFolder}/../../esp-idf/**",
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/Volumes/User/MBP-Google-Drive/jamcorder/firmware/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"compileCommands": "/Volumes/User/MBP-Google-Drive/jamcorder/firmware/jamcorder-firmware/jamcorder_app/build/bootloader/compile_commands.json"
}
],
"version": 4
}
Re: IDE cannot detect the sdkconfig.h setting
You will get better help with compileCommands, you just have the wrong path there (that's the bootloader path).godzilla2 wrote: ↑Tue Mar 29, 2022 3:31 amdeleting compileCommands seems to have fixed it.
Code: Select all
"compileCommands": "/Volumes/User/MBP-Google-Drive/jamcorder/firmware/jamcorder-firmware/jamcorder_app/build/bootloader/compile_commands.json"
Re: IDE cannot detect the sdkconfig.h setting
Also, having just seen your GitHub issue with includes ordering, you might be interested in copying/referencing my config here which should resolve that: https://github.com/boarchuz/espidf-vsco ... rties.json (make sure to select "ESP-IDF [Xtensa | esp-2021r2-patch3-8.4.0]" for your environment).
Re: IDE cannot detect the sdkconfig.h setting
Appreciate your help, thanks for spotting that!! Your config file looks impressive. Taking a look at it.
Who is online
Users browsing this forum: Google [Bot] and 59 guests