98c179ed47
xtensa-esp32-elf-gcc selects among the multilib configurations based on the presence of -mfix-esp32-psram-cache-issue flag. Pass this flag in LDFLAGS so that the correct libraries are linked. Reported in https://github.com/espressif/esp-idf/issues/3624
17 lines
755 B
Makefile
17 lines
755 B
Makefile
# Enable psram cache bug workaround in compiler if selected
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND
|
|
CFLAGS+=-mfix-esp32-psram-cache-issue
|
|
CXXFLAGS+=-mfix-esp32-psram-cache-issue
|
|
LDFLAGS+=-mfix-esp32-psram-cache-issue
|
|
endif
|
|
|
|
# Enable dynamic esp_timer overflow value if building unit tests
|
|
ifneq ("$(filter esp32,$(TEST_COMPONENTS_LIST))","")
|
|
CPPFLAGS += -DESP_TIMER_DYNAMIC_OVERFLOW_VAL
|
|
endif
|
|
ESP32_LINKER_SCRIPT_TEMPLATE := $(COMPONENT_PATH)/ld/esp32.project.ld.in
|
|
ESP32_LINKER_SCRIPT_OUTPUT_DIR := $(abspath $(BUILD_DIR_BASE)/esp32)
|
|
|
|
# Target to generate linker script generator from fragments presented by each of
|
|
# the components
|
|
$(eval $(call ldgen_process_template, $(ESP32_LINKER_SCRIPT_TEMPLATE), $(ESP32_LINKER_SCRIPT_OUTPUT_DIR)/esp32.project.ld))
|