aboutsummaryrefslogtreecommitdiffstats
path: root/support/ld/VLDiscovery
diff options
context:
space:
mode:
Diffstat (limited to 'support/ld/VLDiscovery')
-rw-r--r--support/ld/VLDiscovery/flash.ld24
-rw-r--r--support/ld/VLDiscovery/jtag.ld24
-rw-r--r--support/ld/VLDiscovery/ram.ld22
3 files changed, 70 insertions, 0 deletions
diff --git a/support/ld/VLDiscovery/flash.ld b/support/ld/VLDiscovery/flash.ld
new file mode 100644
index 0000000..44ff8a1
--- /dev/null
+++ b/support/ld/VLDiscovery/flash.ld
@@ -0,0 +1,24 @@
+/*
+ * VLDiscovery (STM32F100RBT6, medium density) linker script for Flash builds.
+ */
+
+/*
+ * Define memory spaces.
+ */
+MEMORY
+{
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
+ rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
+}
+
+REGION_ALIAS("REGION_TEXT", rom);
+REGION_ALIAS("REGION_DATA", ram);
+REGION_ALIAS("REGION_BSS", ram);
+REGION_ALIAS("REGION_RODATA", rom);
+
+/*
+ * Define the rest of the sections
+ */
+_FLASH_BUILD = 1;
+
+INCLUDE common.inc
diff --git a/support/ld/VLDiscovery/jtag.ld b/support/ld/VLDiscovery/jtag.ld
new file mode 100644
index 0000000..b952572
--- /dev/null
+++ b/support/ld/VLDiscovery/jtag.ld
@@ -0,0 +1,24 @@
+/*
+ * VLDiscovery (STM32F100RBT6, medium density) linker script for JTAG (bare
+ * metal, no bootloader) builds.
+ */
+
+/*
+ * Define memory spaces.
+ */
+MEMORY
+{
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
+ rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
+}
+
+REGION_ALIAS("REGION_TEXT", rom);
+REGION_ALIAS("REGION_DATA", ram);
+REGION_ALIAS("REGION_BSS", ram);
+REGION_ALIAS("REGION_RODATA", rom);
+
+/*
+ * Define the rest of the sections
+ */
+_FLASH_BUILD = 1;
+INCLUDE common.inc
diff --git a/support/ld/VLDiscovery/ram.ld b/support/ld/VLDiscovery/ram.ld
new file mode 100644
index 0000000..d659cd6
--- /dev/null
+++ b/support/ld/VLDiscovery/ram.ld
@@ -0,0 +1,22 @@
+/*
+ * VLDiscovery (STM32F100RBT6, medium density) linker script for RAM builds.
+ */
+
+/*
+ * Define memory spaces.
+ */
+MEMORY
+{
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K
+ rom (rx) : ORIGIN = 0x08000000, LENGTH = 0K
+}
+
+REGION_ALIAS("REGION_TEXT", ram);
+REGION_ALIAS("REGION_DATA", ram);
+REGION_ALIAS("REGION_BSS", ram);
+REGION_ALIAS("REGION_RODATA", ram);
+
+/*
+ * Define the rest of the sections
+ */
+INCLUDE common.inc