Skip to content

Commit d6b284e

Browse files
authored
Merge pull request #8411 from tannewt/update-idf
Update to ESP-IDF 5.0
2 parents e964dd9 + d400002 commit d6b284e

File tree

323 files changed

+2410
-6599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

323 files changed

+2410
-6599
lines changed

.github/actions/deps/external/action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ runs:
3737
- name: Install IDF tools
3838
if: inputs.port == 'espressif'
3939
run: |
40-
echo "Installing ESP-IDF tools"
41-
$IDF_PATH/tools/idf_tools.py --non-interactive install required
42-
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
43-
echo "Installing Python environment and packages"
44-
$IDF_PATH/tools/idf_tools.py --non-interactive install-python-env
40+
$IDF_PATH/install.sh
4541
rm -rf $IDF_TOOLS_PATH/dist
4642
shell: bash
4743
- name: Set environment

.gitmodules

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,16 @@
143143
[submodule "ports/espressif/esp-idf"]
144144
path = ports/espressif/esp-idf
145145
url = https://github.com/adafruit/esp-idf.git
146-
branch = release/v4.4-circuitpython
146+
[submodule "ports/espressif/esp-protocols"]
147+
path = ports/espressif/esp-protocols
148+
url = https://github.com/espressif/esp-protocols.git
149+
[submodule "ports/espressif/esp-iot-solution"]
150+
path = ports/espressif/esp-iot-solution
151+
url = https://github.com/espressif/esp-iot-solution.git
152+
[submodule "ports/espressif/esp-camera"]
153+
path = ports/espressif/esp-camera
154+
url = https://github.com/espressif/esp32-camera.git
155+
branch = circuitpython
147156
[submodule "frozen/Adafruit_CircuitPython_ST7789"]
148157
path = frozen/Adafruit_CircuitPython_ST7789
149158
url = https://github.com/adafruit/Adafruit_CircuitPython_ST7789
@@ -297,10 +306,6 @@
297306
[submodule "frozen/circuitpython_picoed"]
298307
path = frozen/circuitpython_picoed
299308
url = https://github.com/elecfreaks/circuitpython_picoed.git
300-
[submodule "ports/espressif/esp32-camera"]
301-
path = ports/espressif/esp32-camera
302-
url = https://github.com/adafruit/esp32-camera/
303-
branch = circuitpython
304309
[submodule "ports/raspberrypi/lib/cyw43-driver"]
305310
path = ports/raspberrypi/lib/cyw43-driver
306311
url = https://github.com/georgerobotics/cyw43-driver.git
@@ -337,7 +342,7 @@
337342
url = https://github.com/bablokb/circuitpython-pcf85063a
338343
[submodule "frozen/Adafruit_CircuitPython_Wave"]
339344
path = frozen/Adafruit_CircuitPython_Wave
340-
url = http://github.com/adafruit/Adafruit_CircuitPython_Wave.git
345+
url = https://github.com/adafruit/Adafruit_CircuitPython_Wave.git
341346
[submodule "ports/raspberrypi/lib/Pico-PIO-USB"]
342347
path = ports/raspberrypi/lib/Pico-PIO-USB
343348
url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git

ports/espressif/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# The following five lines of boilerplate have to be in your project's
22
# CMakeLists in this exact order for cmake to work correctly
3-
cmake_minimum_required(VERSION 3.13)
3+
cmake_minimum_required(VERSION 3.16)
44

55
set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf)
66

7-
# The component list here determines what options we get in menuconfig and what the ninja file
8-
# can build.
9-
set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls mdns esp_event esp_adc_cal esp_netif esp_wifi lwip ulp wpa_supplicant freertos bt usb esp32-camera esp_lcd)
10-
11-
list(APPEND EXTRA_COMPONENT_DIRS "esp32-camera")
7+
# The component list here determines what options we get in menuconfig and what the ninja file can build.
8+
set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp-camera esp_lcd)
9+
set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns" "esp-camera")
1210

1311
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
1412
project(circuitpython)

ports/espressif/Makefile

Lines changed: 92 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ INC += \
5151
-isystem esp-idf \
5252
-isystem esp-idf/components/app_update/include \
5353
-isystem esp-idf/components/bootloader_support/include \
54+
-isystem esp-idf/components/bootloader_support/bootloader_flash/include \
5455
-isystem esp-idf/components/bt/include/$(IDF_TARGET)/include \
5556
-isystem esp-idf/components/bt/host/nimble/esp-hci/include \
5657
-isystem esp-idf/components/bt/host/nimble/nimble/nimble/controller/include \
@@ -62,28 +63,31 @@ INC += \
6263
-isystem esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include \
6364
-isystem esp-idf/components/bt/host/nimble/port/include \
6465
-isystem esp-idf/components/driver/include \
66+
-isystem esp-idf/components/driver/deprecated \
6567
-isystem esp-idf/components/driver/$(IDF_TARGET)/include \
6668
-isystem esp-idf/components/efuse/include \
6769
-isystem esp-idf/components/efuse/$(IDF_TARGET)/include \
6870
-isystem esp-idf/components/$(IDF_TARGET)/include \
69-
-isystem esp-idf/components/esp_adc_cal/include \
71+
-isystem esp-idf/components/esp_adc/deprecated/include \
72+
-isystem esp-idf/components/esp_app_format/include \
7073
-isystem esp-idf/components/esp_common/include \
7174
-isystem esp-idf/components/esp_event/include \
7275
-isystem esp-idf/components/esp_hw_support/include \
7376
-isystem esp-idf/components/esp_hw_support/include/soc \
74-
-isystem esp-idf/components/esp_ipc/include \
7577
-isystem esp-idf/components/esp_netif/include \
78+
-isystem esp-idf/components/esp_partition/include \
7679
-isystem esp-idf/components/esp_pm/include \
80+
-isystem esp-idf/components/esp_psram/include \
7781
-isystem esp-idf/components/esp_ringbuf/include \
7882
-isystem esp-idf/components/esp_rom/include \
7983
-isystem esp-idf/components/esp_system/include \
8084
-isystem esp-idf/components/esp_timer/include \
8185
-isystem esp-idf/components/esp_wifi/include \
82-
-isystem esp-idf/components/freertos/include \
83-
-isystem esp-idf/components/freertos/include/freertos \
84-
-isystem esp-idf/components/freertos/include/esp_additions \
85-
-isystem esp-idf/components/freertos/include/esp_additions/freertos \
86-
-isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \
86+
-isystem esp-idf/components/freertos/esp_additions/include \
87+
-isystem esp-idf/components/freertos/esp_additions/include/freertos \
88+
-isystem esp-idf/components/freertos/FreeRTOS-Kernel/include \
89+
-isystem esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos \
90+
-isystem esp-idf/components/freertos/FreeRTOS-Kernel/portable/$(IDF_TARGET_ARCH)/include \
8791
-isystem esp-idf/components/hal/include \
8892
-isystem esp-idf/components/hal/$(IDF_TARGET)/include \
8993
-isystem esp-idf/components/hal/platform_port/include \
@@ -100,13 +104,13 @@ INC += \
100104
-isystem esp-idf/components/soc/include \
101105
-isystem esp-idf/components/soc/$(IDF_TARGET)/include \
102106
-isystem esp-idf/components/spi_flash/include \
107+
-isystem esp-idf/components/ulp/ulp_fsm/include \
108+
-isystem esp-idf/components/ulp/ulp_riscv/include \
109+
-isystem esp-idf/components/ulp/ulp_common/include \
110+
-isystem esp-idf/components/ulp/ulp_common/include/$(IDF_TARGET) \
103111
-isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \
104-
-isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include
105-
106-
# See https://github.com/espressif/esp-idf/issues/6906
107-
ifeq ($(IDF_TARGET),esp32c3)
108-
CFLAGS += -include "esp32c3_fix.h"
109-
endif
112+
-isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include \
113+
-isystem esp-protocols/components/mdns/include
110114

111115
CFLAGS += \
112116
-DHAVE_CONFIG_H \
@@ -131,7 +135,7 @@ ifeq ($(DEBUG), 1)
131135
# You may want to enable these flags to make setting breakpoints easier.
132136
# CFLAGS += -fno-inline -fno-ipa-sra
133137
else
134-
CFLAGS += -DNDEBUG -ggdb3
138+
CFLAGS += -DNDEBUG
135139
# RISC-V is larger than xtensa
136140
# Use -Os for RISC-V when it overflows
137141
ifeq ($(IDF_TARGET_ARCH),riscv)
@@ -146,6 +150,11 @@ CFLAGS += $(OPTIMIZATION_FLAGS)
146150

147151
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
148152

153+
# Most current ESPs have nano versions of newlib in ROM so we use them.
154+
ifneq ($(IDF_TARGET),esp32c6)
155+
CFLAGS += --specs=nano.specs
156+
endif
157+
149158
ifeq ($(IDF_TARGET_ARCH),xtensa)
150159
CFLAGS += -mlongcalls
151160
else ifeq ($(IDF_TARGET_ARCH),riscv)
@@ -232,23 +241,16 @@ SRC_C += \
232241
peripherals/timer.c \
233242
peripherals/$(IDF_TARGET)/pins.c
234243

235-
ifneq ($(IDF_TARGET),esp32c3)
236-
SRC_C += \
237-
peripherals/pcnt.c \
238-
peripherals/touch.c
239-
ifeq ($(IDF_TARGET),esp32s2)
240-
SRC_C += \
241-
i2s_lcd_esp32s2_driver.c
242-
endif
243-
endif
244+
SRC_C += $(wildcard common-hal/espidf/*.c)
244245

245246
ifeq ($(IDF_TARGET),esp32c3)
247+
SRC_C += supervisor/usb_serial_jtag.c
248+
else
246249
SRC_C += \
247-
supervisor/usb_serial_jtag.c
250+
peripherals/pcnt.c \
251+
peripherals/touch.c
248252
endif
249253

250-
$(BUILD)/i2s_lcd_esp32s2_driver.o: CFLAGS += -Wno-sign-compare
251-
252254
ifneq ($(CIRCUITPY_USB),0)
253255
SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c
254256
endif
@@ -257,6 +259,17 @@ ifneq ($(CIRCUITPY_BLEIO),0)
257259
SRC_C += common-hal/_bleio/ble_events.c
258260
endif
259261

262+
ifneq ($(CIRCUITPY_PARALLELDISPLAY),0)
263+
ifeq ($(IDF_TARGET),esp32s3)
264+
LCD_SRC = 8080_lcd_$(IDF_TARGET)
265+
else
266+
LCD_SRC = i2s_lcd_$(IDF_TARGET)_driver
267+
endif
268+
SRC_C += esp-iot-solution/components/bus/$(LCD_SRC).c
269+
$(BUILD)/esp-iot-solution/components/bus/$(LCD_SRC).o: CFLAGS += -Wno-sign-compare
270+
CFLAGS += -isystem esp-iot-solution/components/bus/include
271+
endif
272+
260273
ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0)
261274
CFLAGS += -isystem esp-idf/components/esp_lcd/include
262275
CFLAGS += -isystem esp-idf/components/esp_lcd/interface
@@ -267,8 +280,8 @@ SRC_CAMERA := \
267280
$(wildcard common-hal/espcamera/*.c) \
268281
$(wildcard bindings/espcamera/*.c)
269282
SRC_C += $(SRC_CAMERA)
270-
CFLAGS += -isystem esp32-camera/driver/include
271-
CFLAGS += -isystem esp32-camera/conversions/include
283+
CFLAGS += -isystem esp-camera/driver/include
284+
CFLAGS += -isystem esp-camera/conversions/include
272285
endif
273286

274287
ifneq ($(CIRCUITPY_ESPIDF),0)
@@ -290,8 +303,6 @@ SRC_ULP := \
290303
$(wildcard common-hal/espulp/*.c) \
291304
$(wildcard bindings/espulp/*.c)
292305
SRC_C += $(SRC_ULP)
293-
CFLAGS += -isystem esp-idf/components/ulp/include
294-
CFLAGS += -isystem esp-idf/components/ulp/ulp_riscv/include
295306
endif
296307

297308
SRC_COMMON_HAL_EXPANDED = \
@@ -334,32 +345,42 @@ $(BUILD)/esp-idf:
334345

335346
TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults
336347

348+
337349
ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB)
338-
FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults
350+
FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults
339351
else
340352
UF2_BOOTLOADER ?= $(CIRCUITPY_USB)
341353
ifeq ($(UF2_BOOTLOADER), 1)
342-
FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults
354+
FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults
343355
else
344-
FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults
356+
FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults
345357
endif
346358
endif
359+
FLASH_MODE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_MODE).defaults
360+
FLASH_SPEED_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_FREQ).defaults
361+
362+
ifneq ($(CIRCUITPY_ESP_PSRAM_SIZE), 0)
363+
PSRAM_SDKCONFIG = esp-idf-config/sdkconfig-psram.defaults
364+
PSRAM_SIZE_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_SIZE).defaults
365+
PSRAM_MODE_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_MODE).defaults
366+
PSRAM_SPEED_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_FREQ).defaults
367+
endif
347368

348369
ifeq ($(DEBUG), 1)
349370
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults
350371
else
351372
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults
352373
endif
353374

354-
SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig
375+
SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SIZE_SDKCONFIG);$(FLASH_MODE_SDKCONFIG);$(FLASH_SPEED_SDKCONFIG);$(PSRAM_SDKCONFIG);$(PSRAM_SIZE_SDKCONFIG);$(PSRAM_MODE_SDKCONFIG);$(PSRAM_SPEED_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig
355376
ifneq ($(CIRCUITPY_BLEIO),0)
356377
SDKCONFIGS := esp-idf-config/sdkconfig-ble.defaults;$(SDKCONFIGS)
357378
endif
358379
# create the config headers
359380
.PHONY: do-sdkconfig
360381
do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h
361382
QSTR_GLOBAL_REQUIREMENTS += $(BUILD)/esp-idf/config/sdkconfig.h
362-
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf
383+
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig boards/$(BOARD)/mpconfigboard.mk CMakeLists.txt | $(BUILD)/esp-idf
363384
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-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja
364385

365386
# build a lib
@@ -379,8 +400,12 @@ $(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sd
379400
# run menuconfig and then remove standard settings
380401
menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h
381402
$(Q)ninja -C $(BUILD)/esp-idf menuconfig
382-
# Newer versions of the idf will have save-defconfig that will only include non-default values.
383-
# We should use that when available. For now, we sort out everything.
403+
python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG)
404+
405+
update-all-sdkconfigs: $(BUILD)/esp-idf/config/sdkconfig.h
406+
python tools/update_sdkconfig.py --update_all --board=$(BOARD) --debug=$(DEBUG)
407+
408+
update-board-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h
384409
python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG)
385410

386411
BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a
@@ -389,15 +414,22 @@ ifeq ($(IDF_TARGET),esp32)
389414
BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a
390415
endif
391416

392-
ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_ipc esp_netif esp_pm esp_phy esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant
417+
ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant
393418
ifneq ($(CIRCUITPY_BLEIO),0)
394419
ESP_IDF_COMPONENTS_LINK += bt
420+
ifeq ($(IDF_TARGET),esp32)
421+
BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a
422+
else
395423
BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \
396-
esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a
424+
esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a
425+
endif
397426
endif
398427
ifneq ($(CIRCUITPY_ESPULP),0)
399428
ESP_IDF_COMPONENTS_LINK += ulp
400429
endif
430+
ifneq ($(CIRCUITPY_ESP_PSRAM_SIZE),0)
431+
ESP_IDF_COMPONENTS_LINK += esp_psram
432+
endif
401433
ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0)
402434
ESP_IDF_COMPONENTS_LINK += esp_lcd
403435
endif
@@ -413,7 +445,7 @@ ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal
413445
endif
414446

415447
ifneq ($(CIRCUITPY_ESPCAMERA),0)
416-
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp32-camera/libesp32-camera.a
448+
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp-camera/libesp-camera.a
417449
#$(error $(ESP_IDF_COMPONENTS_EXPANDED))
418450
endif
419451

@@ -440,9 +472,26 @@ IDF_CMAKE_TARGETS = \
440472
PARTITION_TABLE_OFFSET = 0x8000
441473
FIRMWARE_OFFSET = 0x10000
442474

443-
ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld
475+
# Map the flash's run mode to flashing mode (only dual is supported by the early bootloaders).
476+
# https://github.com/espressif/esp-idf/blob/82cceabc6e6a0a2d8c40e2249bc59917cc5e577a/components/esptool_py/Kconfig.projbuild#L74-L87
477+
ifeq ($(CIRCUITPY_ESP_FLASH_MODE),dout)
478+
ESPTOOLPY_FLASHMODE = "dout"
479+
endif
480+
ifeq ($(CIRCUITPY_ESP_FLASH_MODE),opi)
481+
ESPTOOLPY_FLASHMODE = "dout"
482+
endif
483+
# Most modes can flash with dio
484+
ESPTOOLPY_FLASHMODE ?= "dio"
485+
486+
# Cap the flash speed to 80m.
487+
# https://github.com/espressif/esp-idf/blob/82cceabc6e6a0a2d8c40e2249bc59917cc5e577a/components/esptool_py/Kconfig.projbuild#L74-L87
488+
ifeq ($(CIRCUITPY_ESP_FLASH_FREQ),120m)
489+
ESPTOOLPY_FLASHFREQ = "80m"
490+
else
491+
ESPTOOLPY_FLASHFREQ = $(CIRCUITPY_ESP_FLASH_FREQ)
492+
endif
444493

445-
FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE)
494+
FLASH_FLAGS = --flash_mode $(ESPTOOLPY_FLASHMODE) --flash_freq $(ESPTOOLPY_FLASHFREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE)
446495

447496
ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset --baud 921600
448497

@@ -460,7 +509,7 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
460509

461510
$(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp $(IDF_CMAKE_TARGETS)
462511
$(STEPECHO) "LINK $@"
463-
$(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(BUILD)/esp-idf/esp-idf/newlib/libnewlib.a -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -Wl,--start-group $(LIBS) -Wl,--end-group $(BUILD)/esp-idf/esp-idf/pthread/libpthread.a -u __cxx_fatal_exception
512+
$(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(LIBS) -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -u __cxx_fatal_exception
464513

465514
$(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_info.py
466515
$(STEPECHO) "Create $@"

ports/espressif/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Support Status:
99
.. csv-table::
1010
:header: SoC, Status
1111

12-
ESP, "beta"
12+
ESP32, "beta"
1313
ESP32-C3, "beta"
1414
ESP32-S2, "stable"
1515
ESP32-S3, "beta"

ports/espressif/bindings/espidf/__init__.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "py/mpconfig.h"
3232
#include "py/obj.h"
3333

34+
#include "common-hal/espidf/__init__.h"
35+
3436
extern const mp_obj_type_t mp_type_espidf_IDFError;
3537
extern const mp_obj_type_t mp_type_espidf_MemoryError;
3638

ports/espressif/bindings/espnow/Peer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ typedef struct {
3434
esp_now_peer_info_t peer_info;
3535
} espnow_peer_obj_t;
3636

37-
const mp_obj_type_t espnow_peer_type;
37+
extern const mp_obj_type_t espnow_peer_type;

0 commit comments

Comments
 (0)