Page 1 of 1

how to maintain multiple versions of ESP-IDF

Posted: Tue Nov 05, 2024 10:44 am
by jsmith56x
I'd like to test my project with multiple version of ESP-IDF (5.0.7, 5.1.5, 5.3.1)
How to do that?

I did the followings
Downloaded the installers.
esp-idf-tools-setup-offline-5.0.7.exe
esp-idf-tools-setup-offline-5.1.5.exe
esp-idf-tools-setup-espressif-ide-3.1.0-with-esp-idf-5.3.1.exe
Zipped and saved after install, zipped the CMD link also. Uninstalled them because I have found that they are not fully separatable.

I tested and they are worked separatelly

Installed (becase I need the debug)
esp-idf-tools-setup-espressif-ide-3.1.0-with-esp-idf-5.3.1.exe
Now I have the error messages when I tried to start 5.1.5
c:\Espressif-v5.1.5>C:\Windows\system32\cmd.exe /k ""C:\Espressif-v5.1.5\idf_cmd_init.bat" esp-idf-d5f26a99e8d4ac108b4c5b983c2b5936"
Setting PYTHONNOUSERSITE, was not set
Using Python in c:\Espressif-v5.1.5\
'null' is not recognized as an internal or external command,
operable program or batch file.
Using Git in C:\Espressif\tools\idf-git\2.44.0\cmd\
git version 2.44.0.windows.1
It seems there is global environment variable that blocks this method.

Re: how to maintain multiple versions of ESP-IDF

Posted: Tue Nov 05, 2024 11:49 am
by username
One way I found to handle this is to create multiple folders named
ESP-IDF_5.0.7
ESP-IDF_5.1.5
ESP-IDF_5.3.1

install Visual Studio Code Portable into each folder.
When you run VSC from each folder you will first add the espressif extension. When you open it again it will ask you to install. Choose Custom and select the version of ESP-IDF you want and the folder to install it to.

Re: how to maintain multiple versions of ESP-IDF

Posted: Wed Nov 06, 2024 3:16 pm
by noweare
Here is a very good video that shows how to do it.



https://www.youtube.com/watch?v=D_k09QC_s6o&t=56s

Re: how to maintain multiple versions of ESP-IDF

Posted: Thu Nov 07, 2024 1:01 pm
by chegewara
In my case (linux OS) i have one folder for each esp-idf version i am using, but i am not working with vs code extension, just command line idf.py etc.

Another option is to use docker images from espressif (1 image per version). I found recently that docker image is using some sort of caching, so even when i do idf.py fullclean and idf.py build then about half project is grabbed from cache which speed up build a lot.