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
|
|
|
|
2023-07-20 21:57:32 -04:00
|
|
|
COMPONENT_OBJEXCLUDE := patches/esp_rom_cache_writeback_esp32s3.o
|
|
|
|
|
2023-07-03 04:08:59 -04:00
|
|
|
COMPONENT_OBJEXCLUDE += patches/esp_rom_mmap.o
|
|
|
|
|
2021-06-10 23:56:58 -04:00
|
|
|
ifdef IS_BOOTLOADER_BUILD
|
2023-07-20 21:57:32 -04:00
|
|
|
COMPONENT_OBJEXCLUDE += patches/esp_rom_longjmp.o
|
2021-06-10 23:56:58 -04:00
|
|
|
endif
|
|
|
|
|
2023-07-03 04:08:41 -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 \
|
2021-06-10 23:56:58 -04:00
|
|
|
$(addprefix -T ,$(LINKER_SCRIPTS))
|
|
|
|
ifndef IS_BOOTLOADER_BUILD
|
|
|
|
COMPONENT_ADD_LDFLAGS += -l$(COMPONENT_NAME) -Wl,--wrap=longjmp
|
|
|
|
endif
|
2019-03-14 05:29:32 -04:00
|
|
|
|
|
|
|
COMPONENT_ADD_LINKER_DEPS += $(addprefix esp32/ld/, $(LINKER_SCRIPTS))
|