aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann2011-11-13 12:32:45 +0100
committerUwe Hermann2011-11-13 23:21:26 +0100
commitc3fea659d1313e324bb7512e7e50875e0cb0318a (patch)
tree0ecdd6e8d0d7bf3d6bc69d90f06db24cf8bc67da
parent7f1e75c3a8f7bd4accdbf88a127b24d87131e617 (diff)
examples: Remove duplicate example linker scripts.
Only add one linker script per eval board, and have the Makefiles use that. This avoids duplication, and various copy-paste errors and left-overs which we already have in the tree. Some of the linker scripts are not really correct, yet. Both, the comments which say which board, chip, and RAM/ROM sizes are used, as well as the actual RAM/ROM size definitions are sometimes copy-pasted from other boards and are thus incorrect. This needs to be fixed.
-rw-r--r--examples/lm3s/Makefile.include2
-rw-r--r--examples/lm3s/lm3s3748-evb/lm3s3748-evb.ld (renamed from examples/lm3s/lm3s3748-evb/miniblink/miniblink.ld)0
-rw-r--r--examples/lm3s/lm3s3748-evb/miniblink/Makefile2
-rw-r--r--examples/lpc13xx/Makefile.include2
-rw-r--r--examples/lpc13xx/lpc-p1343/lpc-p1343.ld (renamed from examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld)0
-rw-r--r--examples/lpc13xx/lpc-p1343/miniblink/Makefile2
-rw-r--r--examples/stm32/f1/Makefile.include2
-rw-r--r--examples/stm32/f1/lisa-m/fancyblink/Makefile2
-rw-r--r--examples/stm32/f1/lisa-m/lisa-m.ld (renamed from examples/stm32/f1/mb525/pwmleds/pwmleds.ld)3
-rw-r--r--examples/stm32/f1/lisa-m/usb_cdcacm/Makefile2
-rw-r--r--examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.ld31
-rw-r--r--examples/stm32/f1/lisa-m/usb_dfu/Makefile2
-rw-r--r--examples/stm32/f1/lisa-m/usb_dfu/usbdfu.ld29
-rw-r--r--examples/stm32/f1/lisa-m/usb_hid/Makefile2
-rw-r--r--examples/stm32/f1/lisa-m/usb_hid/usbhid.ld31
-rw-r--r--examples/stm32/f1/mb525/fancyblink/Makefile2
-rw-r--r--examples/stm32/f1/mb525/fancyblink/fancyblink.ld31
-rw-r--r--examples/stm32/f1/mb525/mb525.ld (renamed from examples/stm32/f1/obldc/pwmleds/pwmleds.ld)1
-rw-r--r--examples/stm32/f1/mb525/pwmleds/Makefile2
-rw-r--r--examples/stm32/f1/obldc/can/Makefile2
-rw-r--r--examples/stm32/f1/obldc/can/can.ld31
-rw-r--r--examples/stm32/f1/obldc/led/Makefile2
-rw-r--r--examples/stm32/f1/obldc/obldc.ld (renamed from examples/stm32/f1/obldc/led/led.ld)0
-rw-r--r--examples/stm32/f1/obldc/pwmleds/Makefile2
-rw-r--r--examples/stm32/f1/obldc/systick/Makefile2
-rw-r--r--examples/stm32/f1/obldc/systick/systick.ld31
-rw-r--r--examples/stm32/f1/obldc/usart/Makefile2
-rw-r--r--examples/stm32/f1/obldc/usart/usart.ld31
-rw-r--r--examples/stm32/f1/obldc/usart_irq/Makefile2
-rw-r--r--examples/stm32/f1/obldc/usart_irq/usart_irq.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/button/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/button/button.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/exti_both/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/exti_both/exti_both.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/exti_rising_falling/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/fancyblink/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/fancyblink/fancyblink.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/led_stripe/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/led_stripe/led_stripe.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/miniblink/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/miniblink/miniblink.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/pwm_6step/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/pwm_6step/pwm_6step.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/spi/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/spi/spi.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/stm32-h103.ld (renamed from examples/stm32/f1/lisa-m/fancyblink/fancyblink.ld)0
-rw-r--r--examples/stm32/f1/stm32-h103/timer/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/timer/timer.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/traceswo/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/traceswo/traceswo.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usart/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usart/usart.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usart_irq/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usart_irq/usart_irq.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usart_irq_printf/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usart_printf/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usart_printf/usart_printf.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usb_cdcacm/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usb_cdcacm/cdcacm.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usb_dfu/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usb_dfu/usbdfu.ld29
-rw-r--r--examples/stm32/f1/stm32-h103/usb_hid/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usb_hid/usbhid.ld31
-rw-r--r--examples/stm32/f1/stm32-h103/usb_iap/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h103/usb_iap/usbiap.ld31
-rw-r--r--examples/stm32/f1/stm32-h107/fancyblink/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h107/stm32-h107.ld (renamed from examples/stm32/f1/stm32-h107/fancyblink/fancyblink.ld)0
-rw-r--r--examples/stm32/f1/stm32-h107/usb_simple/Makefile2
-rw-r--r--examples/stm32/f1/stm32-h107/usb_simple/usb_simple.ld31
-rw-r--r--examples/stm32/f1/stm32vl-discovery/button/Makefile2
-rw-r--r--examples/stm32/f1/stm32vl-discovery/fancyblink/Makefile2
-rw-r--r--examples/stm32/f1/stm32vl-discovery/fancyblink/fancyblink.ld31
-rw-r--r--examples/stm32/f1/stm32vl-discovery/miniblink/Makefile2
-rw-r--r--examples/stm32/f1/stm32vl-discovery/miniblink/miniblink.ld31
-rw-r--r--examples/stm32/f1/stm32vl-discovery/rtc/Makefile2
-rw-r--r--examples/stm32/f1/stm32vl-discovery/rtc/rtc.ld31
-rw-r--r--examples/stm32/f1/stm32vl-discovery/stm32vl-discovery.ld (renamed from examples/stm32/f1/stm32vl-discovery/button/button.ld)0
-rw-r--r--examples/stm32/f1/stm32vl-discovery/usart/Makefile2
-rw-r--r--examples/stm32/f1/stm32vl-discovery/usart/usart.ld31
-rw-r--r--examples/stm32/f2/Makefile.include2
-rw-r--r--examples/stm32/f2/jobygps/jobygps.ld (renamed from examples/stm32/f2/jobygps/miniblink/miniblink.ld)1
-rw-r--r--examples/stm32/f2/jobygps/miniblink/Makefile2
-rw-r--r--examples/stm32/f2/jobygps/spi_test/Makefile2
-rw-r--r--examples/stm32/f2/jobygps/spi_test/spi_test.ld31
-rw-r--r--examples/stm32/f2/jobygps/usart_printf/Makefile2
-rw-r--r--examples/stm32/f2/jobygps/usart_printf/usart_printf.ld31
-rw-r--r--examples/stm32/f4/Makefile.include2
-rw-r--r--examples/stm32/f4/stm32f4-discovery/button/Makefile2
-rw-r--r--examples/stm32/f4/stm32f4-discovery/fancyblink/Makefile2
-rw-r--r--examples/stm32/f4/stm32f4-discovery/fancyblink/fancyblink.ld32
-rw-r--r--examples/stm32/f4/stm32f4-discovery/miniblink/Makefile2
-rw-r--r--examples/stm32/f4/stm32f4-discovery/miniblink/miniblink.ld32
-rw-r--r--examples/stm32/f4/stm32f4-discovery/stm32f4-discovery.ld (renamed from examples/stm32/f4/stm32f4-discovery/button/button.ld)0
-rw-r--r--examples/stm32/f4/stm32f4-discovery/usart/Makefile2
-rw-r--r--examples/stm32/f4/stm32f4-discovery/usart/usart.ld32
97 files changed, 101 insertions, 1121 deletions
diff --git a/examples/lm3s/Makefile.include b/examples/lm3s/Makefile.include
index 0eafe7d..1e89988 100644
--- a/examples/lm3s/Makefile.include
+++ b/examples/lm3s/Makefile.include
@@ -29,7 +29,7 @@ OBJDUMP = $(PREFIX)-objdump
TOOLCHAIN_DIR = ../../../..
CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb -MD
-LDSCRIPT = $(BINARY).ld
+LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/lm3s \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
OBJS += $(BINARY).o
diff --git a/examples/lm3s/lm3s3748-evb/miniblink/miniblink.ld b/examples/lm3s/lm3s3748-evb/lm3s3748-evb.ld
index bca5282..bca5282 100644
--- a/examples/lm3s/lm3s3748-evb/miniblink/miniblink.ld
+++ b/examples/lm3s/lm3s3748-evb/lm3s3748-evb.ld
diff --git a/examples/lm3s/lm3s3748-evb/miniblink/Makefile b/examples/lm3s/lm3s3748-evb/miniblink/Makefile
index 110e69e..3229fe6 100644
--- a/examples/lm3s/lm3s3748-evb/miniblink/Makefile
+++ b/examples/lm3s/lm3s3748-evb/miniblink/Makefile
@@ -19,5 +19,7 @@
BINARY = miniblink
+LDSCRIPT = ../lm3s3748-evb.ld
+
include ../../Makefile.include
diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include
index 948d6c4..db80500 100644
--- a/examples/lpc13xx/Makefile.include
+++ b/examples/lpc13xx/Makefile.include
@@ -29,7 +29,7 @@ OBJDUMP = $(PREFIX)-objdump
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb -MD
-LDSCRIPT = $(BINARY).ld
+LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/lpc13xx \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
OBJS += $(BINARY).o
diff --git a/examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld b/examples/lpc13xx/lpc-p1343/lpc-p1343.ld
index 0bffae1..0bffae1 100644
--- a/examples/lpc13xx/lpc-p1343/miniblink/miniblink.ld
+++ b/examples/lpc13xx/lpc-p1343/lpc-p1343.ld
diff --git a/examples/lpc13xx/lpc-p1343/miniblink/Makefile b/examples/lpc13xx/lpc-p1343/miniblink/Makefile
index 110e69e..e372e45 100644
--- a/examples/lpc13xx/lpc-p1343/miniblink/Makefile
+++ b/examples/lpc13xx/lpc-p1343/miniblink/Makefile
@@ -19,5 +19,7 @@
BINARY = miniblink
+LDSCRIPT = ../lpc-p1343.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/Makefile.include b/examples/stm32/f1/Makefile.include
index b7046d0..7d59ddf 100644
--- a/examples/stm32/f1/Makefile.include
+++ b/examples/stm32/f1/Makefile.include
@@ -30,7 +30,7 @@ GDB = $(PREFIX)-gdb
TOOLCHAIN_DIR = ../../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F1
-LDSCRIPT = $(BINARY).ld
+LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32/f1 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
diff --git a/examples/stm32/f1/lisa-m/fancyblink/Makefile b/examples/stm32/f1/lisa-m/fancyblink/Makefile
index 1baec4d..52f5d95 100644
--- a/examples/stm32/f1/lisa-m/fancyblink/Makefile
+++ b/examples/stm32/f1/lisa-m/fancyblink/Makefile
@@ -19,5 +19,7 @@
BINARY = fancyblink
+LDSCRIPT = ../lisa-m.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/mb525/pwmleds/pwmleds.ld b/examples/stm32/f1/lisa-m/lisa-m.ld
index 3409b98..726d34a 100644
--- a/examples/stm32/f1/mb525/pwmleds/pwmleds.ld
+++ b/examples/stm32/f1/lisa-m/lisa-m.ld
@@ -17,7 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
+/* Linker script for Lisa-M (STM32F103RBT6, 128K flash, 20K RAM). */
+/* TODO: Chip name and sizes correct? */
/* Define memory regions. */
MEMORY
diff --git a/examples/stm32/f1/lisa-m/usb_cdcacm/Makefile b/examples/stm32/f1/lisa-m/usb_cdcacm/Makefile
index 38179e3..a913f73 100644
--- a/examples/stm32/f1/lisa-m/usb_cdcacm/Makefile
+++ b/examples/stm32/f1/lisa-m/usb_cdcacm/Makefile
@@ -19,5 +19,7 @@
BINARY = cdcacm
+LDSCRIPT = ../lisa-m.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.ld b/examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.ld
deleted file mode 100644
index d0df9e6..0000000
--- a/examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/lisa-m/usb_dfu/Makefile b/examples/stm32/f1/lisa-m/usb_dfu/Makefile
index 48e2d6b..88ca7e5 100644
--- a/examples/stm32/f1/lisa-m/usb_dfu/Makefile
+++ b/examples/stm32/f1/lisa-m/usb_dfu/Makefile
@@ -19,5 +19,7 @@
BINARY = usbdfu
+LDSCRIPT = ../lisa-m.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/lisa-m/usb_dfu/usbdfu.ld b/examples/stm32/f1/lisa-m/usb_dfu/usbdfu.ld
deleted file mode 100644
index 6a01797..0000000
--- a/examples/stm32/f1/lisa-m/usb_dfu/usbdfu.ld
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 8K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/lisa-m/usb_hid/Makefile b/examples/stm32/f1/lisa-m/usb_hid/Makefile
index d831e9e..15d3391 100644
--- a/examples/stm32/f1/lisa-m/usb_hid/Makefile
+++ b/examples/stm32/f1/lisa-m/usb_hid/Makefile
@@ -19,5 +19,7 @@
BINARY = usbhid
+LDSCRIPT = ../lisa-m.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/lisa-m/usb_hid/usbhid.ld b/examples/stm32/f1/lisa-m/usb_hid/usbhid.ld
deleted file mode 100644
index d0df9e6..0000000
--- a/examples/stm32/f1/lisa-m/usb_hid/usbhid.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/mb525/fancyblink/Makefile b/examples/stm32/f1/mb525/fancyblink/Makefile
index 1baec4d..8e18a4f 100644
--- a/examples/stm32/f1/mb525/fancyblink/Makefile
+++ b/examples/stm32/f1/mb525/fancyblink/Makefile
@@ -19,5 +19,7 @@
BINARY = fancyblink
+LDSCRIPT = ../mb525.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/mb525/fancyblink/fancyblink.ld b/examples/stm32/f1/mb525/fancyblink/fancyblink.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/mb525/fancyblink/fancyblink.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/obldc/pwmleds/pwmleds.ld b/examples/stm32/f1/mb525/mb525.ld
index 3409b98..49ff810 100644
--- a/examples/stm32/f1/obldc/pwmleds/pwmleds.ld
+++ b/examples/stm32/f1/mb525/mb525.ld
@@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* TODO: Fix description and sizes. */
/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
/* Define memory regions. */
diff --git a/examples/stm32/f1/mb525/pwmleds/Makefile b/examples/stm32/f1/mb525/pwmleds/Makefile
index 8ae74d6..a5064b1 100644
--- a/examples/stm32/f1/mb525/pwmleds/Makefile
+++ b/examples/stm32/f1/mb525/pwmleds/Makefile
@@ -19,5 +19,7 @@
BINARY = pwmleds
+LDSCRIPT = ../mb525.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/can/Makefile b/examples/stm32/f1/obldc/can/Makefile
index 20a4b90..15c9cdd 100644
--- a/examples/stm32/f1/obldc/can/Makefile
+++ b/examples/stm32/f1/obldc/can/Makefile
@@ -19,5 +19,7 @@
BINARY = can
+LDSCRIPT = ../obldc.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/can/can.ld b/examples/stm32/f1/obldc/can/can.ld
deleted file mode 100644
index 4f609a8..0000000
--- a/examples/stm32/f1/obldc/can/can.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for an STM32F103RBT6 board (128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/obldc/led/Makefile b/examples/stm32/f1/obldc/led/Makefile
index 8e1618a..7d227be 100644
--- a/examples/stm32/f1/obldc/led/Makefile
+++ b/examples/stm32/f1/obldc/led/Makefile
@@ -19,5 +19,7 @@
BINARY = led
+LDSCRIPT = ../obldc.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/led/led.ld b/examples/stm32/f1/obldc/obldc.ld
index edb52c5..edb52c5 100644
--- a/examples/stm32/f1/obldc/led/led.ld
+++ b/examples/stm32/f1/obldc/obldc.ld
diff --git a/examples/stm32/f1/obldc/pwmleds/Makefile b/examples/stm32/f1/obldc/pwmleds/Makefile
index 8ae74d6..085fb23 100644
--- a/examples/stm32/f1/obldc/pwmleds/Makefile
+++ b/examples/stm32/f1/obldc/pwmleds/Makefile
@@ -19,5 +19,7 @@
BINARY = pwmleds
+LDSCRIPT = ../obldc.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/systick/Makefile b/examples/stm32/f1/obldc/systick/Makefile
index 91b5cb5..ddd3d2f 100644
--- a/examples/stm32/f1/obldc/systick/Makefile
+++ b/examples/stm32/f1/obldc/systick/Makefile
@@ -19,5 +19,7 @@
BINARY = systick
+LDSCRIPT = ../obldc.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/systick/systick.ld b/examples/stm32/f1/obldc/systick/systick.ld
deleted file mode 100644
index a3195d2..0000000
--- a/examples/stm32/f1/obldc/systick/systick.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for an STM32F103CBT6 board (128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/obldc/usart/Makefile b/examples/stm32/f1/obldc/usart/Makefile
index 2c1e1b1..ba5cfab 100644
--- a/examples/stm32/f1/obldc/usart/Makefile
+++ b/examples/stm32/f1/obldc/usart/Makefile
@@ -19,5 +19,7 @@
BINARY = usart
+LDSCRIPT = ../obldc.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/usart/usart.ld b/examples/stm32/f1/obldc/usart/usart.ld
deleted file mode 100644
index edb52c5..0000000
--- a/examples/stm32/f1/obldc/usart/usart.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/obldc/usart_irq/Makefile b/examples/stm32/f1/obldc/usart_irq/Makefile
index 2ab46a0..b0db32c 100644
--- a/examples/stm32/f1/obldc/usart_irq/Makefile
+++ b/examples/stm32/f1/obldc/usart_irq/Makefile
@@ -21,5 +21,7 @@ BINARY = usart_irq
OOCD_BOARD = open-bldc
+LDSCRIPT = ../obldc.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/obldc/usart_irq/usart_irq.ld b/examples/stm32/f1/obldc/usart_irq/usart_irq.ld
deleted file mode 100644
index edb52c5..0000000
--- a/examples/stm32/f1/obldc/usart_irq/usart_irq.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/button/Makefile b/examples/stm32/f1/stm32-h103/button/Makefile
index 96731c2..35b7df5 100644
--- a/examples/stm32/f1/stm32-h103/button/Makefile
+++ b/examples/stm32/f1/stm32-h103/button/Makefile
@@ -19,5 +19,7 @@
BINARY = button
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/button/button.ld b/examples/stm32/f1/stm32-h103/button/button.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/button/button.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/exti_both/Makefile b/examples/stm32/f1/stm32-h103/exti_both/Makefile
index 39e305b..4c88571 100644
--- a/examples/stm32/f1/stm32-h103/exti_both/Makefile
+++ b/examples/stm32/f1/stm32-h103/exti_both/Makefile
@@ -19,5 +19,7 @@
BINARY = exti_both
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/exti_both/exti_both.ld b/examples/stm32/f1/stm32-h103/exti_both/exti_both.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/exti_both/exti_both.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/exti_rising_falling/Makefile b/examples/stm32/f1/stm32-h103/exti_rising_falling/Makefile
index fc603a6..6a7735e 100644
--- a/examples/stm32/f1/stm32-h103/exti_rising_falling/Makefile
+++ b/examples/stm32/f1/stm32-h103/exti_rising_falling/Makefile
@@ -19,5 +19,7 @@
BINARY = exti_rising_falling
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld b/examples/stm32/f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/exti_rising_falling/exti_rising_falling.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/fancyblink/Makefile b/examples/stm32/f1/stm32-h103/fancyblink/Makefile
index 1baec4d..54ccf5e 100644
--- a/examples/stm32/f1/stm32-h103/fancyblink/Makefile
+++ b/examples/stm32/f1/stm32-h103/fancyblink/Makefile
@@ -19,5 +19,7 @@
BINARY = fancyblink
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/fancyblink/fancyblink.ld b/examples/stm32/f1/stm32-h103/fancyblink/fancyblink.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/fancyblink/fancyblink.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/led_stripe/Makefile b/examples/stm32/f1/stm32-h103/led_stripe/Makefile
index 60fd1ef..c7d5d25 100644
--- a/examples/stm32/f1/stm32-h103/led_stripe/Makefile
+++ b/examples/stm32/f1/stm32-h103/led_stripe/Makefile
@@ -19,5 +19,7 @@
BINARY = led_stripe
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/led_stripe/led_stripe.ld b/examples/stm32/f1/stm32-h103/led_stripe/led_stripe.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/led_stripe/led_stripe.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/miniblink/Makefile b/examples/stm32/f1/stm32-h103/miniblink/Makefile
index 24a478b..9da71ea 100644
--- a/examples/stm32/f1/stm32-h103/miniblink/Makefile
+++ b/examples/stm32/f1/stm32-h103/miniblink/Makefile
@@ -19,5 +19,7 @@
BINARY = miniblink
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/miniblink/miniblink.ld b/examples/stm32/f1/stm32-h103/miniblink/miniblink.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/miniblink/miniblink.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/pwm_6step/Makefile b/examples/stm32/f1/stm32-h103/pwm_6step/Makefile
index 2360082..c6e80f7 100644
--- a/examples/stm32/f1/stm32-h103/pwm_6step/Makefile
+++ b/examples/stm32/f1/stm32-h103/pwm_6step/Makefile
@@ -19,5 +19,7 @@
BINARY = pwm_6step
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/pwm_6step/pwm_6step.ld b/examples/stm32/f1/stm32-h103/pwm_6step/pwm_6step.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/pwm_6step/pwm_6step.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/spi/Makefile b/examples/stm32/f1/stm32-h103/spi/Makefile
index 7d3cb72..0064f13 100644
--- a/examples/stm32/f1/stm32-h103/spi/Makefile
+++ b/examples/stm32/f1/stm32-h103/spi/Makefile
@@ -19,5 +19,7 @@
BINARY = spi
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/spi/spi.ld b/examples/stm32/f1/stm32-h103/spi/spi.ld
deleted file mode 100644
index e2fb5b6..0000000
--- a/examples/stm32/f1/stm32-h103/spi/spi.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/lisa-m/fancyblink/fancyblink.ld b/examples/stm32/f1/stm32-h103/stm32-h103.ld
index 3409b98..3409b98 100644
--- a/examples/stm32/f1/lisa-m/fancyblink/fancyblink.ld
+++ b/examples/stm32/f1/stm32-h103/stm32-h103.ld
diff --git a/examples/stm32/f1/stm32-h103/timer/Makefile b/examples/stm32/f1/stm32-h103/timer/Makefile
index 86aced4..ad7edc0 100644
--- a/examples/stm32/f1/stm32-h103/timer/Makefile
+++ b/examples/stm32/f1/stm32-h103/timer/Makefile
@@ -19,5 +19,7 @@
BINARY = timer
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/timer/timer.ld b/examples/stm32/f1/stm32-h103/timer/timer.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/timer/timer.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/traceswo/Makefile b/examples/stm32/f1/stm32-h103/traceswo/Makefile
index 37510d5..3d87313 100644
--- a/examples/stm32/f1/stm32-h103/traceswo/Makefile
+++ b/examples/stm32/f1/stm32-h103/traceswo/Makefile
@@ -19,5 +19,7 @@
BINARY = traceswo
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/traceswo/traceswo.ld b/examples/stm32/f1/stm32-h103/traceswo/traceswo.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/traceswo/traceswo.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usart/Makefile b/examples/stm32/f1/stm32-h103/usart/Makefile
index 2c1e1b1..442026a 100644
--- a/examples/stm32/f1/stm32-h103/usart/Makefile
+++ b/examples/stm32/f1/stm32-h103/usart/Makefile
@@ -19,5 +19,7 @@
BINARY = usart
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usart/usart.ld b/examples/stm32/f1/stm32-h103/usart/usart.ld
deleted file mode 100644
index 3409b98..0000000
--- a/examples/stm32/f1/stm32-h103/usart/usart.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usart_irq/Makefile b/examples/stm32/f1/stm32-h103/usart_irq/Makefile
index 6ee93bd..499b116 100644
--- a/examples/stm32/f1/stm32-h103/usart_irq/Makefile
+++ b/examples/stm32/f1/stm32-h103/usart_irq/Makefile
@@ -19,5 +19,7 @@
BINARY = usart_irq
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usart_irq/usart_irq.ld b/examples/stm32/f1/stm32-h103/usart_irq/usart_irq.ld
deleted file mode 100644
index edb52c5..0000000
--- a/examples/stm32/f1/stm32-h103/usart_irq/usart_irq.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usart_irq_printf/Makefile b/examples/stm32/f1/stm32-h103/usart_irq_printf/Makefile
index 2917a7d..dfedbc0 100644
--- a/examples/stm32/f1/stm32-h103/usart_irq_printf/Makefile
+++ b/examples/stm32/f1/stm32-h103/usart_irq_printf/Makefile
@@ -19,5 +19,7 @@
BINARY = usart_irq_printf
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld b/examples/stm32/f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld
deleted file mode 100644
index edb52c5..0000000
--- a/examples/stm32/f1/stm32-h103/usart_irq_printf/usart_irq_printf.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usart_printf/Makefile b/examples/stm32/f1/stm32-h103/usart_printf/Makefile
index fb26208..3547611 100644
--- a/examples/stm32/f1/stm32-h103/usart_printf/Makefile
+++ b/examples/stm32/f1/stm32-h103/usart_printf/Makefile
@@ -19,5 +19,7 @@
BINARY = usart_printf
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usart_printf/usart_printf.ld b/examples/stm32/f1/stm32-h103/usart_printf/usart_printf.ld
deleted file mode 100644
index edb52c5..0000000
--- a/examples/stm32/f1/stm32-h103/usart_printf/usart_printf.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usb_cdcacm/Makefile b/examples/stm32/f1/stm32-h103/usb_cdcacm/Makefile
index 38179e3..4193e1a 100644
--- a/examples/stm32/f1/stm32-h103/usb_cdcacm/Makefile
+++ b/examples/stm32/f1/stm32-h103/usb_cdcacm/Makefile
@@ -19,5 +19,7 @@
BINARY = cdcacm
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usb_cdcacm/cdcacm.ld b/examples/stm32/f1/stm32-h103/usb_cdcacm/cdcacm.ld
deleted file mode 100644
index d0df9e6..0000000
--- a/examples/stm32/f1/stm32-h103/usb_cdcacm/cdcacm.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usb_dfu/Makefile b/examples/stm32/f1/stm32-h103/usb_dfu/Makefile
index 48e2d6b..d739f7e 100644
--- a/examples/stm32/f1/stm32-h103/usb_dfu/Makefile
+++ b/examples/stm32/f1/stm32-h103/usb_dfu/Makefile
@@ -19,5 +19,7 @@
BINARY = usbdfu
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usb_dfu/usbdfu.ld b/examples/stm32/f1/stm32-h103/usb_dfu/usbdfu.ld
deleted file mode 100644
index 6a01797..0000000
--- a/examples/stm32/f1/stm32-h103/usb_dfu/usbdfu.ld
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 8K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usb_hid/Makefile b/examples/stm32/f1/stm32-h103/usb_hid/Makefile
index d831e9e..95706b2 100644
--- a/examples/stm32/f1/stm32-h103/usb_hid/Makefile
+++ b/examples/stm32/f1/stm32-h103/usb_hid/Makefile
@@ -19,5 +19,7 @@
BINARY = usbhid
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usb_hid/usbhid.ld b/examples/stm32/f1/stm32-h103/usb_hid/usbhid.ld
deleted file mode 100644
index d0df9e6..0000000
--- a/examples/stm32/f1/stm32-h103/usb_hid/usbhid.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h103/usb_iap/Makefile b/examples/stm32/f1/stm32-h103/usb_iap/Makefile
index bed9908..1858629 100644
--- a/examples/stm32/f1/stm32-h103/usb_iap/Makefile
+++ b/examples/stm32/f1/stm32-h103/usb_iap/Makefile
@@ -19,5 +19,7 @@
BINARY = usbiap
+LDSCRIPT = ../stm32-h103.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h103/usb_iap/usbiap.ld b/examples/stm32/f1/stm32-h103/usb_iap/usbiap.ld
deleted file mode 100644
index d0df9e6..0000000
--- a/examples/stm32/f1/stm32-h103/usb_iap/usbiap.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32-h107/fancyblink/Makefile b/examples/stm32/f1/stm32-h107/fancyblink/Makefile
index 1baec4d..0bc0d98 100644
--- a/examples/stm32/f1/stm32-h107/fancyblink/Makefile
+++ b/examples/stm32/f1/stm32-h107/fancyblink/Makefile
@@ -19,5 +19,7 @@
BINARY = fancyblink
+LDSCRIPT = ../stm32-h107.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h107/fancyblink/fancyblink.ld b/examples/stm32/f1/stm32-h107/stm32-h107.ld
index d35c141..d35c141 100644
--- a/examples/stm32/f1/stm32-h107/fancyblink/fancyblink.ld
+++ b/examples/stm32/f1/stm32-h107/stm32-h107.ld
diff --git a/examples/stm32/f1/stm32-h107/usb_simple/Makefile b/examples/stm32/f1/stm32-h107/usb_simple/Makefile
index 2d954e2..1d4a3bc 100644
--- a/examples/stm32/f1/stm32-h107/usb_simple/Makefile
+++ b/examples/stm32/f1/stm32-h107/usb_simple/Makefile
@@ -19,5 +19,7 @@
BINARY = usb_simple
+LDSCRIPT = ../stm32-h107.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32-h107/usb_simple/usb_simple.ld b/examples/stm32/f1/stm32-h107/usb_simple/usb_simple.ld
deleted file mode 100644
index d35c141..0000000
--- a/examples/stm32/f1/stm32-h107/usb_simple/usb_simple.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H107 (STM32F107VCT6, 256K flash, 64K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32vl-discovery/button/Makefile b/examples/stm32/f1/stm32vl-discovery/button/Makefile
index 96731c2..e3603e2 100644
--- a/examples/stm32/f1/stm32vl-discovery/button/Makefile
+++ b/examples/stm32/f1/stm32vl-discovery/button/Makefile
@@ -19,5 +19,7 @@
BINARY = button
+LDSCRIPT = ../stm32vl-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32vl-discovery/fancyblink/Makefile b/examples/stm32/f1/stm32vl-discovery/fancyblink/Makefile
index 1baec4d..07a846b 100644
--- a/examples/stm32/f1/stm32vl-discovery/fancyblink/Makefile
+++ b/examples/stm32/f1/stm32vl-discovery/fancyblink/Makefile
@@ -19,5 +19,7 @@
BINARY = fancyblink
+LDSCRIPT = ../stm32vl-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32vl-discovery/fancyblink/fancyblink.ld b/examples/stm32/f1/stm32vl-discovery/fancyblink/fancyblink.ld
deleted file mode 100644
index 157204a..0000000
--- a/examples/stm32/f1/stm32vl-discovery/fancyblink/fancyblink.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32VLDISCOVERY (STM32F100RB, 128K flash, 8K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32vl-discovery/miniblink/Makefile b/examples/stm32/f1/stm32vl-discovery/miniblink/Makefile
index 24a478b..d737ab1 100644
--- a/examples/stm32/f1/stm32vl-discovery/miniblink/Makefile
+++ b/examples/stm32/f1/stm32vl-discovery/miniblink/Makefile
@@ -19,5 +19,7 @@
BINARY = miniblink
+LDSCRIPT = ../stm32vl-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32vl-discovery/miniblink/miniblink.ld b/examples/stm32/f1/stm32vl-discovery/miniblink/miniblink.ld
deleted file mode 100644
index 157204a..0000000
--- a/examples/stm32/f1/stm32vl-discovery/miniblink/miniblink.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32VLDISCOVERY (STM32F100RB, 128K flash, 8K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32vl-discovery/rtc/Makefile b/examples/stm32/f1/stm32vl-discovery/rtc/Makefile
index 1efa7ac..bbfc865 100644
--- a/examples/stm32/f1/stm32vl-discovery/rtc/Makefile
+++ b/examples/stm32/f1/stm32vl-discovery/rtc/Makefile
@@ -19,5 +19,7 @@
BINARY = rtc
+LDSCRIPT = ../stm32vl-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32vl-discovery/rtc/rtc.ld b/examples/stm32/f1/stm32vl-discovery/rtc/rtc.ld
deleted file mode 100644
index 157204a..0000000
--- a/examples/stm32/f1/stm32vl-discovery/rtc/rtc.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32VLDISCOVERY (STM32F100RB, 128K flash, 8K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f1/stm32vl-discovery/button/button.ld b/examples/stm32/f1/stm32vl-discovery/stm32vl-discovery.ld
index 157204a..157204a 100644
--- a/examples/stm32/f1/stm32vl-discovery/button/button.ld
+++ b/examples/stm32/f1/stm32vl-discovery/stm32vl-discovery.ld
diff --git a/examples/stm32/f1/stm32vl-discovery/usart/Makefile b/examples/stm32/f1/stm32vl-discovery/usart/Makefile
index 2c1e1b1..6f37aea 100644
--- a/examples/stm32/f1/stm32vl-discovery/usart/Makefile
+++ b/examples/stm32/f1/stm32vl-discovery/usart/Makefile
@@ -19,5 +19,7 @@
BINARY = usart
+LDSCRIPT = ../stm32vl-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f1/stm32vl-discovery/usart/usart.ld b/examples/stm32/f1/stm32vl-discovery/usart/usart.ld
deleted file mode 100644
index 157204a..0000000
--- a/examples/stm32/f1/stm32vl-discovery/usart/usart.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32VLDISCOVERY (STM32F100RB, 128K flash, 8K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f1.ld
-
diff --git a/examples/stm32/f2/Makefile.include b/examples/stm32/f2/Makefile.include
index 0345298..e7d6a52 100644
--- a/examples/stm32/f2/Makefile.include
+++ b/examples/stm32/f2/Makefile.include
@@ -31,7 +31,7 @@ GDB = $(PREFIX)-gdb
TOOLCHAIN_DIR = ../../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F2
-LDSCRIPT = $(BINARY).ld
+LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
-L$(TOOLCHAIN_DIR)/lib/stm32/f2 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
diff --git a/examples/stm32/f2/jobygps/miniblink/miniblink.ld b/examples/stm32/f2/jobygps/jobygps.ld
index cfe9ab7..b5e866b 100644
--- a/examples/stm32/f2/jobygps/miniblink/miniblink.ld
+++ b/examples/stm32/f2/jobygps/jobygps.ld
@@ -17,6 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* TODO: Fix board name, chip name, and sizes. */
/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
/* Define memory regions. */
diff --git a/examples/stm32/f2/jobygps/miniblink/Makefile b/examples/stm32/f2/jobygps/miniblink/Makefile
index 24a478b..08b482e 100644
--- a/examples/stm32/f2/jobygps/miniblink/Makefile
+++ b/examples/stm32/f2/jobygps/miniblink/Makefile
@@ -19,5 +19,7 @@
BINARY = miniblink
+LDSCRIPT = ../jobygps.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f2/jobygps/spi_test/Makefile b/examples/stm32/f2/jobygps/spi_test/Makefile
index de4c338..1b52623 100644
--- a/examples/stm32/f2/jobygps/spi_test/Makefile
+++ b/examples/stm32/f2/jobygps/spi_test/Makefile
@@ -19,5 +19,7 @@
BINARY = spi_test
+LDSCRIPT = ../jobygps.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f2/jobygps/spi_test/spi_test.ld b/examples/stm32/f2/jobygps/spi_test/spi_test.ld
deleted file mode 100644
index cfe9ab7..0000000
--- a/examples/stm32/f2/jobygps/spi_test/spi_test.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f2.ld
-
diff --git a/examples/stm32/f2/jobygps/usart_printf/Makefile b/examples/stm32/f2/jobygps/usart_printf/Makefile
index fb26208..eebde4a 100644
--- a/examples/stm32/f2/jobygps/usart_printf/Makefile
+++ b/examples/stm32/f2/jobygps/usart_printf/Makefile
@@ -19,5 +19,7 @@
BINARY = usart_printf
+LDSCRIPT = ../jobygps.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f2/jobygps/usart_printf/usart_printf.ld b/examples/stm32/f2/jobygps/usart_printf/usart_printf.ld
deleted file mode 100644
index e80bdbd..0000000
--- a/examples/stm32/f2/jobygps/usart_printf/usart_printf.ld
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f2.ld
-
diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include
index c3058ee..bed1aa8 100644
--- a/examples/stm32/f4/Makefile.include
+++ b/examples/stm32/f4/Makefile.include
@@ -31,7 +31,7 @@ GDB = $(PREFIX)-gdb
TOOLCHAIN_DIR = ../../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F4
-LDSCRIPT = $(BINARY).ld
+LDSCRIPT ?= $(BINARY).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
-L$(TOOLCHAIN_DIR)/lib/stm32/f4 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
diff --git a/examples/stm32/f4/stm32f4-discovery/button/Makefile b/examples/stm32/f4/stm32f4-discovery/button/Makefile
index 96731c2..6fc56b8 100644
--- a/examples/stm32/f4/stm32f4-discovery/button/Makefile
+++ b/examples/stm32/f4/stm32f4-discovery/button/Makefile
@@ -19,5 +19,7 @@
BINARY = button
+LDSCRIPT = ../stm32f4-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f4/stm32f4-discovery/fancyblink/Makefile b/examples/stm32/f4/stm32f4-discovery/fancyblink/Makefile
index 1baec4d..b4250da 100644
--- a/examples/stm32/f4/stm32f4-discovery/fancyblink/Makefile
+++ b/examples/stm32/f4/stm32f4-discovery/fancyblink/Makefile
@@ -19,5 +19,7 @@
BINARY = fancyblink
+LDSCRIPT = ../stm32f4-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f4/stm32f4-discovery/fancyblink/fancyblink.ld b/examples/stm32/f4/stm32f4-discovery/fancyblink/fancyblink.ld
deleted file mode 100644
index 1cb43c6..0000000
--- a/examples/stm32/f4/stm32f4-discovery/fancyblink/fancyblink.ld
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- * Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32F4DISCOVERY (STM32F407VG, 1024K flash, 128K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f4.ld
-
diff --git a/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile b/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile
index 24a478b..d6ec46d 100644
--- a/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile
+++ b/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile
@@ -19,5 +19,7 @@
BINARY = miniblink
+LDSCRIPT = ../stm32f4-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f4/stm32f4-discovery/miniblink/miniblink.ld b/examples/stm32/f4/stm32f4-discovery/miniblink/miniblink.ld
deleted file mode 100644
index 1cb43c6..0000000
--- a/examples/stm32/f4/stm32f4-discovery/miniblink/miniblink.ld
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- * Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32F4DISCOVERY (STM32F407VG, 1024K flash, 128K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f4.ld
-
diff --git a/examples/stm32/f4/stm32f4-discovery/button/button.ld b/examples/stm32/f4/stm32f4-discovery/stm32f4-discovery.ld
index 1cb43c6..1cb43c6 100644
--- a/examples/stm32/f4/stm32f4-discovery/button/button.ld
+++ b/examples/stm32/f4/stm32f4-discovery/stm32f4-discovery.ld
diff --git a/examples/stm32/f4/stm32f4-discovery/usart/Makefile b/examples/stm32/f4/stm32f4-discovery/usart/Makefile
index 2c1e1b1..7d7bc9a 100644
--- a/examples/stm32/f4/stm32f4-discovery/usart/Makefile
+++ b/examples/stm32/f4/stm32f4-discovery/usart/Makefile
@@ -19,5 +19,7 @@
BINARY = usart
+LDSCRIPT = ../stm32f4-discovery.ld
+
include ../../Makefile.include
diff --git a/examples/stm32/f4/stm32f4-discovery/usart/usart.ld b/examples/stm32/f4/stm32f4-discovery/usart/usart.ld
deleted file mode 100644
index 1cb43c6..0000000
--- a/examples/stm32/f4/stm32f4-discovery/usart/usart.ld
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of the libopencm3 project.
- *
- * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
- * Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* Linker script for ST STM32F4DISCOVERY (STM32F407VG, 1024K flash, 128K RAM). */
-
-/* Define memory regions. */
-MEMORY
-{
- rom (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
- ram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
-}
-
-/* Include the common ld script. */
-INCLUDE libopencm3_stm32f4.ld
-