2021-05-18 00:54:38 -04:00
|
|
|
COMPONENT_ADD_INCLUDEDIRS := include esp32 include/esp32
|
2020-04-15 04:46:10 -04:00
|
|
|
COMPONENT_SRCDIRS := patches .
|
2020-07-13 09:33:23 -04:00
|
|
|
|
2019-03-14 05:29:32 -04:00
|
|
|
#Linker scripts used to link the final application.
|
|
|
|
#Warning: These linker scripts are only used when the normal app is compiled; the bootloader
|
|
|
|
#specifies its own scripts.
|
2019-03-10 10:12:34 -04:00
|
|
|
LINKER_SCRIPTS += esp32.rom.ld \
|
|
|
|
esp32.rom.libgcc.ld \
|
|
|
|
esp32.rom.syscalls.ld \
|
2020-06-19 03:08:38 -04:00
|
|
|
esp32.rom.newlib-data.ld \
|
|
|
|
esp32.rom.api.ld
|
2019-03-14 05:29:32 -04:00
|
|
|
|
|
|
|
#SPI-RAM incompatible functions can be used in when the SPI RAM
|
|
|
|
#workaround is not enabled.
|
|
|
|
ifndef CONFIG_SPIRAM_CACHE_WORKAROUND
|
2019-03-10 10:12:34 -04:00
|
|
|
LINKER_SCRIPTS += esp32.rom.newlib-funcs.ld
|
2019-03-14 05:29:32 -04:00
|
|
|
|
2023-02-22 12:45:21 -05:00
|
|
|
ifeq ($(shell expr $(CONFIG_ESP32_REV_MIN_FULL) \>= 300), 1)
|
2020-02-24 14:51:41 -05:00
|
|
|
LINKER_SCRIPTS += esp32.rom.eco3.ld
|
|
|
|
endif
|
|
|
|
|
2020-02-07 05:35:37 -05:00
|
|
|
# Include in newlib nano from ROM only if SPIRAM cache workaround is disabled
|
2019-03-14 05:29:32 -04:00
|
|
|
ifdef CONFIG_NEWLIB_NANO_FORMAT
|
2019-03-10 10:12:34 -04:00
|
|
|
LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
|
2019-03-14 05:29:32 -04:00
|
|
|
endif
|
|
|
|
|
2020-03-17 05:02:24 -04:00
|
|
|
ifndef CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS
|
|
|
|
# If SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS option is defined
|
|
|
|
# then all time functions from the ROM memory will not be linked.
|
|
|
|
# Instead, those functions can be used from the toolchain by ESP-IDF.
|
|
|
|
LINKER_SCRIPTS += esp32.rom.newlib-time.ld
|
|
|
|
endif
|
|
|
|
|
2023-03-30 04:19:38 -04:00
|
|
|
endif #CONFIG_SPIRAM_CACHE_WORKAROUND
|
|
|
|
|
|
|
|
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
|
|
|
|
LINKER_SCRIPTS += esp32.rom.spiflash.ld
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2019-03-14 05:29:32 -04:00
|
|
|
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/esp32/ld \
|
|
|
|
$(addprefix -T ,$(LINKER_SCRIPTS)) \
|
2021-04-08 00:16:17 -04:00
|
|
|
-l$(COMPONENT_NAME) -Wl,--wrap=longjmp \
|
2019-03-14 05:29:32 -04:00
|
|
|
|
|
|
|
COMPONENT_ADD_LINKER_DEPS += $(addprefix esp32/ld/, $(LINKER_SCRIPTS))
|