diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index ca16b1c2cfed7..fbb0f54a397cc 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -202,12 +202,12 @@ else endif ifeq ($(IDF_TARGET_ARCH),xtensa) - # Remove the last two flags once TinyUSB is updated with the `#include ` instead of - # `#include "xtensa/xtensa_api.h"`. +# Remove the last two flags once TinyUSB is updated with the `#include ` instead of +# `#include "xtensa/xtensa_api.h"`. CFLAGS += -mlongcalls -isystem esp-idf/components/xtensa/deprecated_include/ -Wno-error=cpp - # Wrap longjmp with a patched version that protects register window update with a critical section +# Wrap longjmp with a patched version that protects register window update with a critical section LDFLAGS += -Wl,--wrap=longjmp else ifeq ($(IDF_TARGET_ARCH),riscv) @@ -567,27 +567,38 @@ $(BUILD)/esp-idf: TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults +# Choose the correct partition layout, based on UF2 or not, flash size, etc. +UF2_BOOTLOADER ?= $(CIRCUITPY_USB_DEVICE) + ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB) +####### No 2MB UF2 boards, so always no OTA, not UF2 FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults -else -UF2_BOOTLOADER ?= $(CIRCUITPY_USB_DEVICE) -ifeq ($(UF2_BOOTLOADER), 1) -# UF2-capable board - FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults -else -# non-UF2 partition layout -ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 4MB) - ifeq ($(CIRCUITPY_4MB_FLASH_LARGE_USER_FS_LAYOUT), 1) -# Some boards use a 2MB firmware and almost 2MB user filesystem, for historical reasons. - FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2-large-user_fs.defaults +else ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 4MB) + ifeq ($(UF2_BOOTLOADER), 1) +############### TODO: For right now, use no-ota only for ESP32-S3. Eventually it will be for ESP32-S2 as well. + ifeq ($(IDF_TARGET),esp32s3) + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota.defaults + else + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults + endif else - FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults +############### Non-UF2 4MB: C3, C6, etc. + ifeq ($(CIRCUITPY_4MB_FLASH_LARGE_USER_FS_LAYOUT), 1) +###################### Some boards use a 2MB firmware and almost 2MB user filesystem, for historical reasons. + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2-large-user_fs.defaults + else + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults + endif endif else - FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults -endif -endif +####### All the rest are >4MB flash + ifeq ($(UF2_BOOTLOADER), 1) + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults + else + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults + endif endif + FLASH_MODE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_MODE).defaults FLASH_SPEED_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_FREQ).defaults diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index 9f8acf042f679..d1b6d503125c0 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -13,13 +13,11 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -# No OTA partition: larger firmware partition -FLASH_SIZE_SDKCONFIG = esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota.defaults +CIRCUITPY_ESPCAMERA = 1 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_CANIO = 0 CIRCUITPY_DUALBANK = 0 -CIRCUITPY_ESPCAMERA = 1 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_KEYPAD = 0 CIRCUITPY_ONEWIREIO = 0 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 57801b730551c..6fafa82485ac6 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -12,10 +12,3 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m - -OPTIMIZATION_FLAGS = -Os -#CIRCUITPY_ESPCAMERA = 0 -#CIRCUITPY_PARALLELDISPLAYBUS = 0 -CIRCUITPY_BLEIO_NATIVE = 1 - -FLASH_SIZE_SDKCONFIG = esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota.defaults diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index 0aebfea171307..a82ae6d4f04f7 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -14,5 +14,5 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -CIRCUITPY_ESPCAMERA = 0 +# Already have a display. CIRCUITPY_PARALLELDISPLAYBUS = 0 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk index c7d6c33a3fd4e..71ef6d222a2c9 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk @@ -10,9 +10,9 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 -CIRCUITPY_PARALLELDISPLAYBUS = 0 - CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m + +# Already have a display. +CIRCUITPY_PARALLELDISPLAYBUS = 0 diff --git a/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk index 32f48e1a52773..c6ca0ba66eb4b 100644 --- a/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk @@ -7,5 +7,4 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_BLEIO_NATIVE = 0 CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk index 5ab8c995e331c..b3f0dd9165a0c 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk @@ -9,6 +9,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_PARALLELDISPLAYBUS = 0 @@ -20,7 +24,3 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB -CIRCUITPY_ESP_PSRAM_MODE = qio -CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/adafruit_mini_sparkle_motion/mpconfigboard.mk b/ports/espressif/boards/adafruit_mini_sparkle_motion/mpconfigboard.mk index 99e7fd85b1ade..db773603e186a 100644 --- a/ports/espressif/boards/adafruit_mini_sparkle_motion/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_mini_sparkle_motion/mpconfigboard.mk @@ -7,5 +7,5 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_BLEIO_NATIVE = 0 CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_PARALLELDISPLAYBUS = 0 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index afc6e335c1a41..09571a63a59b9 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -13,6 +13,6 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -CIRCUITPY_ESPCAMERA = 0 # Not enough pins. +CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_PARALLELDISPLAYBUS = 0 diff --git a/ports/espressif/boards/adafruit_sparkle_motion/mpconfigboard.mk b/ports/espressif/boards/adafruit_sparkle_motion/mpconfigboard.mk index a793ba6e779da..c850d8c9e70ec 100644 --- a/ports/espressif/boards/adafruit_sparkle_motion/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_sparkle_motion/mpconfigboard.mk @@ -7,5 +7,5 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_BLEIO_NATIVE = 0 CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_PARALLELDISPLAYBUS = 0 diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk index 5ad71b2da59d6..dfd6a665f3b10 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk @@ -1,4 +1,4 @@ -# TODO +# A better directory name for this board would be dfrobot_beetle_esp32_c3. CIRCUITPY_CREATOR_ID = 0x10101010 CIRCUITPY_CREATION_ID = 0x00C30001 diff --git a/ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.mk b/ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.mk index dc73ae08f5562..6234a6b60cc0b 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.mk +++ b/ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.mk @@ -5,9 +5,6 @@ USB_MANUFACTURER = "ElectronicCats" IDF_TARGET = esp32s2 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk index 72eb1db85a012..1980ff38ccdfd 100644 --- a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk @@ -15,8 +15,3 @@ CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_CANIO = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 -CIRCUITPY_PIXELBUF = 0 -CIRCUITPY_PS2IO = 0 -CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_TOUCHIO = 0 -CIRCUITPY_KEYPAD = 0 diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk index 43759c3e2b6a2..75e097afa84b8 100644 --- a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk @@ -6,5 +6,3 @@ IDF_TARGET = esp32c6 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB - -CIRCUITPY_AUDIOMP3 = 0 diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/mpconfigboard.mk index 37f0450490c30..271e0fd8d958e 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/mpconfigboard.mk @@ -8,4 +8,3 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.mk b/ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.mk index 1cc62cb69d4ce..f4f7ae7a5891a 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.mk +++ b/ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.mk @@ -8,4 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.mk index 1cdf6273beeea..f593b77cfff5c 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.mk @@ -8,4 +8,3 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/mpconfigboard.mk index 0fbcf5c62bf77..8cacf57efdf35 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/mpconfigboard.mk @@ -8,4 +8,3 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk index f58218d5e6b5b..fff6cae6d336e 100644 --- a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk @@ -13,10 +13,5 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -CIRCUITPY_ESPCAMERA = 0 -CIRCUITPY_BITMAPFILTER = 0 -CIRCUITPY_CODEOP = 0 -CIRCUITPY_PARALLELDISPLAYBUS = 0 - # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/lolin_s3_mini_pro/mpconfigboard.mk b/ports/espressif/boards/lolin_s3_mini_pro/mpconfigboard.mk index 26d7e176a351e..f08c733e43a0c 100644 --- a/ports/espressif/boards/lolin_s3_mini_pro/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3_mini_pro/mpconfigboard.mk @@ -13,10 +13,5 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -CIRCUITPY_ESPCAMERA = 0 -CIRCUITPY_BITMAPFILTER = 0 -CIRCUITPY_CODEOP = 0 -CIRCUITPY_PARALLELDISPLAYBUS = 0 - # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/mixgo_ce_udisk/mpconfigboard.mk b/ports/espressif/boards/mixgo_ce_udisk/mpconfigboard.mk index a6a8cd7fa00eb..96e298f8e4886 100644 --- a/ports/espressif/boards/mixgo_ce_udisk/mpconfigboard.mk +++ b/ports/espressif/boards/mixgo_ce_udisk/mpconfigboard.mk @@ -9,10 +9,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_AESIO = 0 -CIRCUITPY_CANIO = 0 -CIRCUITPY_CODEOP = 0 CIRCUITPY_ESPCAMERA = 0 +# TODO: Remove after partition expansion +CIRCUITPY_AESIO = 0 +CIRCUITPY_KEYPAD_DEMUX = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests @@ -20,3 +20,4 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/mixgo_cp_lib/mixgoce_lib CIRCUITPY_MESSAGE_COMPRESSION_LEVEL = 9 +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.mk b/ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.mk index 8a6b359d238c2..5c806cb69b281 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.mk +++ b/ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.mk @@ -8,4 +8,3 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/sunton_esp32_2424S012/mpconfigboard.mk b/ports/espressif/boards/sunton_esp32_2424S012/mpconfigboard.mk index e08fc26babf25..716a01084c118 100644 --- a/ports/espressif/boards/sunton_esp32_2424S012/mpconfigboard.mk +++ b/ports/espressif/boards/sunton_esp32_2424S012/mpconfigboard.mk @@ -8,6 +8,3 @@ CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 - -# Not enough flash space. -CIRCUITPY_CODEOP = 0 diff --git a/ports/espressif/boards/thingpulse_pendrive_s3/mpconfigboard.mk b/ports/espressif/boards/thingpulse_pendrive_s3/mpconfigboard.mk index 66f5a4aba7069..cb273b7a45d86 100644 --- a/ports/espressif/boards/thingpulse_pendrive_s3/mpconfigboard.mk +++ b/ports/espressif/boards/thingpulse_pendrive_s3/mpconfigboard.mk @@ -13,7 +13,8 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m +# No pins. CIRCUITPY_ESPCAMERA = 0 -CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_PARALLELDISPLAYBUS = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/waveshare_esp32_s3_matrix/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s3_matrix/mpconfigboard.mk index f890ec8769fc4..0378c23be699a 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_matrix/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s3_matrix/mpconfigboard.mk @@ -13,10 +13,5 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -CIRCUITPY_ESPCAMERA = 0 -CIRCUITPY_BITMAPFILTER = 0 -CIRCUITPY_CODEOP = 0 -CIRCUITPY_PARALLELDISPLAYBUS = 0 - # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/waveshare_esp32_s3_tiny/sdkconfig b/ports/espressif/boards/waveshare_esp32_s3_tiny/sdkconfig index 3d0800e10d9ac..e962866216039 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_tiny/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s3_tiny/sdkconfig @@ -7,7 +7,6 @@ # # LWIP # -# CONFIG_LWIP_IPV6 is not set # end of LWIP # end of Component config diff --git a/ports/espressif/boards/waveshare_esp32_s3_zero/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s3_zero/mpconfigboard.mk index e1f616dea12f1..6e386e70e1724 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_zero/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s3_zero/mpconfigboard.mk @@ -13,10 +13,5 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m -CIRCUITPY_ESPCAMERA = 0 -CIRCUITPY_BITMAPFILTER = 0 -CIRCUITPY_CODEOP = 0 -CIRCUITPY_PARALLELDISPLAYBUS = 0 - # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/weact_esp32c6_n4/mpconfigboard.mk b/ports/espressif/boards/weact_esp32c6_n4/mpconfigboard.mk index ad4832699ee0b..bdd407ef10d00 100644 --- a/ports/espressif/boards/weact_esp32c6_n4/mpconfigboard.mk +++ b/ports/espressif/boards/weact_esp32c6_n4/mpconfigboard.mk @@ -6,5 +6,3 @@ IDF_TARGET = esp32c6 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB - -CIRCUITPY_AUDIOMP3 = 0 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index de3844e632840..ae8d6def12850 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -1,3 +1,10 @@ +# This file is part of the CircuitPython project: https://circuitpython.org +# +# SPDX-FileCopyrightText: Copyright (c) 2025 Adafruit Industries +# +# SPDX-License-Identifier: MIT + + ifeq ($(IDF_TARGET),esp32c2) IDF_TARGET_ARCH = riscv CROSS_COMPILE = riscv32-esp-elf- @@ -18,13 +25,14 @@ IDF_TARGET_ARCH = xtensa CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- endif -# Use internal flash for CIRCUITPY drive +# Use "internal flash" for CIRCUITPY drive. +# Even thought it's an external flash chip, it appears as internal. INTERNAL_FLASH_FILESYSTEM = 1 # Internal math library is substantially smaller than toolchain one INTERNAL_LIBM = 0 -# Longints can be implemented as mpz, as longlong, or not +# Longints can be implemented as MPZ, as LONGLONG, or NONE LONGINT_IMPL = MPZ # Default to no-psram @@ -47,6 +55,7 @@ CIRCUITPY_HASHLIB_MBEDTLS_ONLY = 0 CIRCUITPY_PORT_SERIAL = 1 # These modules are implemented in ports//common-hal: +CIRCUITPY__EVE ?= 1 CIRCUITPY_ALARM ?= 1 CIRCUITPY_ALARM_TOUCH ?= 0 CIRCUITPY_ANALOGBUFIO ?= 1 @@ -54,6 +63,7 @@ CIRCUITPY_AUDIOBUSIO ?= 1 CIRCUITPY_AUDIOBUSIO_PDMIN ?= 0 CIRCUITPY_AUDIOIO ?= 0 CIRCUITPY_BLEIO_HCI = 0 +CIRCUITPY_BLEIO_NATIVE ?= 1 CIRCUITPY_CANIO ?= 1 CIRCUITPY_COUNTIO ?= 1 CIRCUITPY_ESPCAMERA ?= 1 @@ -78,26 +88,23 @@ CIRCUITPY_WATCHDOG ?= 1 CIRCUITPY_WIFI ?= 1 CIRCUITPY_SOCKETPOOL_IPV6 ?= 1 -# Enable _eve module -CIRCUITPY__EVE ?= 1 - # Conditionally turn off modules/features ifeq ($(IDF_TARGET),esp32) # Modules CIRCUITPY_ALARM_TOUCH = 1 -CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_AUDIOIO ?= 1 CIRCUITPY_RGBMATRIX = 0 # SDMMC not supported yet CIRCUITPY_SDIOIO = 0 -# Features +# Has no USB CIRCUITPY_USB_DEVICE = 0 else ifeq ($(IDF_TARGET),esp32c2) -# C2 ROM spits out the UART at 74880 when connected to a 26mhz crystal! Debug -# prints will default to that too. +# C2 ROM spits out the UART at 74880 when connected to a 26mhz crystal! +# Debug prints will default to that too. # Modules CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_ESPULP = 0 @@ -157,9 +164,10 @@ CIRCUITPY_TOUCHIO_USE_NATIVE = 0 CIRCUITPY_USB_DEVICE = 0 CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 -# No room in flash. -CIRCUITPY_AESIO = 0 -CIRCUITPY_KEYPAD_DEMUX = 0 +# Some C3 boards have only 2MB flash +ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),2MB) +CIRCUITPY_BLEIO_NATIVE = 0 +endif else ifeq ($(IDF_TARGET),esp32c6) # Modules @@ -183,9 +191,6 @@ CIRCUITPY_TOUCHIO_USE_NATIVE = 0 CIRCUITPY_USB_DEVICE = 0 CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 -# Remove temporarily until 10265 is merged -CIRCUITPY_ULAB = 0 - else ifeq ($(IDF_TARGET),esp32h2) # Modules CIRCUITPY_ESPCAMERA = 0 @@ -248,7 +253,7 @@ CIRCUITPY_ESPCAMERA = 0 else ifeq ($(IDF_TARGET),esp32s2) # Modules CIRCUITPY_ALARM_TOUCH = 1 -CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_AUDIOIO ?= 1 # No BLE in hw CIRCUITPY_BLEIO_NATIVE = 0 @@ -257,59 +262,39 @@ CIRCUITPY_SDIOIO = 0 CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 +# TODO: remove this after ESP32-S2 4MB boards get combined OTA partition. +ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),4MB) +CIRCUITPY__EVE = 0 +endif + else ifeq ($(IDF_TARGET),esp32s3) # Modules CIRCUITPY_ALARM_TOUCH = 1 CIRCUITPY_AUDIOBUSIO_PDMIN = 1 CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 - -# No room for _bleio on boards with 4MB flash -ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),4MB) -CIRCUITPY_BLEIO_NATIVE ?= 0 -endif - -endif - -# bitmapfilter does not fit on 4MB boards unless they are set up as camera boards -ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),4MB) -CIRCUITPY_BITMAPFILTER ?= 0 -OPTIMIZATION_FLAGS ?= -Os -CIRCUITPY_DUALBANK ?= 0 -else -CIRCUITPY_DUALBANK ?= 1 -endif - -# We used to default to OTA partition layout but are moving away from it so that -# BLE and alarm can be included. This setting prevents the partition layout from -# changing. -ifeq ($(CIRCUITPY_LEGACY_4MB_FLASH_LAYOUT), 1) -ifeq ($(IDF_TARGET_ARCH), xtensa) - CIRCUITPY_ALARM ?= 1 -else -CIRCUITPY_ALARM = 0 -endif -CIRCUITPY_DUALBANK = 1 -CIRCUITPY_BLEIO_NATIVE ?= 0 -CIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY = 0 -else -CIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY = 1 endif -# No room for dualbank or mp3 on boards with 2MB flash +# No room for large modules on 2MB boards +# 2MB boards have a single firmware partition, and can't do dualbank. ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),2MB) -CIRCUITPY_BITMAPFILTER ?= 0 -CIRCUITPY_DUALBANK = 0 +CIRCUITPY__EVE = 0 CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_BITMAPFILTER ?= 0 CIRCUITPY_BLEIO_NATIVE ?= 0 +CIRCUITPY_DUALBANK = 0 +OPTIMIZATION_FLAGS ?= -Os endif -# No room for _eve on boards with 4MB flash +# 4MB boards have a single firmware partition, and can't do dualbank. ifeq ($(CIRCUITPY_ESP_FLASH_SIZE),4MB) -CIRCUITPY__EVE = 0 +CIRCUITPY_DUALBANK = 0 +OPTIMIZATION_FLAGS ?= -Os endif -# default BLEIO after flash-size based defaults -CIRCUITPY_BLEIO_NATIVE ?= 1 +# espcamera does not work on boards without SPIRAM +ifeq ($(CIRCUITPY_ESP_PSRAM_SIZE),0) +CIRCUITPY_ESPCAMERA = 0 +endif # Modules dependent on other modules CIRCUITPY_ESPNOW ?= $(CIRCUITPY_WIFI)