2016-08-17 23:08:22 +08:00
|
|
|
#
|
2016-11-10 13:20:55 +11:00
|
|
|
# Main bootloader Makefile.
|
2016-08-17 23:08:22 +08:00
|
|
|
#
|
2016-11-10 13:20:55 +11:00
|
|
|
# This is basically the same as a component makefile, but in the case of the bootloader
|
|
|
|
# we pull in bootloader-specific linker arguments.
|
2016-08-17 23:08:22 +08:00
|
|
|
#
|
|
|
|
|
2017-01-09 03:08:24 +08:00
|
|
|
LINKER_SCRIPTS := \
|
2019-04-03 13:05:35 +08:00
|
|
|
$(COMPONENT_PATH)/ld/$(IDF_TARGET)/bootloader.ld \
|
|
|
|
$(COMPONENT_PATH)/ld/$(IDF_TARGET)/bootloader.rom.ld \
|
2019-04-04 15:20:24 +08:00
|
|
|
$(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.ld \
|
2019-03-10 22:12:34 +08:00
|
|
|
$(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.newlib-funcs.ld \
|
2019-04-04 15:20:24 +08:00
|
|
|
$(IDF_PATH)/components/$(IDF_TARGET)/ld/$(IDF_TARGET).peripherals.ld
|
2016-08-17 23:08:22 +08:00
|
|
|
|
2019-04-03 13:05:35 +08:00
|
|
|
# SPI driver patch for ROM is only needed in ESP32
|
|
|
|
ifdef CONFIG_IDF_TARGET_ESP32
|
|
|
|
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
|
|
|
|
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.spiflash.ld
|
|
|
|
endif
|
2020-02-25 01:21:41 +05:30
|
|
|
ifdef CONFIG_ESP32_REV_MIN_3
|
|
|
|
LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.eco3.ld
|
|
|
|
endif
|
2017-03-09 10:29:00 +03:00
|
|
|
endif
|
|
|
|
|
2017-06-23 14:08:01 +10:00
|
|
|
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH) $(addprefix -T ,$(LINKER_SCRIPTS))
|
2016-12-12 15:54:30 +11:00
|
|
|
|
|
|
|
COMPONENT_ADD_LINKER_DEPS := $(LINKER_SCRIPTS)
|