Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
[submodule "ports/espressif/esp-idf"]
path = ports/espressif/esp-idf
url = https://github.com/adafruit/esp-idf.git
branch = circuitpython-v5.5.1
branch = circuitpython-v6.1
[submodule "ports/espressif/esp-protocols"]
path = ports/espressif/esp-protocols
url = https://github.com/adafruit/esp-protocols.git
Expand Down
57 changes: 37 additions & 20 deletions ports/espressif/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ INC += \
-isystem esp-idf/components/esp_hal_wdt/include \
-isystem esp-idf/components/esp_hal_wdt/$(IDF_TARGET)/include \
-isystem esp-idf/components/esp_hal_security/include \
-isystem esp-idf/components/esp_hal_regi2c/include \
-isystem esp-idf/components/esp_hal_regi2c/$(IDF_TARGET)/include \
-isystem esp-idf/components/esp_hal_systimer/include \
-isystem esp-idf/components/heap/include \
-isystem esp-idf/components/log/include \
-isystem esp-idf/components/lwip/include \
Expand Down Expand Up @@ -339,6 +342,9 @@ LDFLAGS += \
-Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \
-Lesp-idf/components/soc/$(IDF_TARGET)/ld \
-Lesp-idf/components/esp_hal_wdt/$(IDF_TARGET) \
-Lesp-idf/components/esp_hal_systimer/$(IDF_TARGET) \
-Lesp-idf/components/heap/port/$(IDF_TARGET)/ld \
-Lesp-idf/components/esp_hal_regi2c/$(IDF_TARGET) \
-Tmemory.ld \
-Tsections.ld \
-T$(IDF_TARGET).peripherals.ld \
Expand Down Expand Up @@ -373,7 +379,7 @@ LDFLAGS += \
-Tesp32c2.rom.heap.ld \
-Tesp32c2.rom.libc.ld \
-Tesp32c2.rom.version.ld \
-Tesp32c2.rom.systimer.ld \
-Trom.systimer.ld \
-Trom.wdt.ld

CFLAGS += -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ
Expand Down Expand Up @@ -411,7 +417,7 @@ LDFLAGS += \
-Tesp32c5.rom.version.ld \
-Tesp32c5.rom.coexist.ld \
-Tesp32c5.rom.heap.ld \
-Tesp32c5.rom.systimer.ld \
-Trom.systimer.ld \
-Trom.wdt.ld

CHIP_COMPONENTS = \
Expand All @@ -433,7 +439,7 @@ LDFLAGS += \
-Tesp32c6.rom.libc.ld \
-Tesp32c6.rom.coexist.ld \
-Tesp32c6.rom.heap.ld \
-Tesp32c6.rom.systimer.ld \
-Trom.systimer.ld \
-Trom.wdt.ld


Expand All @@ -457,7 +463,7 @@ LDFLAGS += \
-Tesp32c61.rom.version.ld \
-Tesp32c61.rom.coexist.ld \
-Tesp32c61.rom.heap.ld \
-Tesp32c61.rom.systimer.ld \
-Trom.systimer.ld \
-Trom.wdt.ld


Expand All @@ -477,18 +483,18 @@ CFLAGS += \
-isystem esp-idf/components/esp_driver_touch_sens/hw_ver3/include

ifeq ($(CIRCUITPY_ESP32P4_REV),3)
IDF_TARGET_ROM_LD = esp32p4.rom.eco5.ld
IDF_TARGET_ROM_FLOAT_LD = esp32p4.rom.eco5.rvfp.ld
IDF_TARGET_ROM_FLOAT_LD = esp32p4.rom.rvfp.ld
LDFLAGS += \
-Tesp32p4.rom.systimer.ld \
-Tesp32p4.rom.eco5.libc.ld \
-Trom.systimer.ld \
-Tesp32p4.rom.libc.ld \
-Tesp32p4.rom.version.ld \
-Trom.wdt.ld
else
IDF_TARGET_ROM_FLOAT_LD = esp32p4.rom.rvfp.ld
IDF_TARGET_ROM_LD = esp32p4.rom.eco0_4.ld
IDF_TARGET_ROM_FLOAT_LD = esp32p4.rom.eco0_4.rvfp.ld
LDFLAGS += \
-Tesp32p4.rom.libc.ld \
-Tesp32p4.rom.systimer.ld \
-Trom.systimer.ld \
-Tesp32p4.rom.eco0_4.libc.ld \
-Tesp32p4.rom.version.ld \
-Trom.wdt.ld
endif
Expand All @@ -512,7 +518,7 @@ else ifeq ($(IDF_TARGET),esp32h2)
LDFLAGS += \
-Tesp32h2.rom.heap.ld \
-Tesp32h2.rom.libc.ld \
-Tesp32h2.rom.systimer.ld \
-Trom.systimer.ld \
-Trom.wdt.ld

CHIP_COMPONENTS = \
Expand Down Expand Up @@ -553,7 +559,7 @@ CFLAGS += -isystem esp-idf/components/esp_driver_touch_sens/hw_ver2/include
LDFLAGS += \
-Tesp32s3.rom.libc.ld \
-Tesp32s3.rom.version.ld \
-Tesp32s3.rom.systimer.ld \
-Trom.systimer.ld \
-Tesp32s3.rom.bt_funcs.ld \
-Trom.wdt.ld

Expand Down Expand Up @@ -936,8 +942,17 @@ BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a
endif

ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) $(CHIP_COMPONENTS) app_update bootloader_support driver esp_driver_dma esp_driver_gpio esp_driver_gptimer esp_driver_i2c esp_driver_ledc esp_driver_spi esp_driver_uart efuse esp_adc esp_app_format esp_common esp_event esp_gdbstub esp_hal_ana_conv esp_hal_clock esp_hal_gpio esp_hal_gpspi esp_hal_i2c esp_hal_ledc esp_hal_mspi esp_hal_security esp_hal_timg esp_hal_uart esp_hal_wdt esp_hw_support esp_mm esp_partition esp_pm esp_ringbuf esp_rom esp_system esp_timer freertos hal heap log esp_libc nvs_flash nvs_sec_provider pthread soc spi_flash vfs esp_stdio
ifneq ($(IDF_TARGET),esp32)
ESP_IDF_COMPONENTS_LINK += esp_hal_systimer
endif
# These chips have regi2c in ROM. The rest link the esp_hal_regi2c implementation.
ifneq ($(filter $(IDF_TARGET),esp32 esp32c2 esp32c3 esp32s3),)
LDFLAGS += -Trom.regi2c.ld
else
ESP_IDF_COMPONENTS_LINK += esp_hal_regi2c
endif
ifneq ($(CIRCUITPY_WIFI),0)
ESP_IDF_COMPONENTS_LINK += esp_coex esp_netif esp_security esp-tls esp_wifi lwip mbedtls mdns wpa_supplicant esp_phy
ESP_IDF_COMPONENTS_LINK += esp_coex esp_netif esp_security esp-tls esp_wifi lwip mdns wpa_supplicant esp_phy
endif
ifneq ($(CIRCUITPY_BLEIO_NATIVE),0)
BLE_IMPL_esp32 := esp32
Expand Down Expand Up @@ -965,11 +980,9 @@ ifneq ($(CIRCUITPY_BLEIO_NATIVE),0)

ifeq ($(BLE_IMPL),libble)
BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a
ifeq ($(BT_IDF_TARGET),esp32c6)
BINARY_BLOBS += esp-idf/components/bt/controller/lib_$(BT_IDF_TARGET)/$(BT_IDF_TARGET)-bt-lib/$(IDF_TARGET)/libble_app.a
else
BINARY_BLOBS += esp-idf/components/bt/controller/lib_$(IDF_TARGET)/$(IDF_TARGET)-bt-lib/libble_app.a
endif
# Shared lib first, else the per-chip one.
BLE_LIB_DIR = esp-idf/components/bt/controller/lib_$(BT_IDF_TARGET)/$(BT_IDF_TARGET)-bt-lib
BINARY_BLOBS += $(firstword $(wildcard $(BLE_LIB_DIR)/libble_app.a) $(BLE_LIB_DIR)/$(IDF_TARGET)/libble_app.a)
endif
endif
ifeq ($(IDF_TARGET),esp32p4)
Expand Down Expand Up @@ -1004,7 +1017,11 @@ MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LIN
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libtfpsacrypto.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/drivers/builtin/libmbed-builtin.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/drivers/everest/libeverest.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/drivers/p256-m/libp256m.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/drivers/p256-m/libp256-m.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/extras/libextras.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/platform/libplatform.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/tf-psa-crypto/utilities/libutilities.a
MBEDTLS_COMPONENTS_LINK_EXPANDED += $(BUILD)/esp-idf/esp-idf/mbedtls/libmbedtls.a

ifeq ($(IDF_TARGET_ARCH),xtensa)
BINARY_BLOBS += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/esp-idf
Submodule esp-idf updated 9433 files
3 changes: 1 addition & 2 deletions ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ CONFIG_LIBC_NEWLIB_NANO_FORMAT=y
#
CONFIG_ULP_COPROC_ENABLED=y
CONFIG_ULP_COPROC_TYPE_FSM=y
CONFIG_ULP_COPROC_TYPE_RISCV=y # Note: enabling both ULPs simultaneously only works due to a modification of adafruit/esp-idf
# (see adafruit/esp-idf/pull/16) until espressif/esp-idf/issues/12999 is fixed.
CONFIG_ULP_COPROC_TYPE_RISCV=y
CONFIG_ULP_COPROC_RESERVE_MEM=8144
# end of Ultra Low Power (ULP) Co-processor

Expand Down
3 changes: 1 addition & 2 deletions ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ CONFIG_LIBC_NEWLIB_NANO_FORMAT=y
#
CONFIG_ULP_COPROC_ENABLED=y
CONFIG_ULP_COPROC_TYPE_FSM=y
CONFIG_ULP_COPROC_TYPE_RISCV=y # Note: enabling both ULPs simultaneously only works due to a modification of adafruit/esp-idf
# (see adafruit/esp-idf/pull/16) until espressif/esp-idf/issues/12999 is fixed.
CONFIG_ULP_COPROC_TYPE_RISCV=y
CONFIG_ULP_COPROC_RESERVE_MEM=8144
# end of Ultra Low Power (ULP) Co-processor

Expand Down
3 changes: 3 additions & 0 deletions ports/espressif/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ CIRCUITPY_PARALLELDISPLAYBUS = 0
# No SDMMC
CIRCUITPY_SDIOIO = 0

# Fit the 2MB firmware partition
CIRCUITPY_ULAB_OPTIMIZE_SIZE ?= 1

# Features
CIRCUITPY_USB_DEVICE = 0
CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1
Expand Down
Loading