Possible to override sdkconfig settings via command line?

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Possible to override sdkconfig settings via command line?

Postby cmorgan » Tue Jan 30, 2018 2:37 am

I'm looking to perform a number of automated builds with different configurations. I tried something like:

make CONFIG_MY_OPTION=1

but this doesn't appear to be overriding the CONFIG_MY_OPTION=2 that is in sdkconfig.

Possible to override variables like this? Other ideas for how to best automate a few slight variations in sdkconfig? I've thought of using sed to alter sdkconfig (seems a bit messy), pre-creating a number of sdkconfig files (this seems difficult to maintain).

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Possible to override sdkconfig settings via command line?

Postby ESP_Sprite » Tue Jan 30, 2018 2:47 am

Not really. Issue is that it would mess with the dependency tracking: at the moment, the make system cannot figure out from a config variable which files it needs to recompile. The current implementation is that any file that needs it depends on sdkconfig.h, which changes when you do a 'make menuconfig', retriggering a rebuild of all relevant files. (An exception, by the way, are the esp32 serial port config variables; you can override these with the environment variables ESPPORT and ESPBAUD.)

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Possible to override sdkconfig settings via command line?

Postby WiFive » Tue Jan 30, 2018 3:10 am

make oldconfig KCONFIG_CONFIG=mysdkconfigfile ?

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Possible to override sdkconfig settings via command line?

Postby loboris » Tue Jan 30, 2018 2:58 pm

What I' doing is to have several configuration files, then I build:

Code: Select all

cp sdkconfig.myconfig1 sdkconfig
make clean
make all
cp sdkconfig.myconfig2 sdkconfig
make clean
make all
...
...
It works with no problem.

Who is online

Users browsing this forum: chegewara and 103 guests