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

Unable to resolve configuration with compilerPath (VSC-1248) #1083

Closed
1 task done
boris-gu opened this issue Nov 23, 2023 · 12 comments · Fixed by #1084
Closed
1 task done

Unable to resolve configuration with compilerPath (VSC-1248) #1083

boris-gu opened this issue Nov 23, 2023 · 12 comments · Fixed by #1084
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) stale Stale PR or Issue

Comments

@boris-gu
Copy link

boris-gu commented Nov 23, 2023

OS

Windows

Operating System version

Windows 11

Visual Studio Code version

1.84.2

ESP-IDF version

5.1.2

Python version

IDK, installed via ESP-IDF Setup

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\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\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\LLVM\bin;C:\Program Files\MATLAB\MATLAB Runtime\v95\runtime\win64;C:<HOMEPATH>\AppData\Local\Programs\Python\Python311\Scripts\;C:<HOMEPATH>\AppData\Local\Programs\Python\Python311\;C:<HOMEPATH>\AppData\Local\Microsoft\WindowsApps;C:<HOMEPATH>\AppData\Local\Programs\Microsoft VS Code\bin 
System environment variable PYTHON 
 undefined 
Visual Studio Code version 1.84.2 
Visual Studio Code language en 
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe 
ESP-IDF Extension version 1.6.5 
Workspace folder d:\Projects\ESP32\sample_project 
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:<HOMEPATH>\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:<HOMEPATH>\.espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin;C:<HOMEPATH>\.espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin;C:<HOMEPATH>\.espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin;C:<HOMEPATH>\.espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin;C:<HOMEPATH>\.espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin;C:<HOMEPATH>\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin;C:<HOMEPATH>\.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;C:<HOMEPATH>\.espressif\tools\cmake\3.24.0\bin;C:<HOMEPATH>\.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin;C:<HOMEPATH>\.espressif\tools\ninja\1.10.2;C:<HOMEPATH>\.espressif\tools\idf-exe\1.0.3;C:<HOMEPATH>\.espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64;C:<HOMEPATH>\.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:<HOMEPATH>\.espressif\tools\esp-rom-elfs\20230320
Custom extra vars (idf.customExtraVars)
    OPENOCD_SCRIPTS: C:<HOMEPATH>\.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
    IDF_CCACHE_ENABLE: 1
    ESP_ROM_ELF_DIR: C:<HOMEPATH>\.espressif\tools\esp-rom-elfs\20230320/
Virtual env Python Path (idf.pythonBinPath) C:<HOMEPATH>\.espressif\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,target/esp32.cfg
ESP-IDF Tools Path (idf.toolsPath) C:<HOMEPATH>\.espressif
Git Path (idf.gitPath) C:<HOMEPATH>\.espressif\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:<HOMEPATH>\.espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin: true
Access to C:<HOMEPATH>\.espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin: true
Access to C:<HOMEPATH>\.espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: true
Access to C:<HOMEPATH>\.espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: true
Access to C:<HOMEPATH>\.espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: true
Access to C:<HOMEPATH>\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: true
Access to C:<HOMEPATH>\.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true
Access to C:<HOMEPATH>\.espressif\tools\cmake\3.24.0\bin: true
Access to C:<HOMEPATH>\.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin: true
Access to C:<HOMEPATH>\.espressif\tools\ninja\1.10.2: true
Access to C:<HOMEPATH>\.espressif\tools\idf-exe\1.0.3: true
Access to C:<HOMEPATH>\.espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64: true
Access to C:<HOMEPATH>\.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to C:<HOMEPATH>\.espressif\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:<HOMEPATH>\.espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\cmake\3.24.0\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin: false
Spaces in C:<HOMEPATH>\.espressif\tools\ninja\1.10.2: false
Spaces in C:<HOMEPATH>\.espressif\tools\idf-exe\1.0.3: false
Spaces in C:<HOMEPATH>\.espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64: false
Spaces in C:<HOMEPATH>\.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in C:<HOMEPATH>\.espressif\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.2
Python version 3.11.2
Python's pip version 23.3.1
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.8.3
bitstring version: 4.1.3
CacheControl version: 0.13.1
certifi version: 2023.11.17
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.0.4
colorama version: 0.4.6
construct version: 2.10.69
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.4.1
esp-idf-monitor version: 1.3.3
esp-idf-panic-decoder version: 0.2.0
esp-idf-size version: 0.4.3
esptool version: 4.7.dev3
filelock version: 3.13.1
freertos-gdb version: 1.0.2
gcovr version: 6.0
idf-component-manager version: 1.4.1
idna version: 3.4
intelhex version: 2.3.0
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lxml version: 4.9.3
MarkupSafe version: 2.1.3
msgpack version: 1.0.7
packaging version: 23.2
pip version: 23.3.1
pycparser version: 2.21
pyelftools version: 0.29
pygdbmi version: 0.9.0.2
Pygments version: 2.17.2
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: 69.0.2
six version: 1.16.0
tqdm version: 4.66.1
urllib3 version: 1.26.18
websocket-client version: 1.6.4
windows-curses version: 2.3.2
---------------------------------------------------- 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 --------------------------------------------------------
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "espidf",
      "name": "Launch",
      "request": "launch"
    }
  ]
} 
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
    "configurations": [
        {
            "name": "ESP-IDF",
            "compilerPath": "${config:idf.toolsPath}\\tools\\xtensa-esp32-elf\\esp-12.2.0_20230208\\xtensa-esp32-elf\\bin\\xtensa-esp32-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
            }
        }
    ],
    "version": 4
}
 
--------------------------------------------------------------------------------------------------------------------------------------------

Extension

I couldn't insert the log because "Comment is too long (maximum is 65536 characters)"

Description

The project is building normally, but when running vs code, C/C++ issues a message

[11/23/2023, 9:02:41 AM] Unable to resolve configuration with compilerPath "${env:IDF_TOOLS_PATH}\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe".  Using "cl.exe" instead.
[11/23/2023, 9:02:41 AM] Unable to resolve configuration with compilerPath "${env:IDF_TOOLS_PATH}\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe".  Using "cl.exe" instead.

Is this normal behavior? I would like to remove these messages because they are very annoying.

image

Debug Message

Other Steps to Reproduce

I deleted the ESP-IDF extension and its folders because I installed it a long time ago. Then I installed the extension again

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@boris-gu boris-gu 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 Nov 23, 2023
@github-actions github-actions bot changed the title Unable to resolve configuration with compilerPath Unable to resolve configuration with compilerPath (VSC-1248) Nov 23, 2023
@brianignacio5
Copy link
Collaborator

Change config:idf.toolsPath to config:idf.toolsPathWin

@boris-gu
Copy link
Author

boris-gu commented Nov 23, 2023

Thank you, it helped.
Is there anyway to configure it so that I don't have to change this text myself?

@boris-gu
Copy link
Author

boris-gu commented Nov 23, 2023

I tried installing the esp-id on another computer and there I had another problem with this line. When creating a project (clean or from an example), the problem line looks like this:
"compilerPath": "${config:idf.toolsPath}undefined",
Instead of the path to the compiler, it writes undefined. Why did this happen and how can I fix it?

I do not know if I should create a new issue to solve this problem, so I wrote here

@brianignacio5
Copy link
Collaborator

Thank you, it helped.
Is there anyway to configure it so that I don't have to change this text myself?

I'll make a bug fix for this a new PR.

I tried installing the esp-id on another computer and there I had another problem with this line. When creating a project (clean or from an example), the problem line looks like this: "compilerPath": "${config:idf.toolsPath}undefined", Instead of the path to the compiler, it writes undefined. Why did this happen and how can I fix it?

I do not know if I should create a new issue to solve this problem, so I wrote here

Seems your extension might not be configured since the last part is giving undefined. Will check out too so it doesn't use this value.

@boris-gu
Copy link
Author

I found a solution to the second problem: for some reason the username was capitalized. I don't remember changing anything in this field. Maybe I forgot or the problem is due to the synchronization of vs code (on one computer I have a user Boris and on the other boris)

Screenshot 2023-11-23 172110

@brianignacio5
Copy link
Collaborator

It could be settings sync. I would recommend to disable if settings across machines have different locations.

@Benjamin45
Copy link

Change config:idf.toolsPath to config:idf.toolsPathWin

I have same issue, where I can change this settings please ?

@boris-gu
Copy link
Author

.vscode/c_cpp_properties.json in your project

Copy link

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

@github-actions github-actions bot added the stale Stale PR or Issue label Dec 13, 2023
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Dec 13, 2023
Copy link

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

@github-actions github-actions bot added the stale Stale PR or Issue label Dec 29, 2023
@github-actions github-actions bot closed this as completed Jan 3, 2024
@Brandon-Ballard25
Copy link

Im getting the same error "compilerPath": "${config:idf.toolsPathWin}undefined",

@brianignacio5
Copy link
Collaborator

Im getting the same error "compilerPath": "${config:idf.toolsPathWin}undefined",

This might be related to your extension not being configured properly at the time you created the project. Check the ESP-IDF: Doctor Command output. If extension is configured correctly you can re-create this file again with ESP-IDF: Add vscode configuration folder after deleting the original file.

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) stale Stale PR or Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants