question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report]: new version 1.1.0 of the extension fails to use existing ESP-IDF and ESP-IDF Tools (VSC-689)

See original GitHub issue

Describe the bug Bugs, bugs, bugs 😦 The new version 1.1.0 of the extension makes a total mess when trying to use existing ESP-IDF and ESP-IDF Tools and every attempt to Configure ESP-IDF extension finishes with “Invalid ESP-IDF” I’ve made and a completely new clean installation of ESP-IDF and ESP-IDF Tools, tried with Eclipse and everything works fine, but as soon as try to use the same installation with VSC and become a total mess 😦

To Reproduce

  1. Uninstall/delete all existing ESP-IDF and ESP-IDF Tools.

  2. Download 2.8 Offline Installer from here: https://dl.espressif.com/dl/esp-idf-tools-setup-offline-2.8.exe

  3. Run Installer, Run just installed Eclipse, compile ‘blink’ example, run Help>Product Information - check if everything is Ok.

  4. Restart Windows

  5. Run VSC:

  6. Try to Config ESP-IDF extension (doesn’t give me option to use ‘Existing’ - only Express and Advanced) Bug1: Although selected Advanced>Existing ESP-IDF, it starts downloading git and python idf-git-2.30.1-win64.zip idf-python-3.8.7-embed-win64.zip to D:\ESP2_8.espressif\dist
    but same versions git and python was already in D:\ESP2_8.espressif\

Downloading D:\ESP2_8.espressif\dist\idf-git-2.30.1-win64.zip… idf-git-2.30.1-win64.zip has (27218) KB idf-git-2.30.1-win64.zip progress: 0.06% (15.64 / 27217.34) KB … idf-git-2.30.1-win64.zip progress: 100.00% (27217.34 / 27217.34) KB Using existing D:\ESP2_8.espressif\tools\idf-git idf-python-3.8.7-embed-win64.zip has (19616) KB idf-python-3.8.7-embed-win64.zip progress: 0.08% (15.64 / 19615.46) KB … idf-python-3.8.7-embed-win64.zip progress: 100.00% (19615.46 / 19615.46) KB Extracted D:\ESP2_8.espressif\tools\idf-python … Invalid ESP-IDF

Bug2: At the end finish with Invalid ESP-IDF (see pic. 2 and 1)

Bug3: New Downloaded idf-git-2.30.1-win64.zip was not extracted at all Bug4: idf.gitPath that was set from the Config does not exist:

config idf extension makes VS_WSP1.vscode\settings.json: { “idf.gitPath”: “D:\ESP2_8\.espressif\tools\idf-git\cmd\git.exe” } but the actual git path is D:\ESP2_8.espressif\tools\idf-git\2.30.1\cmd\git.exe (see pic. 2 and 3)

Bug5: Downloaded idf-python-3.8.7-embed-win64.zip duplicated already existing same files that were already there in D:\ESP2_8.espressif\tools\idf-python\3.8.7.… but the Config extension put them one step up in D:\ESP2_8.espressif\tools\idf-python.… (see pic.3)

Expected behavior Run without problems ESP-IDF: Configure ESP-IDF extension with existing ESP-IDF; Do not download/duplicate git,python etc. already existing modules; do not make mess with already existing files; make [wspase].vscode\settings.json with correct paths and all required vars: idf.espIdfPathWin, idf.pythonBinPathWin, idf.customExtraPaths, idf.customExtraVars ,idf.gitPath

Screenshots

install_p1

install_p1s

WinExpl2

Environment (please complete the following information):

  • OS Name & Version: OS win32 x64 10.0.19041
  • VSCode Version:1.57.0
  • ESP-IDF Version: 4.2 (from v2.8 offline installer)
  • Python Version: 3.8.7 (from v2.8 offline installer + duplicate downloaded from ESP-IDF extension)

DoctorReport.txt

Logs

esp_idf_vsc_ext.log

Extension Configuration settings Preferences: Open Settings (JSON) : { }

{CURRENT_PROJECT}/.vscode/settings.json : { “idf.gitPath”: “D:\ESP2_8\.espressif\tools\idf-git\cmd\git.exe” }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
samsam4commented, Jun 16, 2021

I didn’t notice exact same message (unless is from the esp_idf_vsc_ext.log which I didn’t explore in details), but my situation might be a little different than yours, because I already had ESP-IDF and tools installed and tested with Eclipse (incl. Python) and the VSC Extension actually installed a duplicate of the already existing Python, but shifted one step up on the directory tree (see pic.3 and Bug5 in my first post here), so I either way had at least one Python with correct path available and maybe that is why I didn’t see same message. But if this is the only problem you have, you can always move the installed Python from your first try in the correct path (see my pic3 above) then run again the extension Config and probably you will get rid of at least this obstacle 😦

0reactions
samsam4commented, Jun 28, 2021

@brianignacio5 This one works (at least with USE EXISTING SETUP and tested only up to build stage so far) . Not tested Advanced setup yet. There are some errors in the .log, but on the VSC screens everything looks Ok.
Didn’t flash anything yet.

After .vsix (from 28-6-21) installed and Configure Extension: esp_idf_vsc_ext11.log Doctor11.txt

After ESP-IDF:Create project from etension template ->TEMPLATE-APP esp_idf_vsc_ext12.log Doctor12.txt

After build: esp_idf_vsc_ext13.log Doctor13.txt

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Standard Toolchain Setup for Linux and macOS - ESP32
Step 1. Install Prerequisites . In order to use ESP-IDF with the ESP32, you need to install some software packages based on...
Read more >
VS Code doesn't find the ESP-IDF installation at startup
At startup, in the home page of the ESP-IDF the "Use existing setup" ... Error checking xtensa-esp32-elf version Error: Command failed: ...
Read more >
idf-component-manager - PyPI
The IDF Component manager is a tool that downloads dependencies for any ESP-IDF CMake project. It makes sure that the right versions of...
Read more >
Visual Studio Code extension for ESP-IDF projects - Gitee
Press F5 to Run with Debugger, this will launch a new VSCode Extension Development Host to debug the extension. Compile project with yarn...
Read more >
Error while installing ESP-IDF using the Visual Studio Code ...
I tried to install ESP-IDF and its tools with the Visual Studio Code extension ... to make the USE EXISTING SETUP option appear...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found