Generating ESPIDF version in SdkConfig

william.ferguson.au
Posts: 107
Joined: Wed Jan 02, 2019 8:55 am

Generating ESPIDF version in SdkConfig

Postby william.ferguson.au » Sat Oct 15, 2022 3:00 am

One of the frustrations that I have is that it is not easy to look through the source code history of a project and determine which version of the ESPIDF that source was being compiled under.

Which means that it is difficult to recreate a binary without having that binary to inspect to determine ESPIDF version.
It also makes it difficult to track down in which product release, behaviour may have changed due to a change to ESPIDF version.

Case in point, this ESPIDF change https://github.com/espressif/esp-idf/bl ... xt#L19-L21 is bricking any of our devices whose partition tables were generated with an ESPIDF version prior to this change.

Is there any way to get the ESPDIF version generated into the SdkConfig (which we keep under source control) so that we can readily track changes in EDPIDF version?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Generating ESPIDF version in SdkConfig

Postby ESP_igrr » Sat Oct 15, 2022 5:17 am

There is no provision to place the version of IDF into the sdkconfig file. However if you don't mind having it in some other file, it should be pretty easy to set up.
In your project CMakeLists file you can generate the file with IDF version inside.

file(WRITE ${CMAKE_CURRENT_LIST_DIR}/idf_ver.txt ${IDF_VER})

Then add idf_ver.txt to version control to track the changes.

This doesn't enforce that a specific IDF version is used but as long as multiple developers aren't using different IDF commits you should be able to see the version changes in your git history.

william.ferguson.au
Posts: 107
Joined: Wed Jan 02, 2019 8:55 am

Re: Generating ESPIDF version in SdkConfig

Postby william.ferguson.au » Sat Oct 15, 2022 5:43 am

That's perfect, thank you.

Who is online

Users browsing this forum: No registered users and 94 guests