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:
parent
8589382899
commit
b2b17c5912
@ -111,3 +111,10 @@ else
|
|||||||
CFLAGS += -DFLASH_MODE_DOUT=1
|
CFLAGS += -DFLASH_MODE_DOUT=1
|
||||||
endif
|
endif
|
||||||
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
|
||||||
|
|||||||
@ -147,13 +147,6 @@ ifneq (,$(filter stdio_uart,$(USEMODULE)))
|
|||||||
LINKFLAGS += -Wl,-wrap,getchar
|
LINKFLAGS += -Wl,-wrap,getchar
|
||||||
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
|
|
||||||
|
|
||||||
# The ELFFILE is the base one used for flashing
|
# The ELFFILE is the base one used for flashing
|
||||||
FLASHFILE ?= $(ELFFILE)
|
FLASHFILE ?= $(ELFFILE)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user