esp-idf/components/esp_hw_support/Makefile.projbuild
2021-07-16 20:14:26 +08:00

20 lines
684 B
Makefile

# Enable psram cache bug workaround in compiler if selected
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND
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
endif
CFLAGS+=$(SPIRAM_CACHE_WORKAROUND_FLAGS)
CXXFLAGS+=$(SPIRAM_CACHE_WORKAROUND_FLAGS)
LDFLAGS+=$(SPIRAM_CACHE_WORKAROUND_FLAGS)
endif