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

ZacDaMan
Posts: 47
Joined: Wed Dec 22, 2021 7:40 pm

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

Postby ZacDaMan » Mon Oct 24, 2022 9:05 pm

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?

mglmgl
Posts: 1
Joined: Wed Aug 21, 2024 6:11 pm

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

Postby mglmgl » Wed Aug 21, 2024 6:25 pm

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.

Urada_esp
Posts: 4
Joined: Mon Aug 19, 2024 6:33 am

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

Postby Urada_esp » Thu Aug 22, 2024 9:00 am

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

Who is online

Users browsing this forum: No registered users and 135 guests