From 88c5c0a97b1bd550d185b9250eaf1a2bcc25e027 Mon Sep 17 00:00:00 2001 From: lottaviano Date: Tue, 7 Dec 2010 15:31:04 +0000 Subject: [PATCH] Change linking script options to allow user defined linker scripts A user may change the linker script for his purposes. This patch removes warnings when he does so. The default linker script can now be overridden by changing LD_FLAGS in user makefile with the following option: -Wl,-T path/to/linker_script.ld git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4641 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/info/AT91SAM7S128.cdef | 2 +- bertos/cpu/arm/info/AT91SAM7S256.cdef | 2 +- bertos/cpu/arm/info/AT91SAM7S512.cdef | 2 +- bertos/cpu/arm/info/AT91SAM7S64.cdef | 2 +- bertos/cpu/arm/info/AT91SAM7X128.cdef | 2 +- bertos/cpu/arm/info/AT91SAM7X256.cdef | 2 +- bertos/cpu/arm/info/AT91SAM7X512.cdef | 2 +- bertos/cpu/arm/info/LPC2378.cdef | 2 +- bertos/cpu/cortex-m3/info/LM3S1968.cdef | 2 +- bertos/cpu/cortex-m3/info/LM3S8962.cdef | 2 +- bertos/cpu/cortex-m3/info/SAM3N4.cdef | 2 +- bertos/cpu/cortex-m3/info/STM32F101C4.cdef | 2 +- bertos/cpu/cortex-m3/info/STM32F103RB.cdef | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bertos/cpu/arm/info/AT91SAM7S128.cdef b/bertos/cpu/arm/info/AT91SAM7S128.cdef index 67845577..d6182219 100644 --- a/bertos/cpu/arm/info/AT91SAM7S128.cdef +++ b/bertos/cpu/arm/info/AT91SAM7S128.cdef @@ -49,5 +49,5 @@ CPU_DESC += [ "128 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S128__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_128_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_128_rom.ld" diff --git a/bertos/cpu/arm/info/AT91SAM7S256.cdef b/bertos/cpu/arm/info/AT91SAM7S256.cdef index ff883de3..e388e0e8 100644 --- a/bertos/cpu/arm/info/AT91SAM7S256.cdef +++ b/bertos/cpu/arm/info/AT91SAM7S256.cdef @@ -49,6 +49,6 @@ CPU_DESC += [ "256 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S256__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_256_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_256_rom.ld" diff --git a/bertos/cpu/arm/info/AT91SAM7S512.cdef b/bertos/cpu/arm/info/AT91SAM7S512.cdef index 437bb35e..3121c54c 100644 --- a/bertos/cpu/arm/info/AT91SAM7S512.cdef +++ b/bertos/cpu/arm/info/AT91SAM7S512.cdef @@ -49,5 +49,5 @@ CPU_DESC += [ "512 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S512__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_512_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_512_rom.ld" diff --git a/bertos/cpu/arm/info/AT91SAM7S64.cdef b/bertos/cpu/arm/info/AT91SAM7S64.cdef index 843eba53..514457b9 100644 --- a/bertos/cpu/arm/info/AT91SAM7S64.cdef +++ b/bertos/cpu/arm/info/AT91SAM7S64.cdef @@ -49,5 +49,5 @@ CPU_DESC += [ "64 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7S64__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_64_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_64_rom.ld" diff --git a/bertos/cpu/arm/info/AT91SAM7X128.cdef b/bertos/cpu/arm/info/AT91SAM7X128.cdef index ae50787b..05dbc8c1 100644 --- a/bertos/cpu/arm/info/AT91SAM7X128.cdef +++ b/bertos/cpu/arm/info/AT91SAM7X128.cdef @@ -49,5 +49,5 @@ CPU_DESC += [ "128 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7X128__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_128_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_128_rom.ld" diff --git a/bertos/cpu/arm/info/AT91SAM7X256.cdef b/bertos/cpu/arm/info/AT91SAM7X256.cdef index 1f16ffab..c8a91021 100644 --- a/bertos/cpu/arm/info/AT91SAM7X256.cdef +++ b/bertos/cpu/arm/info/AT91SAM7X256.cdef @@ -49,5 +49,5 @@ CPU_DESC += [ "256 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7X256__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_256_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_256_rom.ld" diff --git a/bertos/cpu/arm/info/AT91SAM7X512.cdef b/bertos/cpu/arm/info/AT91SAM7X512.cdef index 456eed69..6bb1e818 100644 --- a/bertos/cpu/arm/info/AT91SAM7X512.cdef +++ b/bertos/cpu/arm/info/AT91SAM7X512.cdef @@ -49,5 +49,5 @@ CPU_DESC += [ "512 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_AT91SAM7X512__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "at91sam7_512_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "at91sam7_512_rom.ld" diff --git a/bertos/cpu/arm/info/LPC2378.cdef b/bertos/cpu/arm/info/LPC2378.cdef index 461ee209..b009a27f 100644 --- a/bertos/cpu/arm/info/LPC2378.cdef +++ b/bertos/cpu/arm/info/LPC2378.cdef @@ -49,7 +49,7 @@ CPU_DESC += [ "512 Kbytes internal flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_LPC2378__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "lpc2378.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "lpc2378.ld" # CPU type used for flashing/debugging MK_PROGRAMMER_CPU = "lpc2378" diff --git a/bertos/cpu/cortex-m3/info/LM3S1968.cdef b/bertos/cpu/cortex-m3/info/LM3S1968.cdef index 344923cb..c10c70e0 100644 --- a/bertos/cpu/cortex-m3/info/LM3S1968.cdef +++ b/bertos/cpu/cortex-m3/info/LM3S1968.cdef @@ -65,4 +65,4 @@ CPU_DESC += [ "256 Kbytes on-chip flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_LM3S1968__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "lm3s1968_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "lm3s1968_rom.ld" diff --git a/bertos/cpu/cortex-m3/info/LM3S8962.cdef b/bertos/cpu/cortex-m3/info/LM3S8962.cdef index 3c1f2217..d624fa56 100644 --- a/bertos/cpu/cortex-m3/info/LM3S8962.cdef +++ b/bertos/cpu/cortex-m3/info/LM3S8962.cdef @@ -62,4 +62,4 @@ CPU_DESC += [ "256 Kbytes on-chip flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_LM3S8962__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "lm3s8962_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "lm3s8962_rom.ld" diff --git a/bertos/cpu/cortex-m3/info/SAM3N4.cdef b/bertos/cpu/cortex-m3/info/SAM3N4.cdef index 93fd7c47..15ffd8f2 100644 --- a/bertos/cpu/cortex-m3/info/SAM3N4.cdef +++ b/bertos/cpu/cortex-m3/info/SAM3N4.cdef @@ -62,4 +62,4 @@ CPU_DESC += [ "256 Kbytes on-chip flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_SAM3N4__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "sam3n4_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "sam3n4_rom.ld" diff --git a/bertos/cpu/cortex-m3/info/STM32F101C4.cdef b/bertos/cpu/cortex-m3/info/STM32F101C4.cdef index 334f36e2..d8880b9e 100644 --- a/bertos/cpu/cortex-m3/info/STM32F101C4.cdef +++ b/bertos/cpu/cortex-m3/info/STM32F101C4.cdef @@ -65,4 +65,4 @@ CPU_DESC += [ "16 Kbytes on-chip flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_STM32F101C4__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "stm32f101c4_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "stm32f101c4_rom.ld" diff --git a/bertos/cpu/cortex-m3/info/STM32F103RB.cdef b/bertos/cpu/cortex-m3/info/STM32F103RB.cdef index 1358ab2e..fec9a27e 100644 --- a/bertos/cpu/cortex-m3/info/STM32F103RB.cdef +++ b/bertos/cpu/cortex-m3/info/STM32F103RB.cdef @@ -65,4 +65,4 @@ CPU_DESC += [ "128 Kbytes on-chip flash memory", # GCC flags for this cpu. MK_CPU_CPPFLAGS += " -D__ARM_STM32F103RB__" -MK_CPU_LDFLAGS += " -T " + SCRIPT_DIR + "stm32f103rb_rom.ld" +MK_CPU_LDFLAGS += " -Wl,-dT " + SCRIPT_DIR + "stm32f103rb_rom.ld" -- 2.25.1