@@ -83,6 +83,9 @@ INC += \
83
83
-isystem esp-idf/components/esp_psram/include \
84
84
-isystem esp-idf/components/esp_ringbuf/include \
85
85
-isystem esp-idf/components/esp_rom/include \
86
+ -isystem esp-idf/components/esp_rom/$(IDF_TARGET ) /include \
87
+ -isystem esp-idf/components/esp_rom/$(IDF_TARGET ) /include/$(IDF_TARGET ) \
88
+ -isystem esp-idf/components/esp_security/include \
86
89
-isystem esp-idf/components/esp_system/include \
87
90
-isystem esp-idf/components/esp_timer/include \
88
91
-isystem esp-idf/components/esp_wifi/include \
@@ -115,6 +118,7 @@ INC += \
115
118
-isystem esp-idf/components/sdmmc/include \
116
119
-isystem esp-idf/components/soc/include \
117
120
-isystem esp-idf/components/soc/$(IDF_TARGET ) /include \
121
+ -isystem esp-idf/components/soc/$(IDF_TARGET ) /register \
118
122
-isystem esp-idf/components/spi_flash/include \
119
123
-isystem esp-idf/components/usb/include \
120
124
-isystem esp-idf/components/ulp/ulp_fsm/include \
@@ -171,12 +175,12 @@ ifeq ($(DEBUG), 1)
171
175
OPTIMIZATION_FLAGS ?= -Og
172
176
CFLAGS += -DDEBUG
173
177
endif
174
- # You may want to enable these flags to make setting breakpoints easier.
175
- # CFLAGS += -fno-inline -fno-ipa-sra
178
+ # You may want to enable these flags to make setting breakpoints easier.
179
+ # CFLAGS += -fno-inline -fno-ipa-sra
176
180
else
177
181
CFLAGS += -DNDEBUG
178
- # RISC-V is larger than xtensa
179
- # Use -Os for RISC-V when it overflows
182
+ # RISC-V is larger than xtensa
183
+ # Use -Os for RISC-V when it overflows
180
184
ifeq ($(IDF_TARGET_ARCH),riscv)
181
185
OPTIMIZATION_FLAGS ?= -Os
182
186
else
@@ -238,7 +242,6 @@ ifeq ($(IDF_TARGET),esp32)
238
242
LDFLAGS += \
239
243
-Tesp32.rom.newlib-data.ld \
240
244
-Tesp32.rom.newlib-funcs.ld \
241
- -Tesp32.rom.newlib-time.ld \
242
245
-Tesp32.rom.spiflash_legacy.ld
243
246
244
247
CHIP_COMPONENTS = \
@@ -261,7 +264,6 @@ CHIP_COMPONENTS = \
261
264
else ifeq ($(IDF_TARGET),esp32c3)
262
265
LDFLAGS += \
263
266
-Tesp32c3.rom.newlib.ld \
264
- -Tesp32c3.rom.newlib-time.ld \
265
267
-Tesp32c3.rom.version.ld \
266
268
-Tesp32c3.rom.eco3.ld \
267
269
-Tesp32c3.rom.bt_funcs.ld
@@ -308,7 +310,6 @@ else ifeq ($(IDF_TARGET),esp32s2)
308
310
LDFLAGS += \
309
311
-Tesp32s2.rom.newlib-data.ld \
310
312
-Tesp32s2.rom.newlib-funcs.ld \
311
- -Tesp32s2.rom.newlib-time.ld \
312
313
-Tesp32s2.rom.spiflash_legacy.ld
313
314
314
315
CHIP_COMPONENTS = \
@@ -392,7 +393,7 @@ SRC_C += \
392
393
peripherals/$(IDF_TARGET ) /pins.c
393
394
394
395
ifeq ($(CIRCUITPY_SSL ) ,1)
395
- SRC_C += lib/mbedtls_config /crt_bundle.c
396
+ SRC_C += common-hal/ssl /crt_bundle.c
396
397
endif
397
398
398
399
SRC_C += $(wildcard common-hal/espidf/* .c)
@@ -603,7 +604,7 @@ endif
603
604
604
605
ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH ) $(CHIP_COMPONENTS ) app_update bootloader_support driver 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_hw_support esp_mm esp_partition esp_pm esp_ringbuf esp_rom esp_system esp_timer freertos hal heap log newlib nvs_flash pthread soc spi_flash vfs esp_vfs_console
605
606
ifneq ($(CIRCUITPY_WIFI ) ,0)
606
- ESP_IDF_COMPONENTS_LINK += esp_coex esp_netif esp-tls esp_wifi lwip mbedtls mdns wpa_supplicant esp_phy
607
+ ESP_IDF_COMPONENTS_LINK += esp_coex esp_netif esp_security esp-tls esp_wifi lwip mbedtls mdns wpa_supplicant esp_phy
607
608
endif
608
609
ifneq ($(CIRCUITPY_BLEIO_NATIVE ) ,0)
609
610
BLE_IMPL_esp32 := esp32
@@ -614,10 +615,10 @@ ifneq ($(CIRCUITPY_BLEIO_NATIVE),0)
614
615
BLE_IMPL_esp32h2 := libble
615
616
BLE_IMPL = $(BLE_IMPL_$(IDF_TARGET))
616
617
617
- ESP_IDF_COMPONENTS_LINK += bt esp_phy
618
+ ESP_IDF_COMPONENTS_LINK += bt esp_phy esp_security
618
619
ifeq ($(BLE_IMPL),esp32)
619
- # BLE will hang the ESP32 and trigger an interrupt watchdog without this undefined symbol at
620
- # link because a weak version of the interrupt that BLE uses will be linked incorrectly.
620
+ # BLE will hang the ESP32 and trigger an interrupt watchdog without this undefined symbol at
621
+ # link because a weak version of the interrupt that BLE uses will be linked incorrectly.
621
622
REGISTRATION_FUNCTIONS += -u ld_include_hli_vectors_bt
622
623
BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a
623
624
endif
@@ -636,6 +637,9 @@ ifneq ($(CIRCUITPY_BLEIO_NATIVE),0)
636
637
endif
637
638
endif
638
639
endif
640
+ ifeq ($(IDF_TARGET ) ,esp32p4)
641
+ ESP_IDF_COMPONENTS_LINK += esp_security
642
+ endif
639
643
ifneq ($(CIRCUITPY_ESPULP ) ,0)
640
644
ESP_IDF_COMPONENTS_LINK += ulp
641
645
endif
0 commit comments