component.mk 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #Linker scripts used to link the final application.
  2. #Warning: These linker scripts are only used when the normal app is compiled; the bootloader
  3. #specifies its own scripts.
  4. LINKER_SCRIPTS += esp32.rom.ld \
  5. esp32.rom.libgcc.ld \
  6. esp32.rom.syscalls.ld \
  7. esp32.rom.newlib-data.ld
  8. #SPI-RAM incompatible functions can be used in when the SPI RAM
  9. #workaround is not enabled.
  10. ifndef CONFIG_SPIRAM_CACHE_WORKAROUND
  11. LINKER_SCRIPTS += esp32.rom.newlib-funcs.ld
  12. endif
  13. ifdef CONFIG_NEWLIB_NANO_FORMAT
  14. LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
  15. endif
  16. ifneq ($(GCC_NOT_5_2_0), 1)
  17. LINKER_SCRIPTS += esp32.rom.newlib-locale.ld
  18. endif
  19. ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
  20. LINKER_SCRIPTS += esp32.rom.spiflash.ld
  21. endif
  22. COMPONENT_SRCDIRS := patches
  23. COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/esp32/ld \
  24. $(addprefix -T ,$(LINKER_SCRIPTS)) \
  25. -l$(COMPONENT_NAME) -Wl,--wrap=longjmp \
  26. COMPONENT_ADD_LINKER_DEPS += $(addprefix esp32/ld/, $(LINKER_SCRIPTS))