Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

menuconfig button not relates on selected project configuration (multi_config project) (VSC-1454) #1265

Closed
1 task done
executer-uno opened this issue Jul 29, 2024 · 2 comments · Fixed by #1252
Closed
1 task done
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@executer-uno
Copy link

executer-uno commented Jul 29, 2024

OS

Windows

Operating System version

Windows 10 Pro

Visual Studio Code version

1.91.1

ESP-IDF version

5.1.4

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:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\PuTTY;C:\Program Files\IVI Foundation\VISA\Win64\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\msys64\mingw64\bin;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Local\Programs\Microsoft VS Code\bin;C:\CMake\bin;D:\Downloads\make-3.81-bin\bin;
System environment variable PYTHON
undefined
Visual Studio Code version 1.91.1
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.8.0
Workspace folder d:\Documents\VSC_Workspace\IDF_multi_config2\multi_config
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) c:\esp\v5.1\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${env:HOMEKIT_PATH}
Custom extra paths (idf.customExtraPaths) c:\esp-idf5.1\tools\xtensa-esp-elf-gdb\12.1_20231023\xtensa-esp-elf-gdb\bin;c:\esp-idf5.1\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin;c:\esp-idf5.1\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin;c:\esp-idf5.1\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin;c:\esp-idf5.1\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin;c:\esp-idf5.1\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin;c:\esp-idf5.1\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;c:\esp-idf5.1\tools\cmake\3.24.0\bin;c:\esp-idf5.1\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin;c:\esp-idf5.1\tools\ninja\1.10.2;c:\esp-idf5.1\tools\idf-exe\1.0.3;c:\esp-idf5.1\tools\ccache\4.8\ccache-4.8-windows-x86_64;c:\esp-idf5.1\tools\dfu-util\0.11\dfu-util-0.11-win64;c:\esp-idf5.1\tools\esp-rom-elfs\20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: c:\esp-idf5.1\tools\openocd-esp32\v0.12.0-esp32-20240318/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: c:\esp-idf5.1\tools\esp-rom-elfs\20230320/
Virtual env Python Path (idf.pythonBinPath) c:\esp-idf5.1\python_env\idf5.1_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM1
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg
ESP-IDF Tools Path (idf.toolsPath) c:\esp-idf5.1
Git Path (idf.gitPath) c:\esp-idf5.1\tools\idf-git\2.39.2\cmd\git.exe
Notification Mode (idf.notificationMode) All
-------------------------------------------------------- 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-HomeKit Path (idf.espHomeKitSdkPath) false
Access to ESP-IDF Custom extra paths
Access to c:\esp-idf5.1\tools\xtensa-esp-elf-gdb\12.1_20231023\xtensa-esp-elf-gdb\bin: true
Access to c:\esp-idf5.1\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin: true
Access to c:\esp-idf5.1\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: true
Access to c:\esp-idf5.1\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: true
Access to c:\esp-idf5.1\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: true
Access to c:\esp-idf5.1\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: true
Access to c:\esp-idf5.1\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true
Access to c:\esp-idf5.1\tools\cmake\3.24.0\bin: true
Access to c:\esp-idf5.1\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin: true
Access to c:\esp-idf5.1\tools\ninja\1.10.2: true
Access to c:\esp-idf5.1\tools\idf-exe\1.0.3: true
Access to c:\esp-idf5.1\tools\ccache\4.8\ccache-4.8-windows-x86_64: true
Access to c:\esp-idf5.1\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to c:\esp-idf5.1\tools\esp-rom-elfs\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-HomeKit-SDK Path (idf.espHomeKitSdkPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in c:\esp-idf5.1\tools\xtensa-esp-elf-gdb\12.1_20231023\xtensa-esp-elf-gdb\bin: false
Spaces in c:\esp-idf5.1\tools\riscv32-esp-elf-gdb\12.1_20231023\riscv32-esp-elf-gdb\bin: false
Spaces in c:\esp-idf5.1\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: false
Spaces in c:\esp-idf5.1\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: false
Spaces in c:\esp-idf5.1\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: false
Spaces in c:\esp-idf5.1\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: false
Spaces in c:\esp-idf5.1\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false
Spaces in c:\esp-idf5.1\tools\cmake\3.24.0\bin: false
Spaces in c:\esp-idf5.1\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin: false
Spaces in c:\esp-idf5.1\tools\ninja\1.10.2: false
Spaces in c:\esp-idf5.1\tools\idf-exe\1.0.3: false
Spaces in c:\esp-idf5.1\tools\ccache\4.8\ccache-4.8-windows-x86_64: false
Spaces in c:\esp-idf5.1\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in c:\esp-idf5.1\tools\esp-rom-elfs\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.4
Python version 3.11.2
Python's pip version 24.1.1
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
Selected configuration: prod1

Configuration name: currentProjectConfKey
---- Build section ----
Compile Arguments:
Ninja Arguments:
Build directory path: ${workspaceFolder}\build_prod1
SDKConfig defaults : sdkconfig.prod_common,sdkconfig.prod1
---- Environment variables section ----
Flash baud rate:
IDF Target:
Monitor baud rate:
---- OpenOCD section ----
Debug level: 0
Configuration files:
Launch arguments:
---- Tasks section ----
Pre build task:
Post build task:
Pre flash task:
Post flash task:
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.9.2
bitstring version: 4.2.3
CacheControl version: 0.14.0
certifi version: 2024.6.2
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.1.7
colorama version: 0.4.6
construct version: 2.10.70
contextlib2 version: 21.6.0
cryptography version: 39.0.2
ecdsa version: 0.19.0
esp-coredump version: 1.11.0
esp-idf-kconfig version: 1.4.2
esp-idf-monitor version: 1.4.0
esp-idf-panic-decoder version: 1.1.0
esp-idf-size version: 1.5.0
esptool version: 4.7.0
filelock version: 3.15.4
freertos-gdb version: 1.0.3
idf-component-manager version: 1.5.3
idna version: 3.7
intelhex version: 2.3.0
kconfiglib version: 14.1.0
markdown-it-py version: 3.0.0
mdurl version: 0.1.2
msgpack version: 1.0.8
packaging version: 24.1
pip version: 24.1.1
pycparser version: 2.22
pyelftools version: 0.29
pygdbmi version: 0.11.0.0
Pygments version: 2.18.0
pyparsing version: 3.0.9
pyserial version: 3.5
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.32.3
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
rich version: 13.7.1
schema version: 0.7.5
setuptools version: 70.2.0
six version: 1.16.0
tqdm version: 4.66.4
urllib3 version: 1.26.19
windows-curses version: 2.3.3
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Error
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter"
},
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe",
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/
",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
}

----------------------------------------------------------- Latest error -----------------------------------------------------------------
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "c:\esp-idf5.1\python_env\idf5.1_py3.11_env\Scripts\python.exe c:\esp\v5.1\esp-idf\tools\check_python_dependencies.py -r c:\.vscode\extensions\espressif.esp-idf-extension-1.8.0\esp_debug_adapter\requirements.txt"
}

----------------------------------------------------------- Logfile -----------------------------------------------------------------
{"message":"Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat \dist\extension.js:2:1464939\n\tat ChildProcess.exithandler (node:child_process:415:7)\n\tat ChildProcess.emit (node:events:514:28)\n\tat maybeClose (node:internal/child_process:1105:16)\n\tat ChildProcess._handle.onexit (node:internal/child_process:305:5)","level":"error","timestamp":"2024-07-29T10:39:39.724Z"}
{"message":"Compiler supported targets: xtensa-esp32-elf\r\n\r\n","stack":"Error: Compiler supported targets: xtensa-esp32-elf\r\n\r\n\n\tat yt.printError (\dist\extension.js:2:1489100)\n\tat Socket. (\dist\extension.js:2:1488576)\n\tat Socket.emit (node:events:514:28)\n\tat addChunk (node:internal/streams/readable:376:12)\n\tat readableAddChunk (node:internal/streams/readable:349:9)\n\tat Readable.push (node:internal/streams/readable:286:10)\n\tat Pipe.onStreamRead (node:internal/stream_base_commons:190:23)","level":"error","timestamp":"2024-07-29T10:41:06.241Z"}
{"message":"Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat \dist\extension.js:2:1464939\n\tat ChildProcess.exithandler (node:child_process:415:7)\n\tat ChildProcess.emit (node:events:514:28)\n\tat maybeClose (node:internal/child_process:1105:16)\n\tat ChildProcess._handle.onexit (node:internal/child_process:305:5)","level":"error","timestamp":"2024-07-29T10:42:22.861Z"}
{"message":"Compiler supported targets: xtensa-esp32-elf\r\n\r\n","stack":"Error: Compiler supported targets: xtensa-esp32-elf\r\n\r\n\n\tat yt.printError (\dist\extension.js:2:1489100)\n\tat Socket. (\dist\extension.js:2:1488576)\n\tat Socket.emit (node:events:514:28)\n\tat addChunk (node:internal/streams/readable:376:12)\n\tat readableAddChunk (node:internal/streams/readable:349:9)\n\tat Readable.push (node:internal/streams/readable:286:10)\n\tat Pipe.onStreamRead (node:internal/stream_base_commons:190:23)","level":"error","timestamp":"2024-07-29T10:43:10.291Z"}
{"message":"Open On-Chip Debugger v0.12.0-esp32-20230419 (2023-04-18-22:02)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.12.0-esp32-20230419 (2023-04-18-22:02)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat \dist\extension.js:2:1464939\n\tat ChildProcess.exithandler (node:child_process:415:7)\n\tat ChildProcess.emit (node:events:514:28)\n\tat maybeClose (node:internal/child_process:1105:16)\n\tat Socket. (node:internal/child_process:457:11)\n\tat Socket.emit (node:events:514:28)\n\tat Pipe. (node:net:337:12)","level":"error","timestamp":"2024-07-29T10:57:13.179Z"}
{"message":"Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat \dist\extension.js:2:1464939\n\tat ChildProcess.exithandler (node:child_process:415:7)\n\tat ChildProcess.emit (node:events:514:28)\n\tat maybeClose (node:internal/child_process:1105:16)\n\tat Socket. (node:internal/child_process:457:11)\n\tat Socket.emit (node:events:514:28)\n\tat Pipe. (node:net:337:12)","level":"error","timestamp":"2024-07-29T10:57:16.684Z"}
{"message":"Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat \dist\extension.js:2:1464939\n\tat ChildProcess.exithandler (node:child_process:415:7)\n\tat ChildProcess.emit (node:events:514:28)\n\tat maybeClose (node:internal/child_process:1105:16)\n\tat ChildProcess._handle.onexit (node:internal/child_process:305:5)","level":"error","timestamp":"2024-07-29T10:57:18.438Z"}
{"message":"Cannot access filePath: ${env:ADF_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Users\UserName\AppData\Local\Programs\Microsoft VS Code\${env:ADF_PATH}'\n\tat Object.access (node:internal/fs/sync:42:11)\n\tat Object.accessSync (node:fs:248:10)\n\tat t.accessSync (node:electron/js2c/node_init:2:8888)\n\tat Se (\dist\extension.js:2:1461757)\n\tat \dist\extension.js:2:1685466\n\tat Fs (\dist\extension.js:2:1686534)\n\tat async \dist\extension.js:2:1902761","level":"error","timestamp":"2024-07-29T10:58:07.926Z"}
{"message":"Cannot access filePath: ${env:MDF_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Users\UserName\AppData\Local\Programs\Microsoft VS Code\${env:MDF_PATH}'\n\tat Object.access (node:internal/fs/sync:42:11)\n\tat Object.accessSync (node:fs:248:10)\n\tat t.accessSync (node:electron/js2c/node_init:2:8888)\n\tat Se (\dist\extension.js:2:1461757)\n\tat \dist\extension.js:2:1685644\n\tat Fs (\dist\extension.js:2:1686534)\n\tat async \dist\extension.js:2:1902761","level":"error","timestamp":"2024-07-29T10:58:07.927Z"}
{"message":"Cannot access filePath: ${env:ESP_MATTER_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Users\UserName\AppData\Local\Programs\Microsoft VS Code\${env:ESP_MATTER_PATH}'\n\tat Object.access (node:internal/fs/sync:42:11)\n\tat Object.accessSync (node:fs:248:10)\n\tat t.accessSync (node:electron/js2c/node_init:2:8888)\n\tat Se (\dist\extension.js:2:1461757)\n\tat \dist\extension.js:2:1685736\n\tat Fs (\dist\extension.js:2:1686534)\n\tat async \dist\extension.js:2:1902761","level":"error","timestamp":"2024-07-29T10:58:07.928Z"}
{"message":"Cannot access filePath: ${env:HOMEKIT_PATH}","stack":"Error: ENOENT: no such file or directory, access 'C:\Users\UserName\AppData\Local\Programs\Microsoft VS Code\${env:HOMEKIT_PATH}'\n\tat Object.access (node:internal/fs/sync:42:11)\n\tat Object.accessSync (node:fs:248:10)\n\tat t.accessSync (node:electron/js2c/node_init:2:8888)\n\tat Se (\dist\extension.js:2:1461757)\n\tat \dist\extension.js:2:1685832\n\tat Fs (\dist\extension.js:2:1686534)\n\tat async \dist\extension.js:2:1902761","level":"error","timestamp":"2024-07-29T10:58:07.928Z"}
{"message":"Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n","stack":"Error: Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat \dist\extension.js:2:1464939\n\tat ChildProcess.exithandler (node:child_process:415:7)\n\tat ChildProcess.emit (node:events:514:28)\n\tat maybeClose (node:internal/child_process:1105:16)\n\tat ChildProcess._handle.onexit (node:internal/child_process:305:5)","level":"error","timestamp":"2024-07-29T10:58:11.208Z"}


Extension

ESP-IDF Visual Studio Code Extension v1.8.0

Description

I follow multiple build configuration tutorial with ESP-IDF multi_config example project as a base for tutorial as described there.
PS: original root CMakeLists.txt line
set(SDKCONFIG "${CMAKE_BINARY_DIR}/sdkconfig")
is not commented out.

My esp_idf_project_configuration.json:

{
  "prod1": {
    "build": {
      "compileArgs": [],
      "ninjaArgs": [],
      "buildDirectoryPath": "${workspaceFolder}\\build_prod1",
      "sdkconfigDefaults": [
        "sdkconfig.prod_common",
        "sdkconfig.prod1"
      ],
      "sdkconfigFilePath": "${workspaceFolder}\\build_prod1\\sdkconfig1"
    },
    "env": {},
    "flashBaudRate": "",
    "idfTarget": "",
    "monitorBaudRate": "",
    "openOCD": {
      "debugLevel": 0,
      "configs": [],
      "args": []
    },
    "tasks": {
      "preBuild": "",
      "preFlash": "",
      "postBuild": "",
      "postFlash": ""
    }
  },
  "prod2": {
    "build": {
      "compileArgs": [],
      "ninjaArgs": [],
      "buildDirectoryPath": "${workspaceFolder}\\build_prod2",
      "sdkconfigDefaults": [
        "sdkconfig.prod_common",
        "sdkconfig.prod2"
      ],
      "sdkconfigFilePath": "${workspaceFolder}\\build_prod2\\sdkconfig2"
    },
    "env": {},
    "flashBaudRate": "",
    "idfTarget": "",
    "monitorBaudRate": "",
    "openOCD": {
      "debugLevel": 0,
      "configs": [],
      "args": []
    },
    "tasks": {
      "preBuild": "",
      "preFlash": "",
      "postBuild": "",
      "postFlash": ""
    }
  }
}

Expected behaviour:

  1. Clear project opened with no build folders created yet
  2. Choose required project configuration in "ESP-IDF: Select Project Configuration" dialogue. Lets say "prod2" configuration
  3. Press gear icon "ESP-IDF: SDK Configuration Editor (menuconfig)"
  4. Build system takes required sdkconfigDefaults and combined them in sdkconfig2 file in build_prod2 folder
  5. We adjust sdkconfig2 in SDK Configuration editor and save it.
  6. Then we should be able to repeat step 2...6 for other configuration(s) independently.

What I got on "ESP-IDF: SDK Configuration Editor (menuconfig)":

  1. Somewhy build folder "build" still creates with menuconfig file based on sdkconfig.defaults, but it should not be used not for prod1 nor for prod2 configuration. But is is just a side effect. Opened SDK Configuration editor works with sdkconfig in build_prod2 or build_prod1 folder.
  2. Build folder where menuconfig saves sdkconfig file sticks to configuration was chosen on VSC startup and not depends on actual Project Configuration selector. So no effect of change from prod1 to prod2 config. I still edits build_prod1/sdkconfig1 file if prod1 was active on VSC startup. That can be fixed by VSC command "ESP-IDF: Dispose Current SDK Configuration Editor Server Process".
  3. In Project configuration I have sdkconfig filenames indexed as sdkconfig1 and sdkconfig2, but there are sdkconfig file with no index created in building filders.
  4. Project build works fine. everything compiled in proper build folder build_prodN and no extra "build" folder created. The issue is only about menuconfig dialogue

Debug Message

NA

Other Steps to Reproduce

There is related issue 1202 where problem behaviour described, actually, as one I would got. And only difference I noticed - I uses Windows and there is Linux used.
There is fresh workaround and pull request that supposed to fix related issue 1202 PR1252, so I expected it fixes mine. And I try it:

  1. project full clean on both configurations, so no build folders left
  2. uninstall ESP-IDF Extension and restart extensions after
  3. via command "Install from VSIX" installs provided vsix from PR1252 https://nightly.link/espressif/vscode-esp-idf-extension/actions/artifacts/1710895911.zip
  4. One issue gone - no more default "build" folder created when menuconfig called.
  5. No issue behaviour changed - sdkconfig file still sticks to configuration was chosen on VSC startup and not depends on actual Project Configuration selector. VSC command "ESP-IDF: Dispose Current SDK Configuration Editor Server Process" still helps after project configuration selector changed. And sdkconfig filename still used instead of indexed files as sdkconfig1 and sdkconfig2.

There was a note about original root CMakeLists.txt line
set(SDKCONFIG "${CMAKE_BINARY_DIR}/sdkconfig")
to be commented out. So I try it with project full clean:

  1. It fixes sdkconfig filename. Now proper indexed files sdkconfig1 and sdkconfig2 used as esp_idf_project_configuration.json requires.
  2. But it not fixes dynamic change over the configurations. Still sticks to one selected on startup, and command "ESP-IDF: Dispose Current SDK Configuration Editor Server Process" requires after new configuration selection. All the rest looks fine.

So, PR1252 fixes almost all, but command "ESP-IDF: Dispose Current SDK Configuration Editor Server Process" required after configuration selection changed.

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@executer-uno executer-uno added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Jul 29, 2024
@github-actions github-actions bot changed the title menuconfig button not relates on selected project configuration (multi_config project) menuconfig button not relates on selected project configuration (multi_config project) (VSC-1454) Jul 29, 2024
@brianignacio5
Copy link
Collaborator

Could you try the latest vsix installer ?

@executer-uno
Copy link
Author

Thanks a lot.
That fix helps. I made a test and confirms it fixes all my problems.

The problem with additional command "ESP-IDF: Dispose Current SDK Configuration Editor Server Process" required after configuration change - gone.

Proper filenames and folders from esp_idf_project_configuration.json used both for build and for menuconfig - done.

Also it fixes root's CMakeLists.txt line set(SDKCONFIG "${CMAKE_BINARY_DIR}/sdkconfig") to be commented out. Now it only forces sdkconfig filename but folder name it stored in is from esp_idf_project_configuration.json as expected. But I would not recomend to make such self-conflicted configuration, just set sdkconfig filename only in esp_idf_project_configuration.json, do not set it in CMakeLists.txt. (It still works but it sticks somewhere in temporaty folders (not in build one) and may be released only by cleaning project manually after you comment out SDKCONFIG variable in CMakeLists) - looks fine and acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants