@@ -64,6 +64,7 @@ INC += \
6464 -isystem esp-idf/components/esp_driver_i2s/include \
6565 -isystem esp-idf/components/esp_driver_$(IDF_TARGET ) /include \
6666 -isystem esp-idf/components/esp_driver_ledc/include \
67+ -isystem esp-idf/components/esp_driver_parlio/include \
6768 -isystem esp-idf/components/esp_driver_pcnt/include \
6869 -isystem esp-idf/components/esp_driver_rmt/include \
6970 -isystem esp-idf/components/esp_driver_sdio/include \
@@ -149,20 +150,26 @@ CFLAGS += -DSTACK_CANARY_VALUE=0xa5a5a5a5
149150REGISTRATION_FUNCTIONS = \
150151 -u ld_include_highint_hdl \
151152 -u __cxx_fatal_exception \
153+ -u __cxx_init_dummy \
154+ -u __cxa_guard_dummy \
152155 -u esp_app_desc \
153156 -u esp_timer_init_include_func \
154157 -u uart_vfs_include_dev_init \
155158 -u esp_vfs_include_console_register \
156159 -u __ubsan_include \
157160 -u esp_system_include_startup_funcs \
158161 -u esp_efuse_startup_include_func \
159- -u newlib_include_heap_impl \
160- -u newlib_include_syscalls_impl \
161- -u newlib_include_pthread_impl \
162- -u newlib_include_assert_impl \
163- -u newlib_include_init_funcs \
162+ -u esp_libc_include_heap_impl \
163+ -u esp_libc_include_reent_syscalls_impl \
164+ -u esp_libc_include_syscalls_impl \
165+ -u esp_libc_include_pthread_impl \
166+ -u esp_libc_include_assert_impl \
167+ -u esp_libc_include_getentropy_impl \
168+ -u esp_libc_include_init_funcs \
169+ -u esp_libc_init_funcs \
164170 -u include_esp_phy_override \
165- -u vfs_include_syscalls_impl
171+ -u vfs_include_syscalls_impl \
172+ -u esp_vfs_include_nullfs_register
166173
167174
168175# Debugging/Optimization
@@ -222,7 +229,6 @@ else ifeq ($(IDF_TARGET_ARCH),riscv)
222229 -Trom.api.ld
223230endif
224231
225- $(BUILD ) /lib/tlsf/tlsf.o : CFLAGS += -Wno-cast-align
226232
227233LDFLAGS += $(CFLAGS ) -Wl,-nostdlib -Wl,-Map=$@ .map -Wl,-cref -Wl,--undefined=uxTopUsedPriority
228234
@@ -244,7 +250,9 @@ LDFLAGS += \
244250ifeq ($(IDF_TARGET ) ,esp32)
245251LDFLAGS += \
246252 -Tesp32.rom.newlib-data.ld \
247- -Tesp32.rom.newlib-funcs.ld \
253+ -Tesp32.rom.syscalls.ld \
254+ -Tesp32.rom.libc-funcs.ld \
255+ -Tesp32.rom.newlib-reent-funcs.ld \
248256 -Tesp32.rom.spiflash_legacy.ld
249257
250258CHIP_COMPONENTS = \
@@ -280,7 +288,9 @@ LDFLAGS += \
280288 -Tesp32c6.rom.phy.ld \
281289 -Tesp32c6.rom.pp.ld \
282290 -Tesp32c6.rom.net80211.ld \
291+ -Tesp32c6.rom.libc.ld \
283292 -Tesp32c6.rom.newlib.ld \
293+ -Tesp32c6.rom.spiflash.ld \
284294 -Tesp32c6.rom.coexist.ld \
285295 -Tesp32c6.rom.heap.ld \
286296 -Tesp32c6.rom.systimer.ld \
@@ -312,8 +322,9 @@ CHIP_COMPONENTS = \
312322
313323else ifeq ($(IDF_TARGET),esp32s2)
314324LDFLAGS += \
325+ -Tesp32s2.rom.libc-funcs.ld \
315326 -Tesp32s2.rom.newlib-data.ld \
316- -Tesp32s2.rom.newlib-funcs.ld \
327+ -Tesp32s2.rom.newlib-reent- funcs.ld \
317328 -Tesp32s2.rom.spiflash_legacy.ld
318329
319330CHIP_COMPONENTS = \
@@ -782,7 +793,7 @@ endif
782793
783794IDF_CMAKE_TARGETS = \
784795 bootloader/bootloader.bin \
785- esp-idf/esp_system/ __ldgen_output_sections.ld \
796+ __ldgen_output_sections.ld \
786797 $(foreach component, $(ESP_IDF_COMPONENTS_LINK ) , esp-idf/$(component ) /lib$(component ) .a)
787798
788799PARTITION_TABLE_OFFSET = 0x8000
0 commit comments