please allow to focus on my project which got a deadline. I am working with IDf extension 1.2 right now as it at least compiles and flashes seamlessly.
However, there are some issues left, which are key features for smooth working with the IDE.
After switching back to 1.2 I get this error when opening the project or editing the key json files setting or c_cpp_properties.json.
If they are saved the cmake compile script is invoked and through s this error
Code: Select all
CMake Error at C:/Users/ralph/esp/esp-idf/tools/cmake/project.cmake:311 (__project):The CMAKE_CXX_COMPILER:
xtensa-esp32-elf-g++
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
and the same for xtensa-esp32-elf-gcc.
However, the path are properly set in the windows path variable and the project compiles, flashes and debugs fine.
But the %PATH% variable is not set explicitly to the bin folder of the compiler. I expect that covered somewhere where the target is set through the command palette:set target. see further down.
I think due to this cmake issue the following settings in c_cpp_properties.json did not work for intellisense resolution
Code: Select all
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "C:/.espressif2/tools/xtensa-esp32s2-elf/esp-2021r2-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc.exe",
"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/**",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
},
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
I helped me for now with this following setting for c_cpp_properties.json
Code: Select all
{
"configurations": [
{
"name": "ESP-IDF",
"cStandard": "c11",
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
I need to keep on with my project for now, but if you help me to solve that last issue I will come back later to solve the problem with version 1.3
Going through lots of googling I experienced that issues with changing the extension version never goes smooth in the past. And so now with 1.3 but this time, downgrading leaves issues too. That is the worse situation.
this is my current doctor output
Code: Select all
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.19042
System environment variable IDF_PYTHON_ENV_PATH
C:\.espressif2\python_env\idf4.3_py3.8_env\Scripts
System environment variable PATH
C:\Windows\system32;%Path%;C:\Users\ralph\AppData\Roaming\npm;C:\Program Files\nodejs;C:\.espressif2\tools\cmake\3.16.4\bin;C:\.espressif2\tools\ninja\1.10.2;C:\.espressif2\python_env\idf4.3_py3.8_env\Scripts;C:\.espressif2\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin;C:\.espressif2\tools;C:\Users\ralph\AppData\Roaming\npm;C:\Users\ralph\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PhpStorm 2020.2.3\bin;;C:\Users\ralph\.dotnet\tools;C:\wamp64\bin\php\php7.4.9;C:\Users\ralph\AppData\Roaming\Composer\vendor\bin;C:\Users\ralph\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ralph\.platformio\penv\Scripts;C:\Program Files\JetBrains\CLion 2021.3.2\bin;;
System environment variable PYTHON
undefined
Visual Studio Code version 1.63.2
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.2.0
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\Users\ralph\esp\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
Custom extra paths (idf.customExtraPaths) C:\.espressif2\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin;C:\.espressif2\tools\xtensa-esp32s2-elf\esp-2021r2-8.4.0\xtensa-esp32s2-elf\bin;C:\.espressif2\tools\xtensa-esp32s3-elf\esp-2021r2-8.4.0\xtensa-esp32s3-elf\bin;C:\.espressif2\tools\riscv32-esp-elf\esp-2021r2-8.4.0\riscv32-esp-elf\bin;C:\.espressif2\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\.espressif2\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:\.espressif2\tools\cmake\3.16.4\bin;C:\.espressif2\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin;C:\.espressif2\tools\ninja\1.10.2;C:\.espressif2\tools\idf-exe\1.0.1;C:\.espressif2\tools\ccache\3.7;C:\.espressif2\tools\dfu-util\0.9\dfu-util-0.9-win64
Custom extra vars (idf.customExtraVars) {"OPENOCD_SCRIPTS":"C:\\.espressif2\\tools\\openocd-esp32\\v0.10.0-esp32-20211111/openocd-esp32/share/openocd/scripts","IDF_CCACHE_ENABLE":"1"}
Virtual env Python Path (idf.pythonBinPath) C:\.espressif2\python_env\idf4.3_py3.8_env\Scripts\python.exe
Serial port (idf.port) COM18
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32s2.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\.espressif2
Git Path (idf.gitPath) C:\.espressif2\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:\.espressif2\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin: true
Access to C:\.espressif2\tools\xtensa-esp32s2-elf\esp-2021r2-8.4.0\xtensa-esp32s2-elf\bin: true
Access to C:\.espressif2\tools\xtensa-esp32s3-elf\esp-2021r2-8.4.0\xtensa-esp32s3-elf\bin: true
Access to C:\.espressif2\tools\riscv32-esp-elf\esp-2021r2-8.4.0\riscv32-esp-elf\bin: true
Access to C:\.espressif2\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true
Access to C:\.espressif2\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: true
Access to C:\.espressif2\tools\cmake\3.16.4\bin: true
Access to C:\.espressif2\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin: true
Access to C:\.espressif2\tools\ninja\1.10.2: true
Access to C:\.espressif2\tools\idf-exe\1.0.1: true
Access to C:\.espressif2\tools\ccache\3.7: true
Access to C:\.espressif2\tools\dfu-util\0.9\dfu-util-0.9-win64: 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
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.30.1.windows.1
ESP-IDF version 4.3.2
Python version 3.8.7
Python's pip version 20.3.3
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitstring version: 3.1.9
Brotli version: 1.0.9
certifi version: 2021.10.8
cffi version: 1.15.0
charset-normalizer version: 2.0.10
click version: 8.0.3
colorama version: 0.4.4
construct version: 2.10.54
contextlib2 version: 21.6.0
cryptography version: 3.4.8
ecdsa version: 0.17.0
esp-windows-curses version: 0.1
Flask version: 0.12.5
Flask-Compress version: 1.10.1
Flask-SocketIO version: 2.9.6
future version: 0.18.2
gcovr version: 5.0
gdbgui version: 0.13.2.0
gevent version: 1.5.0
greenlet version: 1.1.2
idf-component-manager version: 1.0.0
idna version: 3.3
itsdangerous version: 2.0.1
Jinja2 version: 3.0.3
kconfiglib version: 13.7.1
lxml version: 4.7.1
MarkupSafe version: 2.0.1
pip version: 20.3.3
psutil version: 5.9.0
pycparser version: 2.21
pyelftools version: 0.27
pygdbmi version: 0.9.0.2
Pygments version: 2.11.1
pyparsing version: 2.3.1
pyserial version: 3.5
python-engineio version: 3.14.2
python-socketio version: 4.6.1
pywin32 version: 303
PyYAML version: 6.0
reedsolo version: 1.5.4
requests version: 2.27.1
requests-toolbelt version: 0.9.1
schema version: 0.7.5
semantic-version version: 2.8.5
setuptools version: 60.2.0
six version: 1.16.0
tqdm version: 4.62.3
urllib3 version: 1.26.7
websocket-client version: 1.2.3
Werkzeug version: 0.16.1
wheel version: 0.36.2
windows-curses version: 2.3.0
xmlrunner version: 1.7.7
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements from C:\Users\ralph\esp\esp-idf\requirements.txt are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages Python requirements from c:\Users\ralph\.vscode\extensions\espressif.esp-idf-extension-1.2.0\requirements.txt are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Python requirements from c:\Users\ralph\.vscode\extensions\espressif.esp-idf-extension-1.2.0\esp_debug_adapter\requirements.txt 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",
"cStandard": "c11",
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
--------------------------------------------------------------------------------------------------------------------------------------------
I just see that indeed the compiler path are not set in the PATH variable. I updated my PATH to the compiler bin folder and the error is gone. but if I do so I would need to include all three flavors of the compiler in the %PATH% ? how does the change target command mechanism work then? I have correctly set the target via the command palette.
So why did it work before changing to 1.3 and stopped working downgrading again? does it have to do that in 1.3 the microsoft extension suit is a dependency and that includes the cmake extension?
this is my final doctor output
Code: Select all
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.19042
System environment variable IDF_PYTHON_ENV_PATH
C:\.espressif2\python_env\idf4.3_py3.8_env\Scripts
System environment variable PATH
C:\Windows\system32;%Path%;C:\Users\ralph\AppData\Roaming\npm;C:\Program Files\nodejs;C:\.espressif2\tools\cmake\3.16.4\bin;C:\.espressif2\tools\ninja\1.10.2;C:\.espressif2\python_env\idf4.3_py3.8_env\Scripts;C:\.espressif2\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin;C:\.espressif2\tools;C:\Users\ralph\AppData\Roaming\npm;C:\Users\ralph\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PhpStorm 2020.2.3\bin;;C:\Users\ralph\.dotnet\tools;C:\wamp64\bin\php\php7.4.9;C:\Users\ralph\AppData\Roaming\Composer\vendor\bin;C:\Users\ralph\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ralph\.platformio\penv\Scripts;C:\Program Files\JetBrains\CLion 2021.3.2\bin;;C:\.espressif2\tools\xtensa-esp32s2-elf\esp-2021r2-8.4.0\xtensa-esp32s2-elf\bin;
System environment variable PYTHON
undefined
Visual Studio Code version 1.63.2
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.2.0
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\Users\ralph\esp\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
Custom extra paths (idf.customExtraPaths) C:\.espressif2\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin;C:\.espressif2\tools\xtensa-esp32s2-elf\esp-2021r2-8.4.0\xtensa-esp32s2-elf\bin;C:\.espressif2\tools\xtensa-esp32s3-elf\esp-2021r2-8.4.0\xtensa-esp32s3-elf\bin;C:\.espressif2\tools\riscv32-esp-elf\esp-2021r2-8.4.0\riscv32-esp-elf\bin;C:\.espressif2\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\.espressif2\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:\.espressif2\tools\cmake\3.16.4\bin;C:\.espressif2\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin;C:\.espressif2\tools\ninja\1.10.2;C:\.espressif2\tools\idf-exe\1.0.1;C:\.espressif2\tools\ccache\3.7;C:\.espressif2\tools\dfu-util\0.9\dfu-util-0.9-win64
Custom extra vars (idf.customExtraVars) {"OPENOCD_SCRIPTS":"C:\\.espressif2\\tools\\openocd-esp32\\v0.10.0-esp32-20211111/openocd-esp32/share/openocd/scripts","IDF_CCACHE_ENABLE":"1"}
Virtual env Python Path (idf.pythonBinPath) C:\.espressif2\python_env\idf4.3_py3.8_env\Scripts\python.exe
Serial port (idf.port) COM18
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32s2.cfg
ESP-IDF Tools Path (idf.toolsPath) C:\.espressif2
Git Path (idf.gitPath) C:\.espressif2\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:\.espressif2\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin: true
Access to C:\.espressif2\tools\xtensa-esp32s2-elf\esp-2021r2-8.4.0\xtensa-esp32s2-elf\bin: true
Access to C:\.espressif2\tools\xtensa-esp32s3-elf\esp-2021r2-8.4.0\xtensa-esp32s3-elf\bin: true
Access to C:\.espressif2\tools\riscv32-esp-elf\esp-2021r2-8.4.0\riscv32-esp-elf\bin: true
Access to C:\.espressif2\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin: true
Access to C:\.espressif2\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin: true
Access to C:\.espressif2\tools\cmake\3.16.4\bin: true
Access to C:\.espressif2\tools\openocd-esp32\v0.10.0-esp32-20211111\openocd-esp32\bin: true
Access to C:\.espressif2\tools\ninja\1.10.2: true
Access to C:\.espressif2\tools\idf-exe\1.0.1: true
Access to C:\.espressif2\tools\ccache\3.7: true
Access to C:\.espressif2\tools\dfu-util\0.9\dfu-util-0.9-win64: 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
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.30.1.windows.1
ESP-IDF version 4.3.2
Python version 3.8.7
Python's pip version 20.3.3
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitstring version: 3.1.9
Brotli version: 1.0.9
certifi version: 2021.10.8
cffi version: 1.15.0
charset-normalizer version: 2.0.10
click version: 8.0.3
colorama version: 0.4.4
construct version: 2.10.54
contextlib2 version: 21.6.0
cryptography version: 3.4.8
ecdsa version: 0.17.0
esp-windows-curses version: 0.1
Flask version: 0.12.5
Flask-Compress version: 1.10.1
Flask-SocketIO version: 2.9.6
future version: 0.18.2
gcovr version: 5.0
gdbgui version: 0.13.2.0
gevent version: 1.5.0
greenlet version: 1.1.2
idf-component-manager version: 1.0.0
idna version: 3.3
itsdangerous version: 2.0.1
Jinja2 version: 3.0.3
kconfiglib version: 13.7.1
lxml version: 4.7.1
MarkupSafe version: 2.0.1
pip version: 20.3.3
psutil version: 5.9.0
pycparser version: 2.21
pyelftools version: 0.27
pygdbmi version: 0.9.0.2
Pygments version: 2.11.1
pyparsing version: 2.3.1
pyserial version: 3.5
python-engineio version: 3.14.2
python-socketio version: 4.6.1
pywin32 version: 303
PyYAML version: 6.0
reedsolo version: 1.5.4
requests version: 2.27.1
requests-toolbelt version: 0.9.1
schema version: 0.7.5
semantic-version version: 2.8.5
setuptools version: 60.2.0
six version: 1.16.0
tqdm version: 4.62.3
urllib3 version: 1.26.7
websocket-client version: 1.2.3
Werkzeug version: 0.16.1
wheel version: 0.36.2
windows-curses version: 2.3.0
xmlrunner version: 1.7.7
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements from C:\Users\ralph\esp\esp-idf\requirements.txt are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages Python requirements from c:\Users\ralph\.vscode\extensions\espressif.esp-idf-extension-1.2.0\requirements.txt are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Python requirements from c:\Users\ralph\.vscode\extensions\espressif.esp-idf-extension-1.2.0\esp_debug_adapter\requirements.txt 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",
"cStandard": "c11",
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
--------------------------------------------------------------------------------------------------------------------------------------------