@@ -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/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
111115CFLAGS += \
112116 -DHAVE_CONFIG_H \
@@ -232,23 +236,16 @@ SRC_C += \
232236 peripherals/timer.c \
233237 peripherals/$(IDF_TARGET ) /pins.c
234238
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
239+ SRC_C += $(wildcard common-hal/espidf/* .c)
244240
245241ifeq ($(IDF_TARGET ) ,esp32c3)
242+ SRC_C += supervisor/usb_serial_jtag.c
243+ else
246244SRC_C += \
247- supervisor/usb_serial_jtag.c
245+ peripherals/pcnt.c \
246+ peripherals/touch.c
248247endif
249248
250- $(BUILD ) /i2s_lcd_esp32s2_driver.o : CFLAGS += -Wno-sign-compare
251-
252249ifneq ($(CIRCUITPY_USB ) ,0)
253250SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c
254251endif
@@ -257,6 +254,17 @@ ifneq ($(CIRCUITPY_BLEIO),0)
257254SRC_C += common-hal/_bleio/ble_events.c
258255endif
259256
257+ ifneq ($(CIRCUITPY_PARALLELDISPLAY ) ,0)
258+ ifeq ($(IDF_TARGET ) ,esp32s3)
259+ LCD_SRC = 8080_lcd_$(IDF_TARGET )
260+ else
261+ LCD_SRC = i2s_lcd_$(IDF_TARGET ) _driver
262+ endif
263+ SRC_C += esp-iot-solution/components/bus/$(LCD_SRC ) .c
264+ $(BUILD ) /esp-iot-solution/components/bus/$(LCD_SRC ) .o : CFLAGS += -Wno-sign-compare
265+ CFLAGS += -isystem esp-iot-solution/components/bus/include
266+ endif
267+
260268ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER ) ,0)
261269CFLAGS += -isystem esp-idf/components/esp_lcd/include
262270CFLAGS += -isystem esp-idf/components/esp_lcd/interface
@@ -290,8 +298,6 @@ SRC_ULP := \
290298 $(wildcard common-hal/espulp/* .c) \
291299 $(wildcard bindings/espulp/* .c)
292300SRC_C += $(SRC_ULP )
293- CFLAGS += -isystem esp-idf/components/ulp/include
294- CFLAGS += -isystem esp-idf/components/ulp/ulp_riscv/include
295301endif
296302
297303SRC_COMMON_HAL_EXPANDED = \
@@ -389,7 +395,7 @@ ifeq ($(IDF_TARGET),esp32)
389395BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET ) /librtc.a
390396endif
391397
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
398+ 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_psram 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
393399ifneq ($(CIRCUITPY_BLEIO ) ,0)
394400 ESP_IDF_COMPONENTS_LINK += bt
395401 BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \
@@ -440,8 +446,6 @@ IDF_CMAKE_TARGETS = \
440446PARTITION_TABLE_OFFSET = 0x8000
441447FIRMWARE_OFFSET = 0x10000
442448
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
444-
445449FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE ) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE )
446450
447451ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset --baud 921600
@@ -460,7 +464,7 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
460464
461465$(BUILD ) /firmware.elf : $(OBJ ) | esp-idf-stamp $(IDF_CMAKE_TARGETS )
462466 $(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
467+ $(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
464468
465469$(BUILD ) /circuitpython-firmware.bin : $(BUILD ) /firmware.elf | tools/build_memory_info.py
466470 $(STEPECHO ) " Create $@ "
0 commit comments