Closed woshiwstt50123 closed 1 year ago
You don't need to execute export.ps1 when using the vscode extension. Seems that your extension is configured so you can use the extension commands to use ESP-IDF. Consider the case that c:\esp
is not the expected IDF_TOOLS_PATH in the export.ps1 directory.
OS
Windows
Operating System version
Windows11 22H2
Visual Studio Code version
1.73.1
ESP-IDF version
5.1
Python version
3.11.2
Doctor command output
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS win32 x64 10.0.22621 System environment variable IDF_PYTHON_ENV_PATH undefined System environment variable PATH C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\LINQPad7;C:\Program Files\LLVM\bin;C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\xmake;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\PowerShell\7\;C:\Program Files\Microsoft SQL Server\Client SDK\O;C:\AppData\Local\Programs\Python\Python311\;C:\AppData\Local\Programs\Python\Python311\Scripts\;C:\esp\tools\cmake\3.24.0\bin;C:\esp\tools\ninja\1.10.2\
System environment variable PYTHON
undefined
Visual Studio Code version 1.73.1
Visual Studio Code language zh-cn
Visual Studio Code shell C:\Program Files\PowerShell\7\pwsh.exe
ESP-IDF Extension version 1.6.4
Workspace folder c:\MyWork\ESP_C6\hello_world
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\esp\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:\esp\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin;c:\esp\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin;c:\esp\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin;c:\esp\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin;c:\esp\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin;c:\esp\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin;c:\esp\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;c:\esp\tools\cmake\3.24.0\bin;c:\esp\tools\openocd-esp32\v0.12.0-esp32-20230419\openocd-esp32\bin;c:\esp\tools\ninja\1.10.2;c:\esp\tools\idf-exe\1.0.3;c:\esp\tools\ccache\4.8\ccache-4.8-windows-x86_64;c:\esp\tools\dfu-util\0.11\dfu-util-0.11-win64;c:\esp\tools\esp-rom-elfs\20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: c:\esp\tools\openocd-esp32\v0.12.0-esp32-20230419/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: c:\esp\tools\esp-rom-elfs\20230320/
Virtual env Python Path (idf.pythonBinPath) c:\esp\python_env\idf5.1_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM7
OpenOCD Configs (idf.openOcdConfigs) board/esp32c6-builtin.cfg
ESP-IDF Tools Path (idf.toolsPath) c:\esp
Git Path (idf.gitPath) c:\esp\tools\idf-git\2.39.2\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-Matter Path (idf.espMatterPath) false
Access to ESP-IDF Custom extra paths
Access to c:\esp\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin: true
Access to c:\esp\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin: true
Access to c:\esp\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: true
Access to c:\esp\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: true
Access to c:\esp\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: true
Access to c:\esp\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: true
Access to c:\esp\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true
Access to c:\esp\tools\cmake\3.24.0\bin: true
Access to c:\esp\tools\openocd-esp32\v0.12.0-esp32-20230419\openocd-esp32\bin: true
Access to c:\esp\tools\ninja\1.10.2: true
Access to c:\esp\tools\idf-exe\1.0.3: true
Access to c:\esp\tools\ccache\4.8\ccache-4.8-windows-x86_64: true
Access to c:\esp\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to c:\esp\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-IDF Custom extra paths
Spaces in c:\esp\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin: false
Spaces in c:\esp\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin: false
Spaces in c:\esp\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: false
Spaces in c:\esp\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: false
Spaces in c:\esp\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: false
Spaces in c:\esp\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: false
Spaces in c:\esp\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false
Spaces in c:\esp\tools\cmake\3.24.0\bin: false
Spaces in c:\esp\tools\openocd-esp32\v0.12.0-esp32-20230419\openocd-esp32\bin: false
Spaces in c:\esp\tools\ninja\1.10.2: false
Spaces in c:\esp\tools\idf-exe\1.0.3: false
Spaces in c:\esp\tools\ccache\4.8\ccache-4.8-windows-x86_64: false
Spaces in c:\esp\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in c:\esp\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.0
Python version 3.11.2
Python's pip version 23.1.2
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitstring version: 4.0.2
CacheControl version: 0.13.1
certifi version: 2023.5.7
cffi version: 1.15.1
charset-normalizer version: 3.1.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.5.2
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.1.0
esp-idf-monitor version: 1.1.1
esp-idf-size version: 0.3.1
esptool version: 4.6.2
filelock version: 3.12.2
freertos-gdb version: 1.0.2
gcovr version: 6.0
idf-component-manager version: 1.3.1
idna version: 3.4
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lxml version: 4.9.2
MarkupSafe version: 2.1.3
msgpack version: 1.0.5
packaging version: 23.1
pip version: 23.1.2
pycparser version: 2.21
pyelftools version: 0.29
pygdbmi version: 0.9.0.2
Pygments version: 2.15.1
pyparsing version: 3.0.9
pyserial version: 3.5
pywin32 version: 306
PyYAML version: 6.0
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.0.0
six version: 1.16.0
tqdm version: 4.65.0
urllib3 version: 1.26.16
websocket-client version: 1.6.1
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages C:\esp\esp-idf\tools\check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Python requirements are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages C:\esp\esp-idf\tools\check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages C:\esp\esp-idf\tools\check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Python requirements are satisfied.
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch",
"debugPort": 43474,
"logLevel": 2,
"mode": "manual",
"verifyAppBinBeforeDebug": false,
"tmoScaleFactor": 1,
"initGdbCommands": [
"target remote :3333",
"symbol-file /path/to/program.elf",
"mon reset halt",
"flushregs",
"thb app_main"
],
"env": {
"CUSTOM_ENV_VAR": "SOME_VALUE"
}
},
{
"name": "GDB",
"type": "cppdbg",
"request": "launch",
"MIMode": "gdb",
"miDebuggerPath": "${command:espIdf.getXtensaGdb}",
"program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
"windows": {
"name": "GDB",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\build\${command:espIdf.getProjectName}.elf"
},
"cwd": "${workspaceFolder}",
"environment": [
{
"name": "PATH",
"value": "${config:idf.customExtraPaths}"
}
],
"setupCommands": [
{
"text": "target remote :3333"
},
{
"text": "set remote hardware-watchpoint-limit 2"
},
{
"text": "mon reset halt"
},
{
"text": "thb app_main"
},
{
"text": "flushregs"
}
],
"externalConsole": false,
"logging": {
"engineLogging": true
}
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "c:\Users\TangTao\esp\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin\riscv32-esp-elf-gcc.exe",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/",
"${config:idf.espAdfPath}/components/",
"${config:idf.espAdfPathWin}/components/",
"${workspaceFolder}/"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
},
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
Extension
No response
Description
使用\esp\esp-idf目录下的export.ps1添加环境变量Path时,得到如下报错: Setting IDF_PATH: C:\Users\TangTao\esp\esp-idf Checking Python compatibility Adding ESP-IDF tools to PATH... ERROR: tool xtensa-esp-elf-gdb has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool riscv32-esp-elf-gdb has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool xtensa-esp32-elf has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool xtensa-esp32s2-elf has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool xtensa-esp32s3-elf has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool riscv32-esp-elf has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool esp32ulp-elf has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool openocd-esp32 has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool idf-exe has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool ccache has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool dfu-util has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it. ERROR: tool esp-rom-elfs has no installed versions. Please run 'C:\Users\TangTao\AppData\Local\Programs\Python\Python311\python.exe C:\Users\TangTao\esp\esp-idf\tools\idf_tools.py install' to install it.
实际上我查看过,这里面提到的每一个tool都在\esp\tools目录下出现了。 我希望能解决这些报错,成功添加环境变量。
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide