summaryrefslogtreecommitdiffstats
path: root/layout.ld
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2016-10-20 23:43:29 +0100
committerTomasz Kramkowski <tk@the-tk.com>2016-10-20 23:43:29 +0100
commitc3c5f1e5fe27574220c3e94a79048e066cacc121 (patch)
tree445096a0365cc45c959091355852c9b63d8a338a /layout.ld
downloadfmk-c3c5f1e5fe27574220c3e94a79048e066cacc121.tar.gz
fmk-c3c5f1e5fe27574220c3e94a79048e066cacc121.tar.xz
fmk-c3c5f1e5fe27574220c3e94a79048e066cacc121.zip
Init commit
Diffstat (limited to 'layout.ld')
-rw-r--r--layout.ld38
1 files changed, 38 insertions, 0 deletions
diff --git a/layout.ld b/layout.ld
new file mode 100644
index 0000000..7431496
--- /dev/null
+++ b/layout.ld
@@ -0,0 +1,38 @@
+MEMORY {
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K
+ RAM (rw!x) : ORIGIN = 0x1FFF8000, LENGTH = 64K
+}
+
+SECTIONS {
+ . = 0x00000000;
+ .text : {
+ KEEP(*(.vectors))
+ . = 0x400;
+ KEEP(*(.flashconfig*))
+ *(.startup*)
+ *(.text*)
+ *(.rodata*)
+ . = ALIGN(4);
+ } > FLASH
+
+ .data : {
+ . = ALIGN(4);
+ _sflashdata = LOADADDR(.data);
+ _sdata = .;
+ *(.fastrun*)
+ *(.data*)
+ . = ALIGN(4);
+ _edata = .;
+ } > RAM AT > FLASH
+
+ .bss : {
+ . = ALIGN(4);
+ _sbss = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ _ebss = .;
+ } > RAM
+
+ _estack = ORIGIN(RAM) + LENGTH(RAM);
+}