cc2538: Make it possible to use a custom linker script

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
This commit is contained in:
Benoît Thébaudeau 2013-10-29 14:14:35 +01:00
parent 974850cdf2
commit a7d10ce2ad

View file

@ -5,6 +5,9 @@ AR = arm-none-eabi-ar
OBJCOPY = arm-none-eabi-objcopy OBJCOPY = arm-none-eabi-objcopy
NM = arm-none-eabi-nm NM = arm-none-eabi-nm
ifndef SOURCE_LDSCRIPT
SOURCE_LDSCRIPT = $(CONTIKI_CPU)/cc2538.lds
endif
LDSCRIPT = $(OBJECTDIR)/cc2538.ld LDSCRIPT = $(OBJECTDIR)/cc2538.ld
CFLAGS += -O2 -mcpu=cortex-m3 -mthumb -mlittle-endian CFLAGS += -O2 -mcpu=cortex-m3 -mthumb -mlittle-endian
@ -88,6 +91,6 @@ LDGENFLAGS += -imacros "contiki-conf.h"
LDGENFLAGS += -x c -P -E LDGENFLAGS += -x c -P -E
# NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR) # NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR)
$(LDSCRIPT): $(CONTIKI_CPU)/cc2538.lds FORCE | $(OBJECTDIR) $(LDSCRIPT): $(SOURCE_LDSCRIPT) FORCE | $(OBJECTDIR)
$(TRACE_CC) $(TRACE_CC)
$(Q)$(CC) $(LDGENFLAGS) $< -o $@ $(Q)$(CC) $(LDGENFLAGS) $< -o $@