cpu/esp32: fix conditional linker options for esp_idf_heap

Module esp_idf_heap is enabled in cpu/esp32/Makefile.dep depending on other modules. Since cpu/esp32/Makefile.dep is read after cpu/esp32/Makefile.include, the conditional  definition of the linker options for the wrapper functions had to be moved from cpu/esp32/Makefile.include to cpu/esp32/Makefile.dep.
This commit is contained in:
Gunar Schorcht 2019-08-06 18:17:45 +02:00
parent 8589382899
commit b2b17c5912
2 changed files with 7 additions and 7 deletions

View File

@ -111,3 +111,10 @@ else
CFLAGS += -DFLASH_MODE_DOUT=1
endif
endif
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
LINKFLAGS += -Wl,-wrap,_malloc_r
LINKFLAGS += -Wl,-wrap,_calloc_r
LINKFLAGS += -Wl,-wrap,_realloc_r
LINKFLAGS += -Wl,-wrap,_free_r
endif

View File

@ -147,13 +147,6 @@ ifneq (,$(filter stdio_uart,$(USEMODULE)))
LINKFLAGS += -Wl,-wrap,getchar
endif
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
LINKFLAGS += -Wl,-wrap,_malloc_r
LINKFLAGS += -Wl,-wrap,_calloc_r
LINKFLAGS += -Wl,-wrap,_realloc_r
LINKFLAGS += -Wl,-wrap,_free_r
endif
# The ELFFILE is the base one used for flashing
FLASHFILE ?= $(ELFFILE)