Hi all, I would like to know if I would have any problem if I install another version of esp-idf on my ubuntu computer (I am interested in testing with 5.1 stable). I think that if I save the repository in another directory, for example esp-idf51 and when I want to compile with this version I load the environment variables from that directory (having the correct version of python), I shouldn't have any problem.
This way I could continue working on my projects with the current 4.2 version and try things with 5.1.
Would there be any problem doing this?
Thanks
Two diferents versions de esp-idf in diferents directories
-
- Posts: 76
- Joined: Tue Sep 12, 2017 11:25 am
Two diferents versions de esp-idf in diferents directories
Last edited by Nespressif on Thu Aug 24, 2023 11:02 am, edited 2 times in total.
Re: Two version de esp-idf in diferents directories
I’d highly recommend doing this inside a docker container. I just upgraded a large code base from 4.4 to 5.1 by using a devcontainer that was set up for esp-idf 5.1. Going back and forth between different IDF versions can be a big pain because of all the tool chain and python dependency issues.
Re: Two diferents versions de esp-idf in diferents directories
Hello,
I believe there should be no problem. Tools are properly versioned and python env is also based on esp-idf version. Meaning there should be no collision.
Let's say I have the esp-idf repository already cloned in the esp-idf directory.
This will clone the release/v5.1 branch into esp-idf-v5.1 directory. The --reference option points to an existing esp-idf cloned reposiotry, to speed up the cloning. If you don't need the history, you can also --depth 1 to create a shallow clone. You can do this for multiple branches and have each release in separate repo/directory.
With this just change to the directory/version you want to work with(e.g. esp-idf-v5.1), run and it should be all set. At least this seems to be working for me. HTH
I believe there should be no problem. Tools are properly versioned and python env is also based on esp-idf version. Meaning there should be no collision.
Let's say I have the esp-idf repository already cloned in the esp-idf directory.
Code: Select all
git clone --reference esp-idf --single-branch --branch release/v5.1 https://github.com/espressif/esp-idf.git esp-idf-v5.1
With this just change to the directory/version you want to work with(e.g. esp-idf-v5.1), run
Code: Select all
./install.sh && . ./export.sh
-
- Posts: 76
- Joined: Tue Sep 12, 2017 11:25 am
Re: Two diferents versions de esp-idf in diferents directories
All right, I'll give it a try, I think it should be fine too.
Thank you both very much for your answers.
Best regards,
Thank you both very much for your answers.
Best regards,
-
- Posts: 76
- Joined: Tue Sep 12, 2017 11:25 am
Re: Two diferents versions de esp-idf in diferents directories
Hi all, for what it's worth, I have managed to install the esp-idf-v5.1 environment in another directory and make it work independently from the 4.2 version I had before. When I want to use one and the other I run . ./export.sh from the directory of the chosen version.
I have had to upgrade python to 3.8 and cmake to 3.29, but everything seems to be fine.
My OS is ubuntu 18.
Greetings to all.
I have had to upgrade python to 3.8 and cmake to 3.29, but everything seems to be fine.
My OS is ubuntu 18.
Greetings to all.
Who is online
Users browsing this forum: Gaston1980 and 230 guests