summaryrefslogtreecommitdiffstats
path: root/layout.ld
diff options
context:
space:
mode:
Diffstat (limited to 'layout.ld')
-rw-r--r--layout.ld36
1 files changed, 13 insertions, 23 deletions
diff --git a/layout.ld b/layout.ld
index 7431496..3be0978 100644
--- a/layout.ld
+++ b/layout.ld
@@ -1,10 +1,9 @@
MEMORY {
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K
- RAM (rw!x) : ORIGIN = 0x1FFF8000, LENGTH = 64K
+ flash : ORIGIN = 0x00000000, LENGTH = 256K
+ ram : ORIGIN = 0x1FFF8000, LENGTH = 64K
}
SECTIONS {
- . = 0x00000000;
.text : {
KEEP(*(.vectors))
. = 0x400;
@@ -12,27 +11,18 @@ SECTIONS {
*(.startup*)
*(.text*)
*(.rodata*)
- . = ALIGN(4);
- } > FLASH
+ } >flash
- .data : {
- . = ALIGN(4);
- _sflashdata = LOADADDR(.data);
- _sdata = .;
- *(.fastrun*)
- *(.data*)
- . = ALIGN(4);
- _edata = .;
- } > RAM AT > FLASH
+ .data : { *(.data*) } >ram AT>flash
- .bss : {
- . = ALIGN(4);
- _sbss = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- _ebss = .;
- } > RAM
+ .bss : { *(.bss*) } >ram
- _estack = ORIGIN(RAM) + LENGTH(RAM);
+ _sdata = ADDR(.data);
+ _edata = ADDR(.data) + SIZEOF(.data);
+ _ldata = LOADADDR(.data);
+
+ _sbss = ADDR(.bss);
+ _ebss = ADDR(.bss) + SIZEOF(.bss);
+
+ _estack = ORIGIN(ram) + LENGTH(ram);
}