espressif / vscode-esp-idf-extension

Visual Studio Code extension for ESP-IDF projects
https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/
Apache License 2.0
1.06k stars 304 forks source link

SDK Configuration Editor (menuconfig): Failed to save to "sdkconfig_debug" (VSC-1190) #1043

Closed vdm97 closed 9 months ago

vdm97 commented 1 year ago

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

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.19045 
System environment variable IDF_PYTHON_ENV_PATH 
 undefined 
System environment variable PATH 
 C:<HOMEPATH>Program Files (x86)<HOMEPATH>Common Files<HOMEPATH>Oracle<HOMEPATH>Java<HOMEPATH>javapath;C:<HOMEPATH>Program Files<HOMEPATH>Python39<HOMEPATH>Scripts<HOMEPATH>;C:<HOMEPATH>Program Files<HOMEPATH>Python39<HOMEPATH>;C:<HOMEPATH>WINDOWS<HOMEPATH>system32;C:<HOMEPATH>WINDOWS;C:<HOMEPATH>WINDOWS<HOMEPATH>System32<HOMEPATH>Wbem;C:<HOMEPATH>WINDOWS<HOMEPATH>System32<HOMEPATH>WindowsPowerShell<HOMEPATH>v1.0<HOMEPATH>;C:<HOMEPATH>WINDOWS<HOMEPATH>System32<HOMEPATH>OpenSSH<HOMEPATH>;C:<HOMEPATH>Program Files<HOMEPATH>dotnet<HOMEPATH>;C:<HOMEPATH>Program Files<HOMEPATH>Microsoft VS Code<HOMEPATH>bin;C:<HOMEPATH>Program Files<HOMEPATH>Microsoft SQL Server<HOMEPATH>130<HOMEPATH>Tools<HOMEPATH>Binn<HOMEPATH>;C:<HOMEPATH>Program Files (x86)<HOMEPATH>GtkSharp<HOMEPATH>2.12<HOMEPATH>bin;C:<HOMEPATH>Program Files<HOMEPATH>Microsoft SQL Server<HOMEPATH>Client SDK<HOMEPATH>ODBC<HOMEPATH>170<HOMEPATH>Tools<HOMEPATH>Binn<HOMEPATH>;C:<HOMEPATH>Program Files<HOMEPATH>PuTTY<HOMEPATH>;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>AppData<HOMEPATH>Roaming<HOMEPATH>nvm;C:<HOMEPATH>Program Files<HOMEPATH>nodejs;C:<HOMEPATH>Program Files<HOMEPATH>TortoiseSVN<HOMEPATH>bin;C:<HOMEPATH>Program Files (x86)<HOMEPATH>Nordic Semiconductor<HOMEPATH>nrf-command-line-tools<HOMEPATH>bin<HOMEPATH>;C:<HOMEPATH>Program Files (x86)<HOMEPATH>Gpg4win<HOMEPATH>..<HOMEPATH>GnuPG<HOMEPATH>bin;C:<HOMEPATH>ProgramData<HOMEPATH>chocolatey<HOMEPATH>bin;C:<HOMEPATH>android<HOMEPATH>platform-tools;C:<HOMEPATH>Strawberry<HOMEPATH>c<HOMEPATH>bin;C:<HOMEPATH>Strawberry<HOMEPATH>perl<HOMEPATH>site<HOMEPATH>bin;C:<HOMEPATH>Strawberry<HOMEPATH>perl<HOMEPATH>bin;C:<HOMEPATH>Program Files<HOMEPATH>TortoiseGit<HOMEPATH>bin;C:<HOMEPATH>Program Files<HOMEPATH>Git<HOMEPATH>cmd;C:<HOMEPATH>Program Files (x86)<HOMEPATH>Windows Kits<HOMEPATH>10<HOMEPATH>Windows Performance Toolkit<HOMEPATH>;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>.cargo<HOMEPATH>bin;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>AppData<HOMEPATH>Local<HOMEPATH>Microsoft<HOMEPATH>WindowsApps;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>AppData<HOMEPATH>Roaming<HOMEPATH>nvm;C:<HOMEPATH>Program Files<HOMEPATH>nodejs;C:<HOMEPATH>svn<HOMEPATH>P_ARM<HOMEPATH>ESP32;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>.dotnet<HOMEPATH>tools;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>.dotnet<HOMEPATH>tools;C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>AppData<HOMEPATH>Roaming<HOMEPATH>Python<HOMEPATH>Python39<HOMEPATH>Scripts;C:<HOMEPATH>Program Files<HOMEPATH>OpenSSL-Win64<HOMEPATH>bin; 
System environment variable PYTHON 
 undefined 
Visual Studio Code version 1.82.1 
Visual Studio Code language en 
Visual Studio Code shell C:<HOMEPATH>WINDOWS<HOMEPATH>System32<HOMEPATH>WindowsPowerShell<HOMEPATH>v1.0<HOMEPATH>powershell.exe 
ESP-IDF Extension version 1.6.4 
Workspace folder c:<HOMEPATH>svn<HOMEPATH>P_ARM<HOMEPATH>ESP32 
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
Custom extra paths (idf.customExtraPaths) c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp-elf-gdb<HOMEPATH>12.1_20221002<HOMEPATH>xtensa-esp-elf-gdb<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>riscv32-esp-elf-gdb<HOMEPATH>12.1_20221002<HOMEPATH>riscv32-esp-elf-gdb<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32-elf<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32s2-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32s2-elf<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32s3-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32s3-elf<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>riscv32-esp-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>riscv32-esp-elf<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp32ulp-elf<HOMEPATH>2.35_20220830<HOMEPATH>esp32ulp-elf<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>cmake<HOMEPATH>3.24.0<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>openocd-esp32<HOMEPATH>v0.12.0-esp32-20230419<HOMEPATH>openocd-esp32<HOMEPATH>bin;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>ninja<HOMEPATH>1.10.2;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>idf-exe<HOMEPATH>1.0.3;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>ccache<HOMEPATH>4.8<HOMEPATH>ccache-4.8-windows-x86_64;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>dfu-util<HOMEPATH>0.11<HOMEPATH>dfu-util-0.11-win64;c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp-rom-elfs<HOMEPATH>20230320
Custom extra vars (idf.customExtraVars)
    OPENOCD_SCRIPTS: c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>openocd-esp32<HOMEPATH>v0.12.0-esp32-20230419/openocd-esp32/share/openocd/scripts
    IDF_CCACHE_ENABLE: 1
    ESP_ROM_ELF_DIR: c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp-rom-elfs<HOMEPATH>20230320/
Virtual env Python Path (idf.pythonBinPath) c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>python_env<HOMEPATH>idf5.1_py3.11_env<HOMEPATH>Scripts<HOMEPATH>python.exe
Serial port (idf.port) COM3
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32.cfg,target/esp_common.cfg
ESP-IDF Tools Path (idf.toolsPath) c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools
Git Path (idf.gitPath) c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>idf-git<HOMEPATH>2.39.2<HOMEPATH>cmd<HOMEPATH>git.exe
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-IDF Custom extra paths
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp-elf-gdb<HOMEPATH>12.1_20221002<HOMEPATH>xtensa-esp-elf-gdb<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>riscv32-esp-elf-gdb<HOMEPATH>12.1_20221002<HOMEPATH>riscv32-esp-elf-gdb<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32-elf<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32s2-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32s2-elf<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32s3-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32s3-elf<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>riscv32-esp-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>riscv32-esp-elf<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp32ulp-elf<HOMEPATH>2.35_20220830<HOMEPATH>esp32ulp-elf<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>cmake<HOMEPATH>3.24.0<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>openocd-esp32<HOMEPATH>v0.12.0-esp32-20230419<HOMEPATH>openocd-esp32<HOMEPATH>bin: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>ninja<HOMEPATH>1.10.2: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>idf-exe<HOMEPATH>1.0.3: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>ccache<HOMEPATH>4.8<HOMEPATH>ccache-4.8-windows-x86_64: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>dfu-util<HOMEPATH>0.11<HOMEPATH>dfu-util-0.11-win64: true
Access to c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp-rom-elfs<HOMEPATH>20230320: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path true
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp-elf-gdb<HOMEPATH>12.1_20221002<HOMEPATH>xtensa-esp-elf-gdb<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>riscv32-esp-elf-gdb<HOMEPATH>12.1_20221002<HOMEPATH>riscv32-esp-elf-gdb<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32-elf<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32s2-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32s2-elf<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>xtensa-esp32s3-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>xtensa-esp32s3-elf<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>riscv32-esp-elf<HOMEPATH>esp-12.2.0_20230208<HOMEPATH>riscv32-esp-elf<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp32ulp-elf<HOMEPATH>2.35_20220830<HOMEPATH>esp32ulp-elf<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>cmake<HOMEPATH>3.24.0<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>openocd-esp32<HOMEPATH>v0.12.0-esp32-20230419<HOMEPATH>openocd-esp32<HOMEPATH>bin: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>ninja<HOMEPATH>1.10.2: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>idf-exe<HOMEPATH>1.0.3: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>ccache<HOMEPATH>4.8<HOMEPATH>ccache-4.8-windows-x86_64: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>dfu-util<HOMEPATH>0.11<HOMEPATH>dfu-util-0.11-win64: false
Spaces in c:<HOMEPATH>Users<HOMEPATH>user<HOMEPATH>esp<HOMEPATH>esp-idf-tools<HOMEPATH>tools<HOMEPATH>esp-rom-elfs<HOMEPATH>20230320: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.39.2.windows.1
ESP-IDF version 5.1.1
Python version 3.11.2
Python's pip version 23.2.1
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.8.1
bitstring version: 4.1.2
CacheControl version: 0.13.1
certifi version: 2023.7.22
cffi version: 1.15.1
charset-normalizer version: 3.2.0
click version: 8.0.4
colorama version: 0.4.6
construct version: 2.10.68
contextlib2 version: 21.6.0
cryptography version: 39.0.2
ecdsa version: 0.18.0
esp-coredump version: 1.7.0
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.2.0
esp-idf-monitor version: 1.2.1
esp-idf-panic-decoder version: 0.1.0
esp-idf-size version: 0.4.2
esptool version: 4.7.dev1
filelock version: 3.12.4
freertos-gdb version: 1.0.2
gcovr version: 6.0
idf-component-manager version: 1.4.0
idna version: 3.4
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lxml version: 4.9.3
MarkupSafe version: 2.1.3
msgpack version: 1.0.5
packaging version: 23.1
pip version: 23.2.1
pycparser version: 2.21
pyelftools version: 0.29
pygdbmi version: 0.9.0.2
Pygments version: 2.16.1
pyparsing version: 3.0.9
pyserial version: 3.5
pywin32 version: 306
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.31.0
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
schema version: 0.7.5
setuptools version: 68.2.2
six version: 1.16.0
tqdm version: 4.66.1
urllib3 version: 1.26.16
websocket-client version: 1.6.3
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Python requirements are satisfied.
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "espidf",
            "name": "ESP32 debugger",
            "request": "launch",
            "logLevel": 2
        }
    ]
}

---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
    "configurations": [
        {
            "name": "ESP-IDF",
            "compilerPath": "",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "includePath": [
                "${config:idf.espIdfPath}/components/**",
                "${config:idf.espIdfPathWin}/components/**",
                "${workspaceFolder}/**"
            ],
            "browse": {
                "path": [
                    "${config:idf.espIdfPath}/components",
                    "${config:idf.espIdfPathWin}/components",
                    "${workspaceFolder}"
                ],
                "limitSymbolsToIncludedHeaders": false
            }
        }
    ],
    "version": 4
}

--------------------------------------------------------------------------------------------------------------------------------------------

Extension

{
    "message": "Error: Failed to save to \"sdkconfig_debug\": [Errno 22] Invalid argument: '\"sdkconfig_debug\"'\r\r\n",
    "stack": "Error: Error: Failed to save to \"sdkconfig_debug\": [Errno 22] Invalid argument: '\"sdkconfig_debug\"'\r\r\n\n\tat Ct.printError (\\dist\\extension.js:2:1220677)\n\tat Socket.<anonymous> (\\dist\\extension.js:2:1220153)\n\tat Socket.emit (node:events:513:28)\n\tat addChunk (node:internal/streams/readable:324:12)\n\tat readableAddChunk (node:internal/streams/readable:297:9)\n\tat Readable.push (node:internal/streams/readable:234:10)\n\tat Pipe.onStreamRead (node:internal/stream_base_commons:190:23)\n\tat Pipe.callbackTrampoline (node:internal/async_hooks:130:17)",
    "level": "error",
    "timestamp": "2023-09-20T09:03:35.512Z"
}

Description

Hi, i have renamed my sdkconfig to sdkconfig_debug or sdkconfig_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 of CMakeLists.txt and is used to choose the correct sdkconfig according to Debug- or Release-Mode and automatically detect changes:

if (COMPILE_AS_DEBUG)
    add_compile_definitions(DEBUG)
    set(SDKCONFIG "sdkconfig_debug")
else()
    set(SDKCONFIG "sdkconfig_release")
endif()
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/sdkconfig")
    file(REMOVE ${SDKCONFIG})
    file(RENAME "sdkconfig" "${SDKCONFIG}")
endif()
set(SDKCONFIG_DEFAULTS ${SDKCONFIG})

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:

[SDK Configuration Editor]
{"version":2,"save":"c:\\path\\to\\ESP32\\sdkconfig"}
[SDK Configuration Editor]
Saving config to c:\path\to\ESP32\sdkconfig...

This means that the settings were correctly loaded from the sdkconfig_debug or sdkconfig_release and then saved to sdkconfig. In the next compilation the sdkconfig will be renamed back to sdkconfig_debug or sdkconfig_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:

[SDK Configuration Editor]
{"version":2,"save":"\"sdkconfig_debug\""}
[SDK Configuration Editor]
Saving config to "sdkconfig_debug"...

[SDK Configuration Editor]
{"version": 2, "values": {}, "ranges": {}, "visible": {}, "error": ["Failed to save to \"sdkconfig_debug\": [Errno 22] Invalid argument: '\"sdkconfig_debug\"'"]}

[SDK Configuration Editor]
---------------------------ERROR--------------------------
Error: Failed to save to "sdkconfig_debug": [Errno 22] Invalid argument: '"sdkconfig_debug"'
-----------------------END OF ERROR-----------------------

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 or sdkconfig_release) instead of always with the name sdkconfig. 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

Provided in Description.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

brianignacio5 commented 1 year ago

Have you tried using the idf.sdkconfigFilePath settings in your project .vscode/settings.json ?

Maybe to something like c:\path\to\project\sdkconfig

vdm97 commented 1 year ago

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?

github-actions[bot] commented 1 year ago

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

brianignacio5 commented 9 months ago

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:

  1. SDKCONFIG_DEFAULTS="sdkconfig_debug" for debug case with idf.sdkconfigDefaults; ["sdkconfig_debug"]
  2. SDKCONFIG_DEFAULTS="sdkconfig_release" for release with 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.