2017-07-20 04:26:35 -04:00
|
|
|
# Enable psram cache bug workaround in compiler if selected
|
2019-12-18 01:36:58 -05:00
|
|
|
|
2017-07-20 04:26:35 -04:00
|
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND
|
2019-12-18 01:36:58 -05:00
|
|
|
SPIRAM_CACHE_WORKAROUND_FLAGS = -mfix-esp32-psram-cache-issue
|
|
|
|
|
|
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
|
|
|
|
SPIRAM_CACHE_WORKAROUND_FLAGS += -mfix-esp32-psram-cache-strategy=dupldst
|
|
|
|
endif
|
|
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW
|
|
|
|
SPIRAM_CACHE_WORKAROUND_FLAGS += -mfix-esp32-psram-cache-strategy=memw
|
|
|
|
endif
|
|
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_NOPS
|
|
|
|
SPIRAM_CACHE_WORKAROUND_FLAGS += -mfix-esp32-psram-cache-strategy=nops
|
2017-07-20 04:26:35 -04:00
|
|
|
endif
|
|
|
|
|
2019-12-18 01:36:58 -05:00
|
|
|
CFLAGS+=$(SPIRAM_CACHE_WORKAROUND_FLAGS)
|
|
|
|
CXXFLAGS+=$(SPIRAM_CACHE_WORKAROUND_FLAGS)
|
|
|
|
LDFLAGS+=$(SPIRAM_CACHE_WORKAROUND_FLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-11 23:52:23 -04:00
|
|
|
# Enable dynamic esp_timer overflow value if building unit tests
|
2018-11-19 11:49:38 -05:00
|
|
|
ifneq ("$(filter esp32,$(TEST_COMPONENTS_LIST))","")
|
2018-05-23 10:39:49 -04:00
|
|
|
CPPFLAGS += -DESP_TIMER_DYNAMIC_OVERFLOW_VAL
|
|
|
|
endif
|
2019-03-13 18:59:31 -04:00
|
|
|
ESP32_LINKER_SCRIPT_TEMPLATE := $(COMPONENT_PATH)/ld/esp32.project.ld.in
|
2019-08-26 22:26:34 -04:00
|
|
|
ESP32_LINKER_SCRIPT_OUTPUT_DIR := $(realpath $(BUILD_DIR_BASE)/esp32)
|
2018-04-17 22:57:45 -04:00
|
|
|
|
|
|
|
# Target to generate linker script generator from fragments presented by each of
|
|
|
|
# the components
|
2019-03-13 18:59:31 -04:00
|
|
|
$(eval $(call ldgen_process_template, $(ESP32_LINKER_SCRIPT_TEMPLATE), $(ESP32_LINKER_SCRIPT_OUTPUT_DIR)/esp32.project.ld))
|