espressif / vscode-esp-idf-extension

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

Can't build hello-world (VSC-1095) #946

Closed MoreTore closed 1 year ago

MoreTore commented 1 year ago

OS

Windows

Operating System version

Windows11

Visual Studio Code version

No response

ESP-IDF version

5

Python version

3.10

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report --------------------------------------------- OS win32 x64 10.0.22000 System environment variable IDF_PYTHON_ENV_PATH undefined System environment variable PATH C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\libnvvp;C:\Program Files\Oculus\Support\oculus-runtime;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\Nsight Compute 2021.1.0\;C:\Program Files\Microchip\xc16\v2.00\bin;C:\Program Files\PuTTY\;C:\Program Files\Cppcheck;C:\msys64\mingw64\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Conan\conan;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Local\Programs\Microsoft VS Code\bin;C:\anaconda3\condabin;C:\Program Files\Cppcheck;C:\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts;C:\Program Files (x86)\SEGGER\JLink;C:\AppData\Local\Arduino15\packages\arduino\tools\openocd\OpenOCD-20211118-0.11.0\bin;C:\AppData\Local\GitHubDesktop\bin;C:\msys64\ucrt64\bin;C:\Program Files\CMake\bin;C:\msys64;C:\Program Files\Azure Data Studio\bin;C:\mysql-8.0.32-winx64\mysql-8.0.32-winx64\bin; System environment variable PYTHON undefined Visual Studio Code version 1.77.3 Visual Studio Code language en Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ESP-IDF Extension version 1.6.1 Workspace folder c:\Projects\BacNet\ESP\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:.espressif\tools\xtensa-esp-elf-gdb\11.2_20220823\xtensa-esp-elf-gdb\bin;C:.espressif\tools\riscv32-esp-elf-gdb\11.2_20220823\riscv32-esp-elf-gdb\bin;C:.espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin;C:.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin;C:.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin;C:.espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin;C:.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;C:.espressif\tools\cmake\3.24.0\bin;C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026\openocd-esp32\bin;C:.espressif\tools\ninja\1.10.2;C:.espressif\tools\idf-exe\1.0.3;C:.espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64;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.11.0-esp32-20221026/openocd-esp32/share/openocd/scripts IDF_CCACHE_ENABLE: 1 Virtual env Python Path (idf.pythonBinPath) C:.espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe Serial port (idf.port) COM13 OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32s2.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-Matter Path (idf.espMatterPath) false Access to ESP-IDF Custom extra paths Access to C:.espressif\tools\xtensa-esp-elf-gdb\11.2_20220823\xtensa-esp-elf-gdb\bin: true Access to C:.espressif\tools\riscv32-esp-elf-gdb\11.2_20220823\riscv32-esp-elf-gdb\bin: true Access to C:.espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin: true Access to C:.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin: true Access to C:.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin: true Access to C:.espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin: true Access to C:.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true Access to C:.espressif\tools\cmake\3.24.0\bin: true Access to C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026\openocd-esp32\bin: true Access to C:.espressif\tools\ninja\1.10.2: true Access to C:.espressif\tools\idf-exe\1.0.3: true Access to C:.espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64: true Access to C:.espressif\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 -------------------------------------------------------- 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:.espressif\tools\xtensa-esp-elf-gdb\11.2_20220823\xtensa-esp-elf-gdb\bin: false Spaces in C:.espressif\tools\riscv32-esp-elf-gdb\11.2_20220823\riscv32-esp-elf-gdb\bin: false Spaces in C:.espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin: false Spaces in C:.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin: false Spaces in C:.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin: false Spaces in C:.espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin: false Spaces in C:.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false Spaces in C:.espressif\tools\cmake\3.24.0\bin: false Spaces in C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026\openocd-esp32\bin: false Spaces in C:.espressif\tools\ninja\1.10.2: false Spaces in C:.espressif\tools\idf-exe\1.0.3: false Spaces in C:.espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64: false Spaces in C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: false Spaces in Virtual env Python Path (idf.pythonBinPath) false Spaces in ESP-IDF Tools Path (idf.toolsPath) false ----------------------------------------------------------- Executables Versions ----------------------------------------------------------- Git version 2.30.1.windows.1 ESP-IDF version 5.0 Python version 3.8.7 Python's pip version 22.3.1 -------------------------------------------------- Project configuration settings ---------------------------------------------------------- -------------------------------------------------- Python packages in idf.pythonBinPath ---------------------------------------------------- bitstring version: 3.1.9 CacheControl version: 0.12.11 certifi version: 2022.12.7 cffi version: 1.15.1 charset-normalizer version: 3.0.1 click version: 8.0.4 colorama version: 0.4.6 construct version: 2.10.68 contextlib2 version: 21.6.0 cryptography version: 36.0.2 ecdsa version: 0.18.0 esp-coredump version: 1.4.2 esptool version: 4.4 freertos-gdb version: 1.0.2 future version: 0.18.2 gcovr version: 5.2 idf-component-manager version: 1.2.1 idna version: 3.4 Jinja2 version: 3.0.3 kconfiglib version: 14.1.0 lockfile version: 0.12.2 lxml version: 4.9.2 MarkupSafe version: 2.1.1 msgpack version: 1.0.4 packaging version: 23.0 pip version: 22.3.1 psutil version: 5.9.4 pycparser version: 2.21 pyelftools version: 0.27 pygdbmi version: 0.9.0.2 Pygments version: 2.14.0 pyparsing version: 3.0.9 pyserial version: 3.5 pywin32 version: 305 PyYAML version: 6.0 reedsolo version: 1.5.4 requests version: 2.28.2 requests-file version: 1.5.1 requests-toolbelt version: 0.10.1 schema version: 0.7.5 setuptools version: 66.0.0 six version: 1.16.0 tqdm version: 4.64.1 urllib3 version: 1.26.14 websocket-client version: 1.4.2 wheel version: 0.36.2 windows-curses version: 2.3.1 xmlrunner version: 1.7.7 ---------------------------------------------------- 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", "logLevel":4,

}

] } ---------------------------------------------------- Visual Studio Code c_cpp_properties.json ---------------------------------------------- { "configurations": [ { "name": "ESP-IDF", "compilerPath": "C:\Users\faste\.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin\xtensa-esp32s2-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}/components/", "${workspaceFolder}/components", "${workspaceFolder}" ], "limitSymbolsToIncludedHeaders": false }, "configurationProvider": "ms-vscode.cmake-tools" } ], "version": 4 }

Extension

No response

Description

Build error

Debug Message

CMake Warning:
  Ignoring extra path from command line:

   "C:/Users/faste/Projects/BacNet/ESP/hello_world/build/Ninja"

-- Building for: Visual Studio 17 2022
-- Found Git: C:/Users/faste/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1") 
-- The C compiler identification is MSVC 19.35.32215.0
-- The CXX compiler identification is MSVC 19.35.32215.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/faste/.espressif/tools/xtensa-esp32s2-elf/esp-2022r1-11.2.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32s2
-- Project sdkconfig file C:/Users/faste/Projects/BacNet/ESP/hello_world/sdkconfig
CMake Error at C:/Users/faste/esp/esp-idf/components/xtensa/project_include.cmake:3 (message):
  Internal error, toolchain has not been set correctly by project (or an
  invalid CMakeCache.txt file has been generated somehow)
Call Stack (most recent call first):
  C:/Users/faste/esp/esp-idf/tools/cmake/build.cmake:380 (include)
  C:/Users/faste/esp/esp-idf/tools/cmake/build.cmake:599 (__build_process_project_includes)
  C:/Users/faste/esp/esp-idf/tools/cmake/project.cmake:440 (idf_build_process)
  CMakeLists.txt:6 (project)

-- Configuring incomplete, errors occurred!
See also "C:/Users/faste/Projects/BacNet/ESP/hello_world/build/CMakeFiles/CMakeOutput.log".

 *  The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -DCMAKE_BUILD_TYPE=Debug Ninja -DPYTHON_DEPS_CHECKED=1 -S c:\Users\faste\Projects\BacNet\ESP\hello_world -B c:\Users\faste\Projects\BacNet\ESP\hello_world\build" terminated with exit code: 1.

Other Steps to Reproduce

No response

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

brianignacio5 commented 1 year ago

If you look at the build output the error seems to be a mismatch between toolchain being used.

  Internal error, toolchain has not been set correctly by project (or an
  invalid CMakeCache.txt file has been generated somehow)

I suggest deleting the build folder and try to build again.