1# 2# Main bootloader Makefile. 3# 4# This is basically the same as a component makefile, but in the case of the bootloader 5# we pull in bootloader-specific linker arguments. 6# 7 8LINKER_SCRIPTS := \ 9 $(COMPONENT_PATH)/ld/$(IDF_TARGET)/bootloader.ld \ 10 $(COMPONENT_PATH)/ld/$(IDF_TARGET)/bootloader.rom.ld \ 11 $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.ld \ 12 $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.newlib-funcs.ld \ 13 $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.api.ld 14 15# SPI driver patch for ROM is only needed in ESP32 16ifdef CONFIG_IDF_TARGET_ESP32 17 ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 18 LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.spiflash.ld 19 endif 20 ifdef CONFIG_ESP32_REV_MIN_3 21 LINKER_SCRIPTS += $(IDF_PATH)/components/esp_rom/$(IDF_TARGET)/ld/$(IDF_TARGET).rom.eco3.ld 22 endif 23endif 24 25COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH) $(addprefix -T ,$(LINKER_SCRIPTS)) 26 27COMPONENT_ADD_LINKER_DEPS := $(LINKER_SCRIPTS) 28