Page 1 of 1

How to update the ESP-IDF in windows

Posted: Tue Aug 18, 2020 4:26 am
by stock86c
Hi everyone

I downloaded the esp-idf preivously using esp-idf-tools-setup-2.3 , and it is downloading the version 4.0 IDF. All works fine , but the uart library is not updated on that version and missing some features .As such I would like to use the 4.3 version available here

https://github.com/espressif/esp-idf

However, I cannot compile using the directly downloaded 4.3 ver from Github, and it is giving errors and fails. Is there anyway to update the 4.0 version to 4.3 in windows using command tools ? I have been searching online but seems like those updates are only for linux. Any clues would be appreciated, thx.

Re: How to update the ESP-IDF in windows

Posted: Wed Aug 19, 2020 7:15 am
by stock86c
silly mistake, need to run git clone, not download the zip.
But after some updating, the example finally compiles without errors. Then due to IDF_PYTHON_ENV_PATH
seems to be set to the prior installed version, it is unable to flash the ESP32. Does anyone know how and where to update this configuration ? thx

Re: How to update the ESP-IDF in windows

Posted: Fri Sep 04, 2020 5:25 pm
by bbulkow
In some cases, I am only able to successfully update by deleting the esp-idf directory, re-cloning, and running the "install.sh" ( in your case install.bat, I use WSL on windows and follow the linux instructions, it runs very well ). I also usually must remove the build directory of my project to force a full recompile. There have been changes in the build system over the last 6 months and it seems this "nuke from orbit" strategy as a last resort is required less frequently. The good news is this process currently takes me only a few minutes, the bad news is I have to do it at all.

My general pattern is to simply update ( git pull ), and if anything seems shaky, remove my build directory in the project in question and rebuild, and if something still bad, "nuke from orbit".

This of course is changes within a version. In cases of changing between 4.0, 4.1, 4.2, master, there are poorly documented breaking code changes. Not many but all you need is one to have a bad day. Some are well documented, like the necessary changes to the networking system to support the S3 chips, and sometimes ESP-IDF has a backward compatible menuconfig entry to help you. In some cases I have been able to find a solution that works across all versions, in some cases I have put #defines in the code for specific versions.

Recently on master I started having grave instability which appears to be a stack size issue somewhere, I pulled back to 4.2 and the same code is stable. I end up doing a bit of "hunt and peck" through the versions, which is unfortunate, but I guess I am glad Espressif is making positive changes to the code base. They seem to apply fixes back through 3.3, 4.0, 4.1, which is also good.

Re: How to update the ESP-IDF in windows

Posted: Sun Sep 06, 2020 12:14 am
by Justin2020
Did you re-install the tools? If you're using Eclipse, it won't matter if you run the install script in a console to install the tools. You have to use Eclipse Help menu -> ESP-IDF Tools Manager -> Install Tools

Re: How to update the ESP-IDF in windows

Posted: Tue Sep 08, 2020 7:30 am
by stock86c
Back and forth uninstalled and reinstalled everything from scratch. Am using eclipse, so did follow
https://github.com/espressif/idf-eclipse-plugin

this to install. loaded a bleserver example, and it took 3 hours to compile the example in eclipse...

will just have to find a way to get things done.