Page 1 of 1

ESP IDF Environment only works one time

Posted: Mon May 01, 2023 5:47 pm
by preafixed
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?

Re: ESP IDF Environment only works one time

Posted: Tue May 02, 2023 10:59 am
by a2800276
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?