From 7bbdbcc7cbe26e38a3c0464067070929e21b77fa Mon Sep 17 00:00:00 2001 From: Ian Martin Date: Mon, 10 Nov 2014 14:28:35 -0500 Subject: [PATCH] Allow the application's makefile to specify a custom linker script, for example: LINKERSCRIPT = custom-linkerscript.ld --- cpu/cc2538/Makefile.include | 2 +- cpu/nrf51822/Makefile.include | 2 +- cpu/sam3x8e/Makefile.include | 2 +- cpu/samd21/Makefile.include | 2 +- cpu/stm32f0/Makefile.include | 2 +- cpu/stm32f1/Makefile.include | 2 +- cpu/stm32f3/Makefile.include | 2 +- cpu/stm32f4/Makefile.include | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpu/cc2538/Makefile.include b/cpu/cc2538/Makefile.include index c282717bd4..d81b20fe8e 100644 --- a/cpu/cc2538/Makefile.include +++ b/cpu/cc2538/Makefile.include @@ -8,7 +8,7 @@ export USEMODULE += cortex-m3_common export CORTEX_COMMON = $(RIOTCPU)/cortex-m3_common/ # Define the linker script to use for this CPU: -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld # Export the CPU model: MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z') diff --git a/cpu/nrf51822/Makefile.include b/cpu/nrf51822/Makefile.include index 15ad15e023..c84d220790 100644 --- a/cpu/nrf51822/Makefile.include +++ b/cpu/nrf51822/Makefile.include @@ -10,7 +10,7 @@ export CORTEX_COMMON = $(RIOTCPU)/cortex-m0_common/ # define the linker script to use for this CPU. The CPU_MODEL variable is defined in the # board's Makefile.include. This enables multiple NRF51822 controllers with different memory to # use the same code-base. -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld #export the CPU model MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z') diff --git a/cpu/sam3x8e/Makefile.include b/cpu/sam3x8e/Makefile.include index 2069d62d41..8c3e53c46a 100644 --- a/cpu/sam3x8e/Makefile.include +++ b/cpu/sam3x8e/Makefile.include @@ -9,7 +9,7 @@ export USEMODULE += cortex-m3_common export CORTEX_COMMON = $(RIOTCPU)/cortex-m3_common/ # define the linker script to use for this CPU -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/sam3x8e_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/sam3x8e_linkerscript.ld # include CPU specific includes export INCLUDES += -I$(RIOTCPU)/$(CPU)/include diff --git a/cpu/samd21/Makefile.include b/cpu/samd21/Makefile.include index e9bd9d04ab..145b0814d8 100644 --- a/cpu/samd21/Makefile.include +++ b/cpu/samd21/Makefile.include @@ -14,7 +14,7 @@ export CORTEX_COMMON = $(RIOTCPU)/cortex-m0_common/ export USEMODULE += lib # define the linker script to use for this CPU -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/samd21_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/samd21_linkerscript.ld # include CPU specific includes export INCLUDES += -I$(RIOTCPU)/$(CPU)/include diff --git a/cpu/stm32f0/Makefile.include b/cpu/stm32f0/Makefile.include index 27d71f5cf2..034683b4dc 100644 --- a/cpu/stm32f0/Makefile.include +++ b/cpu/stm32f0/Makefile.include @@ -13,7 +13,7 @@ export USEMODULE += lib # define the linker script to use for this CPU. The CPU_MODEL variable is defined in the # board's Makefile.include. This enables multiple STMF0 controllers with different memory to # use the same code-base. -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld #export the CPU model MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z') diff --git a/cpu/stm32f1/Makefile.include b/cpu/stm32f1/Makefile.include index 7370ae77ac..6d47467833 100644 --- a/cpu/stm32f1/Makefile.include +++ b/cpu/stm32f1/Makefile.include @@ -11,7 +11,7 @@ export USEMODULE += lib export CORTEXM_COMMON = $(RIOTCPU)/cortex-m3_common/ # define the linker script to use for this CPU -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld # include CPU specific includes export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/components diff --git a/cpu/stm32f3/Makefile.include b/cpu/stm32f3/Makefile.include index bb97cdfef0..2cb21eea97 100644 --- a/cpu/stm32f3/Makefile.include +++ b/cpu/stm32f3/Makefile.include @@ -17,7 +17,7 @@ export CORTEX_M4_COMMON = $(RIOTCPU)/cortex-m4_common/ include $(CORTEX_M4_COMMON)Makefile.include # define the linker script to use for this CPU -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld #export the CPU model MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z') diff --git a/cpu/stm32f4/Makefile.include b/cpu/stm32f4/Makefile.include index bb97cdfef0..2cb21eea97 100644 --- a/cpu/stm32f4/Makefile.include +++ b/cpu/stm32f4/Makefile.include @@ -17,7 +17,7 @@ export CORTEX_M4_COMMON = $(RIOTCPU)/cortex-m4_common/ include $(CORTEX_M4_COMMON)Makefile.include # define the linker script to use for this CPU -export LINKERSCRIPT = $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld +export LINKERSCRIPT ?= $(RIOTCPU)/$(CPU)/$(CPU_MODEL)_linkerscript.ld #export the CPU model MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')