espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.78k stars 7.44k forks source link

How to override sdkconfig #defines ? #5461

Closed fmuntean closed 3 years ago

fmuntean commented 3 years ago

I am using Platform.io How can I overwrite #defines that are defined under the sdkconfig file? the generated sdkconfig.h does not contains failsafe #ifndef to allow to overwrite it at the compile time using -D Please advise.

Jason2866 commented 3 years ago

You can not change settings from sdkconfig.h. This settings are "burned in" when compiling the ardunio libs is done. The sdkconfig.h file is for reference which options are set. If you want to change you have to build your own libs. This can be done with https://github.com/espressif/esp32-arduino-lib-builder You can do the changes you want in the sdkconfig files and the libs are builded with this options.

fmuntean commented 3 years ago

Thank you for the explanation.