espressif / vscode-esp-idf-extension

Visual Studio Code extension for ESP-IDF projects
Apache License 2.0
1.03k stars 301 forks source link

[Bug Report]: can't get "Use Existing Setup" option (VSC-903) #717

Closed mzimmersfluidra closed 2 years ago

mzimmersfluidra commented 2 years ago

Describe the bug I'm unable to get the extension wizard to give me the "Use Existing Setup Option." As a result, I'm not able to build from VS Code. I'm sure I'm missing a setup step, but I've gone through all the steps in the instructions, and can't see what I'm missing. To Reproduce Install ESP-IDF and toolchain to root level directories Install VS Code (system version, not user version) Open VS Code and install extension Attempt to configure extension

Expected behavior The "Use Existing Setup" option should appear.

Environment (please complete the following information):

NOTE: You can use the ESP-IDF: Doctor command to generate a report of your configuration in your clipboard which you can copy here. ---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS win32 x64 10.0.19044 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\TortoiseGit\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Michael.Zimmers\AppData\Local\Microsoft\WindowsApps;C:\Users\Michael.Zimmers\AppData\Local\Programs\Git\cmd;C:\Users\Michael.Zimmers\AppData\Local\GitHubDesktop\bin;C:\Program Files\WinMerge System environment variable PYTHON undefined Visual Studio Code version 1.67.1 Visual Studio Code language en Visual Studio Code shell C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe ESP-IDF Extension version 1.4.0 ---------------------------------------------------- Extension configuration settings ------------------------------------------------------ ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH} ESP-IDF Path (idf.espIdfPath) C:\Espressif\frameworks\esp-idf-v4.4.1 ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH} Custom extra paths (idf.customExtraPaths) C:.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin;C:.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s2-elf\bin;C:.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\bin;C:.espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin;C:.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:.espressif\tools\cmake\3.16.4\bin;C:.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\bin;C:.espressif\tools\ninja\1.10.2;C:.espressif\tools\idf-exe\1.0.1;C:.espressif\tools\ccache\3.7;C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64 Custom extra vars (idf.customExtraVars) {"OPENOCD_SCRIPTS":"C:\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401/openocd-esp32/share/openocd/scripts","IDF_CCACHE_ENABLE":"1"} Virtual env Python Path (idf.pythonBinPath) C:.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe Serial port (idf.port) COM4 OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg ESP-IDF Tools Path (idf.toolsPath) C:.espressif Git Path (idf.gitPath) C:/.espressif/tools/idf-git/2.30.1/cmd/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-IDF Custom extra paths Access to C:.espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin: true Access to C:.espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s2-elf\bin: false Access to C:.espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\bin: false Access to C:.espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin: false Access to C:.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true Access to C:.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: false Access to C:.espressif\tools\cmake\3.16.4\bin: false Access to C:.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\bin: false Access to C:.espressif\tools\ninja\1.10.2: true Access to C:.espressif\tools\idf-exe\1.0.1: false Access to C:.espressif\tools\ccache\3.7: false Access to C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: false Access to Virtual env Python Path (idf.pythonBinPath) false Access to CMake in environment PATH undefined Access to Ninja in environment PATH undefined Access to ESP-IDF Tools Path (idf.toolsPath) true ----------------------------------------------------------- Executables Versions ----------------------------------------------------------- Git version undefined ESP-IDF version undefined Python version undefined Python's pip version undefined -------------------------------------------------- Python packages in idf.pythonBinPath ---------------------------------------------------- ---------------------------------------------------- Check ESP-IDF python requirements.txt ------------------------------------------------- Check ESP-IDF Python packages undefined ---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------ Check Extension Python packages undefined ---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------ Check Debug AdapterPython packages undefined ----------------------------------------------------------- Latest error ----------------------------------------------------------------- Latest error at Command failed: "C:/.espressif/tools/idf-git/2.30.1/cmd/git.exe" --version The system cannot find the path specified.


Logs Please share the log file which can be obtained from:

{"message":"Cannot access filePath: cmake","stack":"Error: non zero exit code 1\r\n\r\nINFO: Could not find files for the given pattern(s).\r\n\n\tat ChildProcess. (\dist\extension.js:1:4499)\n\tat ChildProcess.emit (node:events:390:28)\n\tat Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)","level":"error","timestamp":"2022-05-17T22:54:35.147Z"} {"user":true,"message":"Something went wrong while trying to build the project","stack":"Error: CMake or Ninja executables not found\n\tat p. (\dist\extension.js:1:100837)\n\tat Generator.next ()\n\tat s (\dist\extension.js:1:99205)","level":"error","timestamp":"2022-05-17T22:54:35.248Z"} {"message":"non zero exit code 1\r\n\r\nINFO: Could not find files for the given pattern(s).\r\n","stack":"Error: non zero exit code 1\r\n\r\nINFO: Could not find files for the given pattern(s).\r\n\n\tat ChildProcess. (\dist\extension.js:1:4499)\n\tat ChildProcess.emit (node:events:390:28)\n\tat Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)","level":"error","timestamp":"2022-05-17T22:55:57.409Z"} {"message":"Cannot access filePath: cmake","stack":"Error: non zero exit code 1\r\n\r\nINFO: Could not find files for the given pattern(s).\r\n\n\tat ChildProcess. (\dist\extension.js:1:4499)\n\tat ChildProcess.emit (node:events:390:28)\n\tat Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)","level":"error","timestamp":"2022-05-17T22:55:57.409Z"} {"user":true,"message":"Something went wrong while trying to build the project","stack":"Error: CMake or Ninja executables not found\n\tat p. (\dist\extension.js:1:100837)\n\tat Generator.next ()\n\tat s (\dist\extension.js:1:99205)","level":"error","timestamp":"2022-05-17T22:55:57.497Z"}

Extension Configuration settings "idf.gitPath": "C:espressif\tools\idf-git\2.34.2\cmd\git.exe", "idf.espIdfPathWin": "C:\Espressif\frameworks\esp-idf-v4.4.1", "idf.pythonBinPathWin": "C:espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe", "idf.toolsPathWin": "C:espressif\", "idf.customExtraPaths": "C:espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin;C:espressif\tools\xtensa-esp32s2-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s2-elf\bin;C:espressif\tools\xtensa-esp32s3-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32s3-elf\bin;C:espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin;C:espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:espressif\tools\cmake\3.20.3\bin;C:espressif\tools\openocd-esp32\v0.11.0-esp32-20211220\openocd-esp32\bin;C:espressif\tools\ninja\1.10.2;C:espressif\tools\idf-exe\1.0.3;C:espressif\tools\ccache\4.3\ccache-4.3-windows-64;C:espressif\tools\dfu-util\0.9\dfu-util-0.9-win64", "idf.customExtraVars": "{\"OPENOCD_SCRIPTS\":\"C:\\Users\\Michael.Zimmers\\.espressif\\tools\\openocd-esp32\\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts\",\"IDF_CCACHE_ENABLE\":\"1\"}",

mzimmersfluidra commented 2 years ago

I got this fixed. When I had installed the IDF, I had deliberately excluded the toolchains for the S2 and S3 variants (to save download time, and because I wouldn't need them). I guess the IDF wizard didn't like this. I reinstalled the IDF with all options, and got the "Use Existing Setup" option. I was also able to build and flash. Thanks for looking at this.