summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2021-09-25 15:47:25 +0200
committerxengineering <me@xengineering.eu>2021-09-26 12:33:08 +0200
commit7211bd49452e67e0b53ea06ca474f4e54af991ae (patch)
tree2de4b48926830ea29b8ba1f670aedbb4945f4e1d /ld
parent3eaf47ee2144f2abf781c10194f920a799aebb3a (diff)
downloadledcontrol-7211bd49452e67e0b53ea06ca474f4e54af991ae.tar
ledcontrol-7211bd49452e67e0b53ea06ca474f4e54af991ae.tar.zst
ledcontrol-7211bd49452e67e0b53ea06ca474f4e54af991ae.zip
Implement Linker Script and Startup File
Diffstat (limited to 'ld')
-rw-r--r--ld/stm32.ld32
1 files changed, 32 insertions, 0 deletions
diff --git a/ld/stm32.ld b/ld/stm32.ld
new file mode 100644
index 0000000..9f74206
--- /dev/null
+++ b/ld/stm32.ld
@@ -0,0 +1,32 @@
+SECTIONS
+{
+ . = 0x0; /* From 0x00000000 */
+
+ .text :
+ {
+ *(vectors) /* Vector table */
+ *(.text) /* Program code */
+ }
+ .rodata :
+ {
+ *(.rodata) /* Read only data */
+ }
+ _DATA_ROM_START = .;
+
+ . = 0x20000000; /* From 0x20000000 */
+
+ _DATA_RAM_START = .;
+ .data : AT(_DATA_ROM_START)
+ {
+ *(.data) /* Data memory */
+ }
+ _DATA_RAM_END = .;
+
+ _BSS_START = .; /* Indicates where BSS section starts in RAM */
+ .bss :
+ {
+ *(.bss) /* Zero-filled run time allocate data memory */
+ }
+ _BSS_END = .; /* Indicates where BSS section ends in RAM */
+}
+