How to update esp-idf from v5.0.2 to v5.1?

blanchehermine
Posts: 16
Joined: Wed Mar 22, 2023 8:11 am

How to update esp-idf from v5.0.2 to v5.1?

Postby blanchehermine » Fri Jul 14, 2023 6:47 am

Hello.

I have some trouble updating from esp-idf version 5.0.2 to 5.1.
Originally I installed esp-idf v5.0.1 using Windows Installer, then I successfully updated it to v5.0.2.
ESP-IDF framework is located in the folder: ESP-IDF\frameworks\esp-idf-v5.0.1.

Then, the version 5.1 got released and I tried updating to it the same way I did before:

1. Clone https://github.com/espressif/esp-idf.git into a separate folder
2. Go to that folder and execute

Code: Select all

git fetch
3. Checkout new version:

Code: Select all

git checkout v5.1
4. Update all submodules

Code: Select all

git submodule update --init --recursive
5. Replace the contents of the folder ESP-IDF\frameworks\esp-idf-v5.0.1 with the contents of the new folder.
5. Install/update the tools by executing install.bat.

The last step downloaded and installed all new tools to the ESP-IDF/tools folder and almost all of them are different to the tools that were used in versions v5.0.x. For example, rsicv32-esp-elf has now 2 folders:

esp-12.2.0_20230208 (from v5.1)
esp-2022r1-11.2.0 (from v5.0.2)

Also, the last step installed a new python enviroment. The folder ESP-IDF/python_env now has 2 folders:

idf5.0_py3.8_env
idf5.1_py3.9_env

Ok, now I launch ESP-IDF using the desktop schortcut that was created when I first installed the esp-idf v5.0.1 and it displays the following text:
  1. Setting PYTHONNOUSERSITE, was not set
  2. Using Python in E:\ESP\ESP-IDF\python_env\idf5.0_py3.8_env\Scripts\
  3. Python 3.8.7
  4. Using Git in E:\ESP\ESP-IDF\tools\idf-git\2.34.2\cmd\
  5. git version 2.34.1.windows.1
  6. Checking Python compatibility
  7. Setting IDF_PATH: E:\ESP\ESP-IDF\frameworks\esp-idf-v5.0.1
  8.  
  9. Adding ESP-IDF tools to PATH...
  10.     E:\ESP\ESP-IDF\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin
  11.     E:\ESP\ESP-IDF\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin
  12.     E:\ESP\ESP-IDF\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin
  13.     E:\ESP\ESP-IDF\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin
  14.     E:\ESP\ESP-IDF\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin
  15.     E:\ESP\ESP-IDF\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin
  16.     E:\ESP\ESP-IDF\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin
  17.     E:\ESP\ESP-IDF\tools\cmake\3.24.0\bin
  18.     E:\ESP\ESP-IDF\tools\openocd-esp32\v0.12.0-esp32-20230419\openocd-esp32\bin
  19.     E:\ESP\ESP-IDF\tools\ninja\1.10.2\
  20.     E:\ESP\ESP-IDF\tools\idf-exe\1.0.3\
  21.     E:\ESP\ESP-IDF\tools\ccache\4.8\ccache-4.8-windows-x86_64
  22.     E:\ESP\ESP-IDF\tools\dfu-util\0.11\dfu-util-0.11-win64
  23.     E:\ESP\ESP-IDF\frameworks\esp-idf-v5.0.1\tools
  24.  
  25. Checking if Python packages are up to date...
  26. ERROR: E:\ESP\ESP-IDF\python_env\idf5.1_py3.8_env\Scripts\python.exe doesn't exist! Please run the install script or "idf_tools.py install-python-env" in order to create it
So how do I properly update from v.5.0.2 to v5.1?

Thank you.

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: How to update esp-idf from v5.0.2 to v5.1?

Postby ESP_Roland » Fri Jul 14, 2023 8:25 am

The easiest solution for you is to re-run the Windows installer. You can point it to an existing copy of ESP-IDF (v5.1) so the download won't take extra time.

blanchehermine
Posts: 16
Joined: Wed Mar 22, 2023 8:11 am

Re: How to update esp-idf from v5.0.2 to v5.1?

Postby blanchehermine » Fri Jul 14, 2023 10:01 am

It helped launching the esp-idf through cmd, but it broke visual studio code. It still searches for the old version of python environment.

Who is online

Users browsing this forum: Bing [Bot], MicroController and 113 guests