@@ -289,13 +289,15 @@ IDF_PATH = $(realpath ./esp-idf)
289
289
$(BUILD ) /esp-idf :
290
290
$(Q )$(MKDIR ) -p $@
291
291
292
+ TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET ) .defaults
292
293
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE ) .defaults
293
294
ifeq ($(DEBUG ) , 1)
294
295
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults
295
296
else
296
297
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults
297
298
endif
298
- SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG ) ;$(FLASH_SDKCONFIG ) ;boards/$(BOARD ) /sdkconfig
299
+
300
+ SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG ) ;$(FLASH_SDKCONFIG ) ;$(TARGET_SDKCONFIG ) ;boards/$(BOARD ) /sdkconfig
299
301
300
302
# create the config headers
301
303
$(BUILD ) /esp-idf/config/sdkconfig.h : boards/$(BOARD ) /sdkconfig | $(BUILD ) /esp-idf
@@ -316,10 +318,11 @@ $(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sd
316
318
IDF_PATH=$(IDF_PATH ) ninja -C $(BUILD ) /esp-idf partition_table/partition-table.bin
317
319
318
320
# run menuconfig and then remove standard settings
319
- menuconfig : $(BUILD ) /esp-idf/config
321
+ menuconfig : $(BUILD ) /esp-idf/config $( BUILD ) /esp-idf/config/sdkconfig.h
320
322
$(Q ) ninja -C $(BUILD ) /esp-idf menuconfig
321
- $(Q ) diff --old-line-format= --unchanged-line-format= esp-idf-config/sdkconfig.defaults $(BUILD ) /esp-idf/sdkconfig > $(BUILD ) /sdkconfig.diff || true
322
- $(Q ) grep -Fvxf $(DEBUG_SDKCONFIG ) -f $(FLASH_SDKCONFIG ) $(BUILD ) /sdkconfig.diff > boards/$(BOARD ) /sdkconfig
323
+ # Newer versions of the idf will have save-defconfig that will only include non-default values.
324
+ # We should use that when available. For now, we sort out everything.
325
+ python tools/update_sdkconfig.py --board=$(BOARD ) --debug=$(DEBUG )
323
326
324
327
# qstr builds include headers so we need to make sure they are up to date
325
328
$(HEADER_BUILD ) /qstr.split : | $(BUILD ) /esp-idf/config/sdkconfig.h
0 commit comments