Completely lost with errors setting up VSCode ESP-IDF extension (VSC-320)
See original GitHub issueThank 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
- Setup ESP-IDF via the command line and show that it is working.
- Install VSCode and the ESP-IDF extension
- Setup ESP-IDF extension following onboarding instructions, using existing ESP-IDF from step 1.
- Look at extra instructions from VSCode Extension GitHub page
- Try to run
hello_world
ESP32 project - 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:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top GitHub Comments
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)
orPreferences: 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.
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.