component.mk 770 B

1234567891011121314151617181920212223
  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. LINKER_SCRIPTS := \
  8. esp32.bootloader.ld \
  9. $(IDF_PATH)/components/esp32/ld/esp32.rom.ld \
  10. esp32.bootloader.rom.ld
  11. COMPONENT_ADD_LDFLAGS := -L $(COMPONENT_PATH) -lmain $(addprefix -T ,$(LINKER_SCRIPTS))
  12. COMPONENT_ADD_LINKER_DEPS := $(LINKER_SCRIPTS)
  13. ifdef IS_BOOTLOADER_BUILD
  14. # following lines are a workaround to link librtc into the
  15. # bootloader, until clock setting code is in a source-based esp-idf
  16. # component. See also rtc_printf() in bootloader_start.c
  17. COMPONENT_ADD_LDFLAGS += -L $(IDF_PATH)/components/esp32/lib/ -lrtc
  18. COMPONENT_EXTRA_INCLUDES += $(IDF_PATH)/components/esp32/
  19. endif