how to maintain multiple versions of ESP-IDF

jsmith56x
Posts: 13
Joined: Sun Oct 13, 2024 2:51 pm

how to maintain multiple versions of ESP-IDF

Postby jsmith56x » Tue Nov 05, 2024 10:44 am

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.

username
Posts: 538
Joined: Thu May 03, 2018 1:18 pm

Re: how to maintain multiple versions of ESP-IDF

Postby username » Tue Nov 05, 2024 11:49 am

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.

noweare
Posts: 79
Joined: Tue Jul 02, 2019 11:35 am

Re: how to maintain multiple versions of ESP-IDF

Postby noweare » Wed Nov 06, 2024 3:16 pm

Here is a very good video that shows how to do it.



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

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: how to maintain multiple versions of ESP-IDF

Postby chegewara » Thu Nov 07, 2024 1:01 pm

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.

Who is online

Users browsing this forum: No registered users and 90 guests