esp32: move system libs

This commit is contained in:
Renz Bagaporo
2021-03-10 19:44:58 +08:00
parent bbc599493e
commit a202a604d8
11 changed files with 5 additions and 43 deletions

View File

@@ -26,11 +26,9 @@ else()
# esp_timer is added here because cpu_start.c uses esp_timer # esp_timer is added here because cpu_start.c uses esp_timer
set(priv_requires app_trace app_update bootloader_support esp_system log mbedtls nvs_flash pthread set(priv_requires app_trace app_update bootloader_support esp_system log mbedtls nvs_flash pthread
spi_flash vfs espcoredump esp_common perfmon esp_timer esp_ipc esp_pm) spi_flash vfs espcoredump esp_common perfmon esp_timer esp_ipc esp_pm)
set(fragments linker.lf)
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}" INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS "${fragments}"
REQUIRES "${requires}" REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}" PRIV_REQUIRES "${priv_requires}"
REQUIRED_IDF_TARGETS esp32) REQUIRED_IDF_TARGETS esp32)

View File

@@ -17,8 +17,6 @@ COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld \
-u ld_include_panic_highint_hdl \ -u ld_include_panic_highint_hdl \
$(addprefix -T ,$(LINKER_SCRIPTS)) \ $(addprefix -T ,$(LINKER_SCRIPTS)) \
COMPONENT_ADD_LDFRAGMENTS += linker.lf
# final linking of project ELF depends on all binary libraries, and # final linking of project ELF depends on all binary libraries, and
# all linker scripts (except esp32_out.ld, as this is code generated here.) # all linker scripts (except esp32_out.ld, as this is code generated here.)
COMPONENT_ADD_LINKER_DEPS := $(addprefix ld/, $(filter-out $(COMPONENT_BUILD_DIR)/esp32.project.ld, $(LINKER_SCRIPTS))) \ COMPONENT_ADD_LINKER_DEPS := $(addprefix ld/, $(filter-out $(COMPONENT_BUILD_DIR)/esp32.project.ld, $(LINKER_SCRIPTS))) \

View File

@@ -27,11 +27,8 @@ else()
app_trace app_update bootloader_support log mbedtls nvs_flash app_trace app_update bootloader_support log mbedtls nvs_flash
pthread spi_flash vfs espcoredump esp_common esp_timer) pthread spi_flash vfs espcoredump esp_common esp_timer)
set(fragments linker.lf)
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}" INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS "${fragments}"
REQUIRES "${requires}" REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}" PRIV_REQUIRES "${priv_requires}"
REQUIRED_IDF_TARGETS esp32c3) REQUIRED_IDF_TARGETS esp32c3)

View File

@@ -1,9 +0,0 @@
[mapping:gcc]
archive: libgcc.a
entries:
lib2funcs (noflash_text)
[mapping:gcov]
archive: libgcov.a
entries:
* (noflash)

View File

@@ -29,11 +29,8 @@ else()
app_trace app_update bootloader_support esp_system log mbedtls nvs_flash app_trace app_update bootloader_support esp_system log mbedtls nvs_flash
pthread spi_flash vfs espcoredump esp_common esp_timer) pthread spi_flash vfs espcoredump esp_common esp_timer)
set(fragments linker.lf)
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}" INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS "${fragments}"
REQUIRES "${requires}" REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}" PRIV_REQUIRES "${priv_requires}"
REQUIRED_IDF_TARGETS esp32s2) REQUIRED_IDF_TARGETS esp32s2)

View File

@@ -1,9 +0,0 @@
[mapping:gcc]
archive: libgcc.a
entries:
lib2funcs (noflash_text)
[mapping:gcov]
archive: libgcov.a
entries:
* (noflash)

View File

@@ -26,11 +26,9 @@ else()
# esp_timer is added here because cpu_start.c uses esp_timer # esp_timer is added here because cpu_start.c uses esp_timer
set(priv_requires app_trace app_update bootloader_support log mbedtls nvs_flash pthread set(priv_requires app_trace app_update bootloader_support log mbedtls nvs_flash pthread
spi_flash vfs espcoredump esp_common perfmon esp_timer esp_ipc) spi_flash vfs espcoredump esp_common perfmon esp_timer esp_ipc)
set(fragments linker.lf)
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}" INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS "${fragments}"
REQUIRES "${requires}" REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}" PRIV_REQUIRES "${priv_requires}"
REQUIRED_IDF_TARGETS esp32s3) REQUIRED_IDF_TARGETS esp32s3)

View File

@@ -1,9 +0,0 @@
[mapping:gcc]
archive: libgcc.a
entries:
lib2funcs (noflash_text)
[mapping:gcov]
archive: libgcov.a
entries:
* (noflash)

View File

@@ -20,10 +20,10 @@ set(srcs
set(include_dirs platform_include) set(include_dirs platform_include)
if(CONFIG_SPIRAM_CACHE_WORKAROUND) if(CONFIG_SPIRAM_CACHE_WORKAROUND)
set(ldfragments esp32-spiram-rom-functions-c.lf) set(ldfragments "esp32-spiram-rom-functions-c.lf")
endif() endif()
list(APPEND ldfragments newlib.lf) list(APPEND ldfragments "newlib.lf" "system_libs.lf")
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}" INCLUDE_DIRS "${include_dirs}"

View File

@@ -20,6 +20,6 @@ COMPONENT_SRCDIRS := . port
COMPONENT_ADD_LDFLAGS += -u newlib_include_heap_impl COMPONENT_ADD_LDFLAGS += -u newlib_include_heap_impl
COMPONENT_ADD_LDFLAGS += -u newlib_include_syscalls_impl COMPONENT_ADD_LDFLAGS += -u newlib_include_syscalls_impl
COMPONENT_ADD_LDFRAGMENTS += newlib.lf COMPONENT_ADD_LDFRAGMENTS += newlib.lf system_libs.lf
heap.o: CFLAGS += -fno-builtin heap.o: CFLAGS += -fno-builtin

View File

@@ -2,6 +2,7 @@
archive: libgcc.a archive: libgcc.a
entries: entries:
lib2funcs (noflash_text) lib2funcs (noflash_text)
if IDF_TARGET_ESP32 = n:
_divsf3 (noflash) _divsf3 (noflash)
[mapping:gcov] [mapping:gcov]