summaryrefslogtreecommitdiff
path: root/controller/ld
diff options
context:
space:
mode:
Diffstat (limited to 'controller/ld')
-rw-r--r--controller/ld/TM4C123GH6PM.ld20
1 files changed, 17 insertions, 3 deletions
diff --git a/controller/ld/TM4C123GH6PM.ld b/controller/ld/TM4C123GH6PM.ld
index 29ff8d8..611ac9e 100644
--- a/controller/ld/TM4C123GH6PM.ld
+++ b/controller/ld/TM4C123GH6PM.ld
@@ -21,13 +21,19 @@
* Description: linker file for the TM4C Launchpad
*/
+ENTRY(Reset_Handler)
+
MEMORY
{
+
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K /* FLASH size 256KB */
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32K/* RAM size 32KB */
}
+_Min_Heap_Size = 0x3000;
+_Min_Stack_Size = 0x3000;
+
SECTIONS
{
@@ -38,7 +44,17 @@ SECTIONS
* those lesser than 0x20007FFF to 0x2000000,which is the origina address of RAM,
* until it comes in contact with .bss or .data in which case a buffer overflow occurs
*/
- PROVIDE( _stack_ptr = ORIGIN(RAM) + LENGTH(RAM));
+ PROVIDE( _stack_ptr = ORIGIN(RAM) + _Min_Stack_Size);
+
+ ._user_heap_stack :
+ {
+ . = ALIGN(8);
+ . = . + _Min_Stack_Size;
+ . = . + _Min_Heap_Size;
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
+ . = ALIGN(8);
+ } > RAM
/* constants and other code stored in FLASH */
.text :
@@ -67,6 +83,4 @@ SECTIONS
_ebss = .; /* end of .bss segment */
} > RAM
-
-
}