summaryrefslogtreecommitdiff
path: root/ld_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'ld_scripts')
-rw-r--r--ld_scripts/arm_flash_ram.ld86
-rw-r--r--ld_scripts/generated.ld.j265
-rw-r--r--ld_scripts/stm32_f04_6.ld6
-rw-r--r--ld_scripts/stm32_f05_8.ld6
-rw-r--r--ld_scripts/stm32_f1_8.ld6
-rw-r--r--ld_scripts/stm32_f1_b.ld6
-rw-r--r--ld_scripts/stm32_f303_b.ld7
-rw-r--r--ld_scripts/stm32_f303_c.ld7
-rw-r--r--ld_scripts/stm32_f373_8.ld6
-rw-r--r--ld_scripts/stm32_f373_b.ld6
-rw-r--r--ld_scripts/stm32_f373_c.ld6
-rw-r--r--ld_scripts/stm32_f401_e.ld6
-rw-r--r--ld_scripts/stm32_f4_e.ld7
-rw-r--r--ld_scripts/stm32_f4_g.ld7
-rw-r--r--ld_scripts/stm32_l0_8.ld6
15 files changed, 64 insertions, 169 deletions
diff --git a/ld_scripts/arm_flash_ram.ld b/ld_scripts/arm_flash_ram.ld
deleted file mode 100644
index df0a578..0000000
--- a/ld_scripts/arm_flash_ram.ld
+++ /dev/null
@@ -1,86 +0,0 @@
-_ram_start = ORIGIN(ram);
-_ram_size = LENGTH(ram);
-_ram_end = _ram_start + _ram_size;
-
-SECTIONS {
- . = 0;
-
- .vectors : ALIGN(16) SUBALIGN(16) {
- KEEP(*(.vectors))
- } > flash
-
- .init_array : ALIGN(4) SUBALIGN(4) {
- PROVIDE(_init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE(_init_array_end = .);
- } > flash
-
- .fini_array : ALIGN(4) SUBALIGN(4) {
- PROVIDE(_fini_array_start = .);
- KEEP(*(.fini_array))
- KEEP(*(SORT(.fini_array.*)))
- PROVIDE(_fini_array_end = .);
- } > flash
-
- .text : ALIGN(4) SUBALIGN(4) {
- *(.text.startup.*)
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.glue_7t)
- *(.glue_7)
- *(.gcc*)
- } > flash
-
- .ARM.extab : {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > flash
-
- .ARM.exidx : {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > flash
-
- .eh_frame_hdr : {
- *(.eh_frame_hdr)
- } > flash
-
- .eh_frame : ONLY_IF_RO {
- *(.eh_frame)
- } > flash
-
- . = ALIGN(4);
-
- PROVIDE(_data_rom = .);
-
- .bootinfo : {
- *(.bootinfo)
- } > ram
-
- . = ALIGN(4);
-
- .data : {
- PROVIDE(_data_start = .);
- *(.data)
- . = ALIGN(4);
- *(.data.*)
- . = ALIGN(4);
- *(.ramtext)
- . = ALIGN(4);
- PROVIDE(_data_end = .);
- } > ram AT > flash
-
- .bss : {
- PROVIDE(_bss_start = .);
- *(.bss)
- . = ALIGN(4);
- *(.bss.*)
- . = ALIGN(4);
- *(COMMON)
- . = ALIGN(4);
- PROVIDE(_bss_end = .);
- } > ram
-
- PROVIDE(_ram_end = ORIGIN(ram) + LENGTH(ram));
-}
diff --git a/ld_scripts/generated.ld.j2 b/ld_scripts/generated.ld.j2
index bc088d5..0eb3e8c 100644
--- a/ld_scripts/generated.ld.j2
+++ b/ld_scripts/generated.ld.j2
@@ -4,4 +4,67 @@ MEMORY {
{% endfor %}
}
-INCLUDE "arm_flash_ram.ld"
+SECTIONS {
+ . = 0;
+
+ .vectors : ALIGN(16) SUBALIGN(16) {
+ KEEP(*(.vectors))
+ } > flash
+
+ .init_array : ALIGN(4) SUBALIGN(4) {
+ PROVIDE(_init_array_start = .);
+ KEEP(*(SORT(.init_array.*)))
+ KEEP(*(.init_array))
+ PROVIDE(_init_array_end = .);
+ } > flash
+
+ .fini_array : ALIGN(4) SUBALIGN(4) {
+ PROVIDE(_fini_array_start = .);
+ KEEP(*(.fini_array))
+ KEEP(*(SORT(.fini_array.*)))
+ PROVIDE(_fini_array_end = .);
+ } > flash
+
+ .text : ALIGN(4) SUBALIGN(4) {
+ *(.text.startup.*)
+ *(.text)
+ *(.text.*)
+ *(.rodata)
+ *(.rodata.*)
+ *(.srodata)
+ *(.srodata.*)
+ *(.glue_7t)
+ *(.glue_7)
+ *(.gcc*)
+ } > flash
+
+ .bootinfo : ALIGN(4) SUBALIGN(4) {
+ *(.bootinfo)
+ } > ram
+
+ . = ALIGN(4);
+
+ .data : ALIGN(4) SUBALIGN(4) {
+ PROVIDE(_data_start = .);
+ *(.data)
+ *(.data.*)
+ *(.sdata)
+ *(.sdata.*)
+ *(.ramtext)
+ PROVIDE(_data_end = .);
+ } > ram AT > flash
+
+ .bss : {
+ PROVIDE(_bss_start = .);
+ *(.bss)
+ *(.bss.*)
+ *(.sbss)
+ *(.sbss.*)
+ *(COMMON)
+ PROVIDE(_bss_end = .);
+ } > ram
+
+ PROVIDE(_ram_end = ORIGIN(ram) + LENGTH(ram));
+
+ PROVIDE(_data_rom = LOADADDR(.data));
+}
diff --git a/ld_scripts/stm32_f04_6.ld b/ld_scripts/stm32_f04_6.ld
deleted file mode 100644
index f96278d..0000000
--- a/ld_scripts/stm32_f04_6.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 32k
- ram (rwx) : org = 0x20000000, len = 6k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f05_8.ld b/ld_scripts/stm32_f05_8.ld
deleted file mode 100644
index 289255c..0000000
--- a/ld_scripts/stm32_f05_8.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 64k
- ram (rwx) : org = 0x20000000, len = 8k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f1_8.ld b/ld_scripts/stm32_f1_8.ld
deleted file mode 100644
index 246bdfc..0000000
--- a/ld_scripts/stm32_f1_8.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 64k
- ram (rwx) : org = 0x20000000, len = 20k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f1_b.ld b/ld_scripts/stm32_f1_b.ld
deleted file mode 100644
index 7fd5e59..0000000
--- a/ld_scripts/stm32_f1_b.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 128k
- ram (rwx) : org = 0x20000000, len = 20k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f303_b.ld b/ld_scripts/stm32_f303_b.ld
deleted file mode 100644
index a0cb6b1..0000000
--- a/ld_scripts/stm32_f303_b.ld
+++ /dev/null
@@ -1,7 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 128k
- ram (rwx) : org = 0x20000000, len = 32k
- ccm (rwx) : org = 0x10000000, len = 8k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f303_c.ld b/ld_scripts/stm32_f303_c.ld
deleted file mode 100644
index 4cc4894..0000000
--- a/ld_scripts/stm32_f303_c.ld
+++ /dev/null
@@ -1,7 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 256k
- ram (rwx) : org = 0x20000000, len = 40k
- ccm (rwx) : org = 0x10000000, len = 8k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f373_8.ld b/ld_scripts/stm32_f373_8.ld
deleted file mode 100644
index 929ee6e..0000000
--- a/ld_scripts/stm32_f373_8.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 64k
- ram (rwx) : org = 0x20000000, len = 16k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f373_b.ld b/ld_scripts/stm32_f373_b.ld
deleted file mode 100644
index ab6620c..0000000
--- a/ld_scripts/stm32_f373_b.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 128k
- ram (rwx) : org = 0x20000000, len = 24k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f373_c.ld b/ld_scripts/stm32_f373_c.ld
deleted file mode 100644
index 812a041..0000000
--- a/ld_scripts/stm32_f373_c.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 256k
- ram (rwx) : org = 0x20000000, len = 32k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f401_e.ld b/ld_scripts/stm32_f401_e.ld
deleted file mode 100644
index e5ccad6..0000000
--- a/ld_scripts/stm32_f401_e.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 512k
- ram (rwx) : org = 0x20000000, len = 96k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f4_e.ld b/ld_scripts/stm32_f4_e.ld
deleted file mode 100644
index b19753c..0000000
--- a/ld_scripts/stm32_f4_e.ld
+++ /dev/null
@@ -1,7 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 512k
- ram (rwx) : org = 0x20000000, len = 128k
- ccm (rwx) : org = 0x10000000, len = 64k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_f4_g.ld b/ld_scripts/stm32_f4_g.ld
deleted file mode 100644
index 6ce322b..0000000
--- a/ld_scripts/stm32_f4_g.ld
+++ /dev/null
@@ -1,7 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 1024k
- ram (rwx) : org = 0x20000000, len = 128k
- ccm (rwx) : org = 0x10000000, len = 64k
-}
-
-INCLUDE "arm_flash_ram.ld"
diff --git a/ld_scripts/stm32_l0_8.ld b/ld_scripts/stm32_l0_8.ld
deleted file mode 100644
index 289255c..0000000
--- a/ld_scripts/stm32_l0_8.ld
+++ /dev/null
@@ -1,6 +0,0 @@
-MEMORY {
- flash (rx) : org = 0x08000000, len = 64k
- ram (rwx) : org = 0x20000000, len = 8k
-}
-
-INCLUDE "arm_flash_ram.ld"