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

Installation fails to produce settings.json file (VSC-1271) #1113

Closed
1 task done
pauljurczak opened this issue Jan 15, 2024 · 4 comments · Fixed by #1118
Closed
1 task done

Installation fails to produce settings.json file (VSC-1271) #1113

pauljurczak opened this issue Jan 15, 2024 · 4 comments · Fixed by #1118
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@pauljurczak
Copy link

OS

Windows

Operating System version

Ubuntu 23.10

Visual Studio Code version

1.85.1

ESP-IDF version

release/v5.2

Python version

3.11.6

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS linux x64 6.5.0-14-generic
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
System environment variable PYTHON
undefined
Visual Studio Code version 1.85.1
Visual Studio Code language en
Visual Studio Code shell /usr/bin/bash
ESP-IDF Extension version 1.6.5
Workspace folder /uc/blink
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) /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) /.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002/xtensa-esp-elf-gdb/bin:/.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin:/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/.espressif/tools/esp-rom-elfs/20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
ESP_ROM_ELF_DIR: /.espressif/tools/esp-rom-elfs/20230320/
Virtual env Python Path (idf.pythonBinPath) /.espressif/python_env/idf5.2_py3.11_env/bin/python
Serial port (idf.port) /dev/ttyUSB1
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg
ESP-IDF Tools Path (idf.toolsPath) /.espressif
Git Path (idf.gitPath) git
-------------------------------------------------------- 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 /.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002/xtensa-esp-elf-gdb/bin: true
Access to /.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin: true
Access to /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: false
Access to /.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: false
Access to /.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: true
Access to /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin: true
Access to /.espressif/tools/esp-rom-elfs/20230320: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH true
Access to Ninja in environment PATH true
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path false
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 /.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002/xtensa-esp-elf-gdb/bin: false
Spaces in /.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin: false
Spaces in /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: false
Spaces in /.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: false
Spaces in /.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: false
Spaces in /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin: false
Spaces in /.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.40.1
ESP-IDF version 5.2.0
Python version 3.11.6
Python's pip version 23.3.2
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.9.2
bitstring version: 4.1.4
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.70
contextlib2 version: 21.6.0
cryptography version: 41.0.7
ecdsa version: 0.18.0
esp-coredump version: 1.10.0
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.4.1
esp-idf-monitor version: 1.3.4
esp-idf-panic-decoder version: 1.0.1
esp-idf-size version: 1.0.3
esptool version: 4.7.0
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.6
intelhex version: 2.3.0
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lxml version: 5.1.0
markdown-it-py version: 3.0.0
MarkupSafe version: 2.1.3
mdurl version: 0.1.2
msgpack version: 1.0.7
packaging version: 23.2
pip version: 23.3.2
pyclang version: 0.4.2
pycparser version: 2.21
pyelftools version: 0.30
pygdbmi version: 0.9.0.2
Pygments version: 2.17.2
pyparsing version: 3.1.1
pyserial version: 3.5
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
rich version: 13.7.0
schema version: 0.7.5
setuptools version: 69.0.3
six version: 1.16.0
tqdm version: 4.66.1
urllib3 version: 1.26.18
websocket-client version: 1.7.0
---------------------------------------------------- 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}undefined",
"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

esp_idf_vsc_ext.log

Description

Building examples fails. There is no .vscode/settings.json file. I'm working with fresh installation of VSCode and ESP-IDF. Steps taken:

  1. Installed VSCode from https://code.visualstudio.com/Download
  2. Installed prerequisites for ESP-IDF: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html
  3. Installed ESP-IDF extension for VSCode.
  4. Express setup with release/v5.2 version of ESP-IDF

Debug Message

*  Executing task: cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B /home/paul/uc/blink/build -S /home/paul/uc/blink 

-- Found Git: /usr/bin/git (found version "2.40.1") 
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: xtensa-esp32-elf-gcc
CMake Error at /home/paul/esp/esp-idf/tools/cmake/project.cmake:506 (__project):
  The CMAKE_C_COMPILER:

    xtensa-esp32-elf-gcc

  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 "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)


CMake Error at /home/paul/esp/esp-idf/tools/cmake/project.cmake:506 (__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.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)


CMake Error at /home/paul/esp/esp-idf/tools/cmake/project.cmake:506 (__project):
  The CMAKE_ASM_COMPILER:

    xtensa-esp32-elf-gcc

  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 "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!

 *  The terminal process "/usr/bin/bash '-c', 'cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B /home/paul/uc/blink/build -S /home/paul/uc/blink'" terminated with exit code: 1.

Other Steps to Reproduce

No response

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@pauljurczak pauljurczak 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 Jan 15, 2024
@github-actions github-actions bot changed the title Installation fails to produce settings.json file Installation fails to produce settings.json file (VSC-1271) Jan 15, 2024
@brianignacio5
Copy link
Collaborator

brianignacio5 commented Jan 15, 2024

Can you select an IDF Target with ESP-IDF: Set Espressif device targetcommand and try building again? Also delete your build directory in your project before selecting IDF target.

Seems no access to /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin? Can you verify this directory exists and xtensa-esp32-elf-gcc is there ?

Settings doesn't need to exist in your project .vscode/settings.json. There are User settings (global for all vscode windows), workspace and workspace folder settings as described in https://code.visualstudio.com/docs/getstarted/settings#_settings-precedence

@pauljurczak
Copy link
Author

I deleted build, selected my target as esp32 and esp-wrover-kit. I'm getting the same error messages.

That directory doesn't exist:

Screenshot from 2024-01-14 21-06-05

@pauljurczak
Copy link
Author

I removed ~/esp and ~/.espressif folders and configured the extension again, this time choosing v5.1.2 (release version) instead of release/v5.2 (release branch). No problems with building the blink example. Perhaps, there is a problem with v5.2.

@Jefferson-Lopes
Copy link

Jefferson-Lopes commented Jan 21, 2024

I'm having this problem across multiple computers, some on Ubuntu, others on Windows, and another on Zorin OS(fresh install). The problem I'm having is that sometimes when I download my project from a git repository (without the .vscode folder), sometimes the .vscode is correctly created but sometimes is not. So far I haven't recognized any patterns in this problem.

What sometimes works is deleting the /esp and /.espressif folders and installing the same esp-idf version again.

EDIT: deleting the /build and selecting the target didn't work.

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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants