ESP IDF Environment only works one time

preafixed
Posts: 10
Joined: Mon Jan 02, 2023 7:14 pm

ESP IDF Environment only works one time

Postby preafixed » Mon May 01, 2023 5:47 pm

I decided to install ESP-IDF, I use CLion and I work in the project "hello_world". Using CLion, I can build, flash etc. But when I want to use idf.py in the command line it does not work. It only works If I go back to the root directory, run export.bat and then return back to the project path. But this is a very tidious process and surely it should be easier.

Does anybody know what I'm doing wrong?

a2800276
Posts: 78
Joined: Sat Jan 23, 2016 1:59 pm

Re: ESP IDF Environment only works one time

Postby a2800276 » Tue May 02, 2023 10:59 am

This is the expected behavior, you're not doing anything wrong.

You do need to run `export` once per shell.
This comes from a unix mindset where you're actually working in the shell primarily and you may be working on a different project requiring a different idf version in another shell.

I assume in windows you could create a batch file that opens the shell and then runs `export.bat` or something like that?

Who is online

Users browsing this forum: No registered users and 218 guests