Reorganize sdkconfigs and release UF2s
This commit is contained in:
parent
7f60ebd6c7
commit
17bdc969db
@ -8,6 +8,6 @@ repos:
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
|
||||
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)'
|
||||
- id: trailing-whitespace
|
||||
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
|
||||
|
@ -228,9 +228,17 @@ IDF_PATH = $(realpath ./esp-idf)
|
||||
$(BUILD)/esp-idf:
|
||||
$(Q)$(MKDIR) -p $@
|
||||
|
||||
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults
|
||||
else
|
||||
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults
|
||||
endif
|
||||
SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);boards/$(BOARD)/sdkconfig
|
||||
|
||||
# create the config headers
|
||||
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig | $(BUILD)/esp-idf
|
||||
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults;boards/$(BOARD)/sdkconfig" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja
|
||||
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja
|
||||
|
||||
# build a lib
|
||||
# Adding -d explain -j 1 -v to the ninja line will output debug info
|
||||
@ -247,10 +255,12 @@ $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld: $(BUILD)/esp-idf/config/
|
||||
$(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
IDF_PATH=$(IDF_PATH) ninja -C $(BUILD)/esp-idf partition_table/partition-table.bin
|
||||
|
||||
# run menuconfig
|
||||
# run menuconfig and then remove standard settings
|
||||
menuconfig: $(BUILD)/esp-idf/config
|
||||
$(Q)ninja -C $(BUILD)/esp-idf menuconfig
|
||||
$(Q)diff --old-line-format= --unchanged-line-format= sdkconfig.defaults $(BUILD)/esp-idf/sdkconfig > boards/$(BOARD)/sdkconfig || true
|
||||
$(Q)diff --old-line-format= --unchanged-line-format= esp-idf-config/sdkconfig.defaults $(BUILD)/esp-idf/sdkconfig > $(BUILD)/sdkconfig.diff || true
|
||||
$(Q)grep -Fvxf $(FLASH_SDKCONFIG) $(BUILD)/sdkconfig.diff > $(BUILD)/sdkconfig.stripped1
|
||||
$(Q)grep -Fvxf $(DEBUG_SDKCONFIG) $(BUILD)/sdkconfig.stripped1 > boards/$(BOARD)/sdkconfig
|
||||
|
||||
# qstr builds include headers so we need to make sure they are up to date
|
||||
$(HEADER_BUILD)/qstr.i.last: | $(BUILD)/esp-idf/config/sdkconfig.h
|
||||
@ -307,8 +317,6 @@ $(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp
|
||||
$(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf
|
||||
$(STEPECHO) "Create $@"
|
||||
$(Q)esptool.py --chip esp32s2 elf2image $(FLASH_FLAGS) --elf-sha256-offset 0xb0 -o $@ $^
|
||||
# $(Q)$(OBJCOPY) -O binary $^ $@
|
||||
# $(Q)$(OBJCOPY) -O binary -j .vectors -j .text -j .data $^ $@
|
||||
|
||||
$(BUILD)/firmware.bin: $(BUILD)/circuitpython-firmware.bin | esp-idf-stamp
|
||||
$(Q)$(PYTHON) ../../tools/join_bins.py $@ 0x1000 $(BUILD)/esp-idf/bootloader/bootloader.bin 0x8000 $(BUILD)/esp-idf/partition_table/partition-table.bin 0x10000 $(BUILD)/circuitpython-firmware.bin
|
||||
|
@ -16,10 +16,8 @@ CONFIG_DEFAULT_PSRAM_CLK_IO=30
|
||||
CONFIG_DEFAULT_PSRAM_CS_IO=26
|
||||
# end of PSRAM clock and cs IO for ESP32S2
|
||||
|
||||
CONFIG_SPIRAM_SPIWP_SD3_PIN=28
|
||||
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
|
||||
# CONFIG_SPIRAM_RODATA is not set
|
||||
# CONFIG_SPIRAM_USE_AHB_DBUS3 is not set
|
||||
# CONFIG_SPIRAM_SPEED_80M is not set
|
||||
CONFIG_SPIRAM_SPEED_40M=y
|
||||
# CONFIG_SPIRAM_SPEED_26M is not set
|
||||
@ -33,3 +31,4 @@ CONFIG_SPIRAM_USE_MEMMAP=y
|
||||
CONFIG_SPIRAM_MEMTEST=y
|
||||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
||||
# end of SPI RAM config
|
||||
|
||||
|
@ -16,10 +16,8 @@ CONFIG_DEFAULT_PSRAM_CLK_IO=30
|
||||
CONFIG_DEFAULT_PSRAM_CS_IO=26
|
||||
# end of PSRAM clock and cs IO for ESP32S2
|
||||
|
||||
CONFIG_SPIRAM_SPIWP_SD3_PIN=28
|
||||
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
|
||||
# CONFIG_SPIRAM_RODATA is not set
|
||||
# CONFIG_SPIRAM_USE_AHB_DBUS3 is not set
|
||||
# CONFIG_SPIRAM_SPEED_80M is not set
|
||||
CONFIG_SPIRAM_SPEED_40M=y
|
||||
# CONFIG_SPIRAM_SPEED_26M is not set
|
||||
@ -33,3 +31,4 @@ CONFIG_SPIRAM_USE_MEMMAP=y
|
||||
CONFIG_SPIRAM_MEMTEST=y
|
||||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
||||
# end of SPI RAM config
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
|
||||
# No newlines in this file so they are preserved in the board sdkconfig.
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
|
||||
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions-16MB.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv"
|
@ -1,10 +1,9 @@
|
||||
|
||||
# No newlines in this file so they are preserved in the board sdkconfig.
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions-4MB.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv"
|
@ -1,10 +1,9 @@
|
||||
|
||||
# No newlines in this file so they are preserved in the board sdkconfig.
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
|
||||
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MB.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions-8MB.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv"
|
13
ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults
Normal file
13
ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults
Normal file
@ -0,0 +1,13 @@
|
||||
# No newlines in this file so they are preserved in the board sdkconfig.
|
||||
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
|
||||
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
|
||||
# CONFIG_ESP_CONSOLE_USB_CDC is not set
|
||||
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
|
||||
# CONFIG_ESP_CONSOLE_NONE is not set
|
||||
CONFIG_ESP_CONSOLE_UART=y
|
||||
CONFIG_ESP_CONSOLE_UART_NUM=0
|
||||
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
|
||||
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
|
||||
# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set
|
||||
# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set
|
||||
# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set
|
12
ports/esp32s2/esp-idf-config/sdkconfig-opt.defaults
Normal file
12
ports/esp32s2/esp-idf-config/sdkconfig-opt.defaults
Normal file
@ -0,0 +1,12 @@
|
||||
# No newlines in this file so they are preserved in the board sdkconfig.
|
||||
# CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set
|
||||
# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
|
||||
# CONFIG_CONSOLE_UART_DEFAULT is not set
|
||||
CONFIG_ESP_CONSOLE_UART_NONE=y
|
||||
CONFIG_ESP_CONSOLE_NONE=y
|
||||
CONFIG_ESP_CONSOLE_UART_NUM=-1
|
||||
CONFIG_CONSOLE_UART_NUM=-1
|
||||
# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set
|
||||
CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y
|
||||
# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set
|
||||
CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y
|
@ -42,7 +42,7 @@ extension_by_port = {
|
||||
"cxd56": SPK,
|
||||
"mimxrt10xx": HEX_UF2,
|
||||
"litex": DFU,
|
||||
"esp32s2": BIN
|
||||
"esp32s2": BIN_UF2
|
||||
}
|
||||
|
||||
# Per board overrides
|
||||
|
Loading…
Reference in New Issue
Block a user