[Info] Replacing sdkconfig when we upgrade our ESP-IDF

User avatar
Posts: 420
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

[Info] Replacing sdkconfig when we upgrade our ESP-IDF

Postby kolban » Tue Jan 10, 2017 2:51 pm

The ESP-IDF SDK for ESP32 continues to evolve and make leaps and bounds of progression. In these early days, it is still a moving target while the ESP32 masters determine what works and how to improve what doesn't. In addition, some settings that were previously chosen either no longer apply or have to have their values changed. The purpose of this post is to indicate a potential problem and how to resolve it.

When you create a project based on the ESP-IDF you normally run a command called "make menuconfig" which provides you an attractive configuration panel into which you can make configuration changes. These changes are then saved in a file called "sdkconfig" and are leveraged when you build your application. The sdkconfig is initially "seeded" with default values when you initially ran "make menuconfig" for the first time. The defaults come from the internals of the ESP-IDF ... that were in effect when you first ran "make menuconfig".

Now ... pause here ... think the above through.

Imagine it was November. You downloaded ESP-IDF, you downloaded an app template and you ran "make menuconfig". The result was a configuration file ... all is well.

Now it is January, you download/update the ESP-IDF and you run "make menuconfig" again ... unless you explicitly change the settings, the default settings that will be used are the settings that were default in November ... and these may NOT be the defaults that are expected with the current ESP-IDF today.

Ideally, there would be an option in "make menuconfig" that would show the properties that are not the same as would be generated from defaults ... but there isn't. So the checks then become manual and error prone.

What I'd suggest is the following.

1) When you make a change in "make menuconfig" make a note of that change in a README.md in the project directory.
2) When you download/update/refresh the ESP-IDF, delete the current "sdkconfig" and run "make menuconfig" which should pick up the current defaults. From there, make changes as described in your "README.md".
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
Posts: 27
Joined: Sat Oct 01, 2016 9:05 am

Re: [Info] Replacing sdkconfig when we upgrade our ESP-IDF

Postby krzychb » Tue Jan 10, 2017 4:14 pm

Hi kolban,

I have similar observations. Every other time, upon cloning new esp-idf release, I delete existing sdkconfig & sdkconfig.old files and generate new from scratch.

If I see issues then use tools like http://winmerge.org/ to quickly identify differences in configuration.

Expanding on your post, In some cases you may need to override defaults you get once sdkconfig is created from sratch.
Such case is discussed in https://github.com/igrr/esp32-cam-demo/issues/21

Solution to this issue is creating sdkconfig.defaults as described in http://esp-idf.readthedocs.io/en/latest ... g-defaults

Who is online

Users browsing this forum: No registered users and 1 guest