diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 57462642ba..82d068f136 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -336,12 +336,16 @@ $(BUILD)/esp-idf: TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults -UF2_BOOTLOADER ?= $(if $(filter $(IDF_TARGET),esp32s2 esp32s3),1) +ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB) + FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults +else +UF2_BOOTLOADER ?= $(CIRCUITPY_USB) ifeq ($(UF2_BOOTLOADER), 1) FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults else FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults endif +endif ifeq ($(DEBUG), 1) DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk index 3cec6831bc..054810a088 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 2MB + +CIRCUITPY_DUALBANK = 0 diff --git a/ports/espressif/esp-idf-config/partitions-2MB-no-uf2.csv b/ports/espressif/esp-idf-config/partitions-2MB-no-ota-no-uf2.csv similarity index 100% rename from ports/espressif/esp-idf-config/partitions-2MB-no-uf2.csv rename to ports/espressif/esp-idf-config/partitions-2MB-no-ota-no-uf2.csv diff --git a/ports/espressif/esp-idf-config/partitions-4MB-no-uf2.csv b/ports/espressif/esp-idf-config/partitions-4MB-no-uf2.csv index 90bf05ce39..6dc2dcf2e9 100644 --- a/ports/espressif/esp-idf-config/partitions-4MB-no-uf2.csv +++ b/ports/espressif/esp-idf-config/partitions-4MB-no-uf2.csv @@ -3,5 +3,7 @@ # bootloader.bin,, 0x1000, 32K # partition table,, 0x8000, 4K nvs, data, nvs, 0x9000, 20K, -app, app, factory, 0x10000, 2048K, -user_fs, data, fat, 0x210000, 1984K, +otadata, data, ota, 0xe000, 8K, +ota_0, 0, ota_0, 0x10000, 1408K, +ota_1, 0, ota_1, 0x170000, 1408K, +user_fs, data, fat, 0x2d0000, 1216K, diff --git a/ports/espressif/esp-idf-config/sdkconfig-2MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults similarity index 92% rename from ports/espressif/esp-idf-config/sdkconfig-2MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults index 7c4c4baddd..2d0b2ac5eb 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-2MB-no-uf2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults @@ -10,9 +10,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE="2MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-2MB-no-uf2.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-2MB-no-ota-no-uf2.csv" # # Partition Table # -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-2MB-no-uf2.csv" +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-2MB-no-ota-no-uf2.csv" # end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index 57700c65ca..483e0f9b87 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -598,29 +598,10 @@ CONFIG_HEAP_TRACING_OFF=y # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set # end of Heap memory debugging -# -# Log output -# -# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -CONFIG_LOG_DEFAULT_LEVEL_INFO=y -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set -CONFIG_LOG_DEFAULT_LEVEL=3 -CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y -# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set -# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set -CONFIG_LOG_MAXIMUM_LEVEL=3 -CONFIG_LOG_COLORS=y -CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y -# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set -# end of Log output # # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="Adafruit-Feather-ESP32-V2" # CONFIG_LWIP_NETIF_API is not set # CONFIG_LWIP_TCPIP_CORE_LOCKING is not set CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y