Allow configurable linker script

Make it possible to overwrite `LDSCRIPT` from other Makefiles
This commit is contained in:
Olav Frengstad 2018-11-14 19:51:54 +05:30
parent c9c3befb50
commit 5e57f7de83
3 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ CFLAGS += -I$(TI_XXWARE) -I$(CONTIKI)/$(TI_XXWARE_SRC)
CFLAGS += -I$(TI_XXWARE)/inc
MODULES += $(TI_XXWARE_SRC)
LDSCRIPT = $(CONTIKI_CPU)/cc26xx.ld
LDSCRIPT ?= $(CONTIKI_CPU)/cc26xx.ld
### If the user-specified a Node ID, pass a define
ifdef NODEID

View File

@ -25,9 +25,9 @@ ifneq ($(NRF52_WITHOUT_SOFTDEVICE),1)
NRF52_SOFTDEVICE := $(shell find $(NRF52_SDK_ROOT) -name *iot*_softdevice.hex | head -n 1)
endif
$(info SoftDevice: $(NRF52_SOFTDEVICE))
LDSCRIPT := $(CONTIKI_CPU)/ld/nrf52-$(NRF52_DK_REVISION)-sd.ld
LDSCRIPT ?= $(CONTIKI_CPU)/ld/nrf52-$(NRF52_DK_REVISION)-sd.ld
else
LDSCRIPT := $(CONTIKI_CPU)/ld/nrf52.ld
LDSCRIPT ?= $(CONTIKI_CPU)/ld/nrf52.ld
endif
OUTPUT_FILENAME := $(CONTIKI_PROJECT)

View File

@ -120,7 +120,7 @@ LDFLAGS += -nostartfiles
LDFLAGS += -static
# Linker script
LDSCRIPT := $(CONTIKI_CPU)/$(SUBFAMILY)/$(SUBFAMILY).lds
LDSCRIPT ?= $(CONTIKI_CPU)/$(SUBFAMILY)/$(SUBFAMILY).lds
# Globally linked libraries
TARGET_LIBFILES += -lc -lgcc -lnosys -lm