mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #1982 from locicontrols/custom-linkerscript
Allow the application's makefile to specify a custom linker script
This commit is contained in:
commit
55448c656d
@ -8,7 +8,7 @@ export USEMODULE += cortex-m3_common
|
|||||||
export CORTEX_COMMON = $(RIOTCPU)/cortex-m3_common/
|
export CORTEX_COMMON = $(RIOTCPU)/cortex-m3_common/
|
||||||
|
|
||||||
# Define the linker script to use for this CPU:
|
# 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:
|
# Export the CPU model:
|
||||||
MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z')
|
MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z')
|
||||||
|
@ -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
|
# 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
|
# board's Makefile.include. This enables multiple NRF51822 controllers with different memory to
|
||||||
# use the same code-base.
|
# 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
|
#export the CPU model
|
||||||
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
||||||
|
@ -9,7 +9,7 @@ export USEMODULE += cortex-m3_common
|
|||||||
export CORTEX_COMMON = $(RIOTCPU)/cortex-m3_common/
|
export CORTEX_COMMON = $(RIOTCPU)/cortex-m3_common/
|
||||||
|
|
||||||
# define the linker script to use for this CPU
|
# 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
|
# include CPU specific includes
|
||||||
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||||
|
@ -14,7 +14,7 @@ export CORTEX_COMMON = $(RIOTCPU)/cortex-m0_common/
|
|||||||
export USEMODULE += lib
|
export USEMODULE += lib
|
||||||
|
|
||||||
# define the linker script to use for this CPU
|
# 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
|
# include CPU specific includes
|
||||||
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
export INCLUDES += -I$(RIOTCPU)/$(CPU)/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
|
# 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
|
# board's Makefile.include. This enables multiple STMF0 controllers with different memory to
|
||||||
# use the same code-base.
|
# 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
|
#export the CPU model
|
||||||
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
||||||
|
@ -11,7 +11,7 @@ export USEMODULE += lib
|
|||||||
export CORTEXM_COMMON = $(RIOTCPU)/cortex-m3_common/
|
export CORTEXM_COMMON = $(RIOTCPU)/cortex-m3_common/
|
||||||
|
|
||||||
# define the linker script to use for this CPU
|
# 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
|
# include CPU specific includes
|
||||||
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/components
|
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/components
|
||||||
|
@ -17,7 +17,7 @@ export CORTEX_M4_COMMON = $(RIOTCPU)/cortex-m4_common/
|
|||||||
include $(CORTEX_M4_COMMON)Makefile.include
|
include $(CORTEX_M4_COMMON)Makefile.include
|
||||||
|
|
||||||
# define the linker script to use for this CPU
|
# 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
|
#export the CPU model
|
||||||
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
||||||
|
@ -17,7 +17,7 @@ export CORTEX_M4_COMMON = $(RIOTCPU)/cortex-m4_common/
|
|||||||
include $(CORTEX_M4_COMMON)Makefile.include
|
include $(CORTEX_M4_COMMON)Makefile.include
|
||||||
|
|
||||||
# define the linker script to use for this CPU
|
# 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
|
#export the CPU model
|
||||||
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
|
||||||
|
Loading…
Reference in New Issue
Block a user