sdkconfig.default overwritten?
Posted: Fri Jun 06, 2025 10:34 pm
I am using the latest ESP-IDF sdk on the master branch, and used it to create a simple project for the ESP32C5 chip. In the project I created the sdkconfig.defaults file to keep some of the settings.
after idf.py build command, I found that the sdkconfig.defaults file was overwritten, the definitions inside the sdkconfig file were copied to the sdkconfig.defaults file. this is not what I expected. my understanding is that the sdkconfig.defaults should not be touched by the compiler at all. Is this a SDK bug, or it's because I did something wrong?
my sdkconfig.defaults is is simple:
#partition table
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
#wifi
CONFIG_ESP_WIFI_ENABLED=y
CONFIG_ESP_WIFI_FTM_ENABLE=y
CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT=y
CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y
CONFIG_ESP_WIFI_CSI_ENABLED=y
#lwip
CONFIG_LWIP_L2_TO_L3_COPY=y
CONFIG_LWIP_IP_FORWARD=y
CONFIG_LWIP_IPV4_NAPT=y
#mqtt
CONFIG_MQTT_PROTOCOL_311=y
CONFIG_MQTT_PROTOCOL_5=y
CONFIG_MQTT_TRANSPORT_SSL=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
after idf.py build command, I found that the sdkconfig.defaults file was overwritten, the definitions inside the sdkconfig file were copied to the sdkconfig.defaults file. this is not what I expected. my understanding is that the sdkconfig.defaults should not be touched by the compiler at all. Is this a SDK bug, or it's because I did something wrong?
my sdkconfig.defaults is is simple:
#partition table
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
#wifi
CONFIG_ESP_WIFI_ENABLED=y
CONFIG_ESP_WIFI_FTM_ENABLE=y
CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT=y
CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y
CONFIG_ESP_WIFI_CSI_ENABLED=y
#lwip
CONFIG_LWIP_L2_TO_L3_COPY=y
CONFIG_LWIP_IP_FORWARD=y
CONFIG_LWIP_IPV4_NAPT=y
#mqtt
CONFIG_MQTT_PROTOCOL_311=y
CONFIG_MQTT_PROTOCOL_5=y
CONFIG_MQTT_TRANSPORT_SSL=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y