summaryrefslogtreecommitdiffstats
path: root/script.ld
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2024-09-11 16:23:30 +0800
committerSadeep Madurange <sadeep@asciimx.com>2024-09-11 16:23:30 +0800
commit45fec7ac2438081bc52889a4af7d95d0aafbd7ee (patch)
tree50961ebd10d007c00c305754f4d8a92883bfe19e /script.ld
parente54cdd000a9cb3ec66e5188c43cc94b73a477ba6 (diff)
downloadbare-metal-arduino-due-45fec7ac2438081bc52889a4af7d95d0aafbd7ee.tar.gz
LED works!
Diffstat (limited to 'script.ld')
-rw-r--r--script.ld23
1 files changed, 15 insertions, 8 deletions
diff --git a/script.ld b/script.ld
index e8b0bb1..ac49459 100644
--- a/script.ld
+++ b/script.ld
@@ -1,3 +1,5 @@
+ENTRY(main)
+
MEMORY
{
rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000
@@ -6,21 +8,28 @@ MEMORY
SECTIONS
{
- . = ALIGN(4);
.text :
{
- KEEP(*(.vectors .vectors.*))
+ KEEP(*(.vtor))
+
*(.text*)
*(.rodata*)
+
+ . = ALIGN(4);
+ __end_of_text__ = .;
} > rom
- . = ALIGN(4);
.data :
{
- *(.data*);
+ __data_start_src__ = __end_of_text__;
+ __data_start__ = .;
+
+ *(.data*)
+
+ . = ALIGN(4);
+ __data_end__ = .;
} > ram AT >rom
- . = ALIGN(4);
.bss (NOLOAD) :
{
__bss_start__ = . ;
@@ -29,7 +38,5 @@ SECTIONS
__bss_end__ = . ;
} > ram
- _end = . ;
- __end__ = _end ;
- end = _end;
+ StackTop = ORIGIN(ram) + LENGTH(ram);
}