Page 1 of 1

How do I use idf.py with VSCode + Windows?

Posted: Mon Oct 24, 2022 9:05 pm
by ZacDaMan
I primarily use ESP-IDF on a Windows machine, coding in VSCode. Whenever I run into a problem, everything seems to mention idf.py, but I have never been able to work out how to use it. If I try to run it from a terminal, despite having added the filepath to PATH, added IDF_PATH as a variable etc, I get something like this:

Code: Select all

PS F:\Users\Isaac\Documents\ESP-IDF\onoff_server> idf.py fullclean
idf.py : The term 'idf.py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ idf.py fullclean
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (idf.py:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Is it meant to be run on Windows, and if so, how?

Re: How do I use idf.py with VSCode + Windows?

Posted: Wed Aug 21, 2024 6:25 pm
by mglmgl
You are supposed to install IDF framework. Not that they tell you this. Even their own dev videos will already assume you have the idf.py. I guess they live in their own bubble. Also means they didn't ask a single outsider to check if their docs and guides make sense. It's like they on purpose want to discourage new users.
Eh. Rant off.

Anyway, follow this https://marketplace.visualstudio.com/it ... -extension
Hint, you install the extension and the idf.py is still not there - you need to run command from the extension to actually install the framework. It's a lot (24!) of annoying manual steps.

Re: How do I use idf.py with VSCode + Windows?

Posted: Thu Aug 22, 2024 9:00 am
by Urada_esp
After the installation is complete, there will be a button "Open esp-idf terminal" under vsc, which will set the necessary environment variables, and you can use it directly afterwards. The py interpreter it uses seems to be installed by the idf framework itself