component.mk 1.3 KB

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