Hi all,
I'm sure I'm doing something stupid but every time I try to use the ESP-IDF extension in VS Code it seems to be overly complicated!
I'm new to VS Code (which I find overly complicated in the first place, but that's a gripe for another time) and don't consider myself to be too much of a moron, but there seem to be so many little gotchas and settings files and tweaks that need to be made to get it to work properly when what I was hoping for was 'out-of-the-box' full functionality.
Anyway, I digress. My setup is that I have installed VS Code on my Win 11 computer, then installed and configured the ESP-IDF extension (choosing all default values). For clarity, I have not installed anything else ESP-IDF related on my computer - am I supposed to? It's not mentioned in the extension installation instructions that I have to do that, but some people elsewhere talk about installing the ESP-IDF framework. I had assumed that the VS Code extension would install everything I need. Is that wrong?
The issue I'm currently facing is that I've created a new project (workspace?) and written a custom class (cpp and h files) and am trying to include the class in my main.c file but the #include line has a red squiggle under it. When I ask the AI for help it says that my c_cpp_properties.json has an issue with my environment variables and recommends running some idf.py commands in the Terminal.
Firstly, why are there issues with my environment variables, given that I've left everything default? Shouldn't these be set correctly on installation of the extension?
Secondly, when I try to run 'idf.py fullclean' in the terminal I get the error "idf.py : The term 'idf.py' is not recognized as the name of a cmdlet, function, script file, or operable program." Why do I get this error? Shouldn't idf.py be installed and configured correctly as part of the setup?
Am very confused and quite frustrated with this so would be very thankful for any help anyone can give.
Thanks!
ESP-IDF extension in VS Code - idf.py not recognized
Re: ESP-IDF extension in VS Code - idf.py not recognized
Hi Thinqer77, I hope I can try to help out here
Have you executed the Setup wizard as described here: https://docs.espressif.com/projects/vsc ... ation.html
Maybe there is an issue with your setup, could you share the ESP-IDF: Doctor Command output to see if the setup is ok? As described in https://docs.espressif.com/projects/vsc ... oting.html
For the red squiggle part, Please look at https://docs.espressif.com/projects/vsc ... oject.html so you can either use Microsoft C/C++ extension or Clang extension for this. But both extension rely on the compile_commands.json from your project build directory.
If you open a regular terminal, it is not configured for ESP-IDF. If you need a terminal to run `idf.py fullclean` for example, you need to use the `ESP-IDF: Open ESP-IDF Terminal` which will create a terminal with environment variables configured.
Let me know how it goes.
Have you executed the Setup wizard as described here: https://docs.espressif.com/projects/vsc ... ation.html
Maybe there is an issue with your setup, could you share the ESP-IDF: Doctor Command output to see if the setup is ok? As described in https://docs.espressif.com/projects/vsc ... oting.html
For the red squiggle part, Please look at https://docs.espressif.com/projects/vsc ... oject.html so you can either use Microsoft C/C++ extension or Clang extension for this. But both extension rely on the compile_commands.json from your project build directory.
If you open a regular terminal, it is not configured for ESP-IDF. If you need a terminal to run `idf.py fullclean` for example, you need to use the `ESP-IDF: Open ESP-IDF Terminal` which will create a terminal with environment variables configured.
Let me know how it goes.
Re: ESP-IDF extension in VS Code - idf.py not recognized
I have to say if you have a clean system and install VSC then Espressif plugin, close VSC and reopen and then select express install and go through the process to install IDF. In all the many years of doing this on different PC and opening a terminal in VSC I have never been able to use IDF.py there.
Who is online
Users browsing this forum: No registered users and 1 guest
