From 92e533de74681b283b6223582ad061a46629a379 Mon Sep 17 00:00:00 2001 From: Jeff Bortolotti Date: Thu, 29 Sep 2016 22:49:32 +0200 Subject: [PATCH] cpu: cortexm_common: allow overriding of linker script --- cpu/Makefile.include.cortexm_common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu/Makefile.include.cortexm_common b/cpu/Makefile.include.cortexm_common index 74b23276a9..828c932e74 100644 --- a/cpu/Makefile.include.cortexm_common +++ b/cpu/Makefile.include.cortexm_common @@ -16,7 +16,9 @@ export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts -L$(RIOTCPU)/cortexm_common/ldscripts -export LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL).ld -Wl,--fatal-warnings +export LINKER_SCRIPT ?= $(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL).ld +export LINKFLAGS += -T$(LINKER_SCRIPT) -Wl,--fatal-warnings + export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -nostartfiles export LINKFLAGS += -Wl,--gc-sections