component.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. esp32.rom.api.ld
  9. #SPI-RAM incompatible functions can be used in when the SPI RAM
  10. #workaround is not enabled.
  11. ifndef CONFIG_SPIRAM_CACHE_WORKAROUND
  12. LINKER_SCRIPTS += esp32.rom.newlib-funcs.ld
  13. ifdef CONFIG_ESP32_REV_MIN_3
  14. LINKER_SCRIPTS += esp32.rom.eco3.ld
  15. endif
  16. # Include in newlib nano from ROM only if SPIRAM cache workaround is disabled
  17. ifdef CONFIG_NEWLIB_NANO_FORMAT
  18. LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
  19. endif
  20. endif #CONFIG_SPIRAM_CACHE_WORKAROUND
  21. ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
  22. LINKER_SCRIPTS += esp32.rom.spiflash.ld
  23. endif
  24. ifndef CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS
  25. # If SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS option is defined
  26. # then all time functions from the ROM memory will not be linked.
  27. # Instead, those functions can be used from the toolchain by ESP-IDF.
  28. LINKER_SCRIPTS += esp32.rom.newlib-time.ld
  29. endif
  30. COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/esp32/ld \
  31. $(addprefix -T ,$(LINKER_SCRIPTS)) \
  32. COMPONENT_ADD_LINKER_DEPS += $(addprefix esp32/ld/, $(LINKER_SCRIPTS))