Page 1 of 1

Possible to override sdkconfig settings via command line?

Posted: Tue Jan 30, 2018 2:37 am
by cmorgan
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).

Re: Possible to override sdkconfig settings via command line?

Posted: Tue Jan 30, 2018 2:47 am
by ESP_Sprite
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.)

Re: Possible to override sdkconfig settings via command line?

Posted: Tue Jan 30, 2018 3:10 am
by WiFive
make oldconfig KCONFIG_CONFIG=mysdkconfigfile ?

Re: Possible to override sdkconfig settings via command line?

Posted: Tue Jan 30, 2018 2:58 pm
by loboris
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.