Closed vdm97 closed 9 months ago
Have you tried using the idf.sdkconfigFilePath
settings in your project .vscode/settings.json
?
Maybe to something like c:\path\to\project\sdkconfig
Hi, thank you for the suggestion. I added "idf.sdkconfigFilePath": "${workspaceFolder}/sdkconfig"
to .vscode\settings.json
, but unfortunately the "error" ist still present. The following is the output:
[SDK Configuration Editor]
-- Project sdkconfig file C:/svn/path/to/sdkconfig_debug
[SDK Configuration Editor]
Loading defaults file C:/svn/path/to/sdkconfig_debug...
...
[SDK Configuration Editor]
{"version":2,"save":"\"sdkconfig_debug\""}
[SDK Configuration Editor]
Saving config to "sdkconfig_debug"...
[SDK Configuration Editor]
---------------------------ERROR--------------------------
Error: Failed to save to "sdkconfig_debug": [Errno 22] Invalid argument: '"sdkconfig_debug"'
-----------------------END OF ERROR-----------------------
[SDK Configuration Editor]
{"version": 2, "values": {}, "ranges": {}, "visible": {}, "error": ["Failed to save to \"sdkconfig_debug\": [Errno 22] Invalid argument: '\"sdkconfig_debug\"'"]}
Somehow the setting is ignored?
This issue has been marked as stale
since there are no activities, and this will be closed in 5 days if there are no further activities
Sorry for late reply. I've looked at the code of CMakeLists.txt again and there is something odd
You are setting SDKCONFIG first to debug or release and then using SDKCONFIG to set SDKCONFIG_DEFAULTS as set(SDKCONFIG_DEFAULTS ${SDKCONFIG})
but if you look at the esp-idf multi config example what you set to debug or release is SDKCONFIG_DEFAULTS first and keep the sdkconfig in a build relative location.
For example SDKCONFIG_DEFAULTS="sdkconfig.prod_common;sdkconfig.prod1" will yield sdkconfig for product 1 and SDKCONFIG_DEFAULTS="sdkconfig.prod_common;sdkconfig.prod2" for product 2.
In your use case you will have something like:
idf.sdkconfigDefaults; ["sdkconfig_debug"]
idf.sdkconfigDefaults; ["sdkconfig_release"]
. SDKCONFIG_DEFAULTS
values are used to generate sdkconfig files. You want a single sdkconfig (as far as I can understand) but generate it from 2 different initial values. More info here
You probably want to set multiple profiles for these. Take a look at our project configuration tutorial to a similar example as esp-idf multi config example but done with our vscode extension profiles which you can switch from one to another in a single project with ease.
OS
Windows
Operating System version
Windows 10
Visual Studio Code version
1.82.1
ESP-IDF version
5.1.1
Python version
3.11.2
Doctor command output
Extension
Description
Hi, i have renamed my
sdkconfig
tosdkconfig_debug
orsdkconfig_release
according to Debug- or Release-Mode like described here. This solution worked very nice until version 1.6 of the Espressif IDF extension. The following is part ofCMakeLists.txt
and is used to choose the correctsdkconfig
according to Debug- or Release-Mode and automatically detect changes:With version 1.5.1 of the Espressif IDF extension i get the following output when i change some settings with the SDK Configuration Editor (menuconfig) and then save them:
This means that the settings were correctly loaded from the
sdkconfig_debug
orsdkconfig_release
and then saved tosdkconfig
. In the next compilation thesdkconfig
will be renamed back tosdkconfig_debug
orsdkconfig_release
and all is good. But after updating from version 1.5.x to to version 1.6.x of the Espressif IDF extension i get the following error when i try to change and then save some settings:I assume that i get the error because the new version of the Espressif IDF extension tries to save the
sdkconfig
with the same name as it was loaded (sdkconfig_debug
orsdkconfig_release
) instead of always with the namesdkconfig
. Is there a way to fix this error? I'm afraid that at some point in the future the version 1.5.x will be incompatible with the newest ESP-IDF toolchain. Furthermore changing between 1.5.x and 1.6.x is annoying.Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide