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.

Completely lost with errors setting up VSCode ESP-IDF extension (VSC-320)

See original GitHub issue

Thank you for this great tool.

Pre Bug Report Checklist Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I’ve read the docs and found no information that could have helped solving the issue.

Describe the bug I made a video showing ESP-IDF working from the terminal, followed by the VSCode issue: https://www.youtube.com/watch?v=WJATDQhhZM4&feature=youtu.be

ESP-IDF works correctly on the command line after following instructions from Espressif, but I’m having issues understanding what the issue is with the VSCode extension. I hope it’s just a missing configuration option that I overlooked, but I’m not sure yet.

I also don’t understand the difference between the python environment I created at ~/.pyenv/esp-idf during the ESP-IDF setup tutorial, vs the one ESP-IDF apparently made for itself under ~/.espressif. Or why neither of those environments seem to be actually needed when sourcing esp-idf/export.sh in practice.

  • Intellisense is not understanding some of the ESP-IDF library variables, such as portTICK_PERIOD_MS.

I have encountered multiple errors in the terminal section of VSCode when trying to build, including:

  • identifier "CONFIG_FREERTOS_HZ" is undefined [35,27]
  • The task provider for "C/C++" tasks unexpectedly provided a task of type "shell".
  • > Executing task: /usr/bin/python /home/yankee/build/src/esp-idf/tools/idf.py build < 'cmake' must be available on the PATH to use /home/yankee/build/src/esp-idf/tools/idf.py The terminal process terminated with exit code: 2 Terminal will be reused by tasks, press any key to close it.

To Reproduce

  1. Setup ESP-IDF via the command line and show that it is working.
  2. Install VSCode and the ESP-IDF extension
  3. Setup ESP-IDF extension following onboarding instructions, using existing ESP-IDF from step 1.
  4. Look at extra instructions from VSCode Extension GitHub page
  5. Try to run hello_world ESP32 project
  6. Encounter many errors

Expected behavior Once the onboarding process confirmed the existence and location of the build dependencies, I expected it to be able to build without an issue.

Screenshots https://www.youtube.com/watch?v=WJATDQhhZM4&feature=youtu.be

Environment (please complete the following information):

  • OS Name & Version:
$ uname -a
Linux ibn5100 5.6.0-1-amd64 #1 SMP Debian 5.6.7-1 (2020-04-29) x86_64 GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • VSCode Version:
$ code --version
1.45.0
d69a79b73808559a91206d73d7717ff5f798f23c
x64
  • ESP-IDF Version:
$ git log
commit b0f053d82dc4484479521a0d49a0b6917946602a (HEAD -> release/v4.0, origin/release/v4.0)
  • Python Version:
$ python --version
Python 3.8.3rc1

Logs If applicable, please share the log file which can be obtained from

  • Windows: %USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log
  • Linux & MacOSX: $HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log esp_idf_vsc_ext.log

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brianignacio5commented, May 14, 2020

You can run the onboarding process pressing F1 and running the command “ESP-IDF: Configure the ESP-IDF extension”

There are two ways to find idf.* settings. Press F1 and run Preferences: Open Settings (UI) or Preferences: Open Settings (JSON) or just open the .vscode/settings.json (in your project, in your workspace or in your vscode user settings). If you use the UI, you can see all IDF settings under extensions -> ESP-IDF section but in the JSON, settings are not there by default, you can type idf.* and you will have some settings auto complete.

As explained in the Readme Env variables section replace ${HOME} with ${env:HOME}.

Why not just use ${HOME} ? Because vscode also use things like ${config:idf.espIdfPath} to refer to extension settings (like in tasks.json) which makes parsing ${.*} requires a bit more context.

The last error is probably because the build folder of your project has a cache of previous failed run. Just delete the build folder and try again.

0reactions
brianignacio5commented, May 20, 2020

So it seems this issue is fixed for the author. Closing this for now.

Please let us know if this still happens to any of you after v0.2.3 release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESP-IDF Extension for Visual Studio Code - install fail
VSC and the ESP-IDF is totally new to me. To put it bluntly, I'm lost. VS Code information. Version: 1.58.0 (user setup)
Read more >
Error while installing ESP-IDF using the Visual Studio ...
I tried tinkering with IDF_PATH and IDF_TOOLS_PATH, but it seems that at least one of them should be set to C:\Espressif to make...
Read more >
helloWorld standard platform io (all SHOULD work ...
The output seems to be from two different projects - one with the Arduino and one with the ESP-IDF framework. Can you provide...
Read more >
projectitis | proof of my problem
Creating the LCD display tutorial. Once the ESP32 extensions and tools are installed in Visual Studio you have access to a huge number...
Read more >
Project Configuration - ESP32 - — ESP-IDF Programming ...
It is also useful to prevent a lock up in start code caused by an unstable power source. NOTE: Tracks the execution time...
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