aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2012-02-04 12:19:57 +0100
committerNicolas Schodet2012-02-11 17:30:42 +0100
commit99a4c90dee42104638933096728bebc45e28bf1a (patch)
tree3fc9f7fe564bb5f23f2ca921fb213328fa49699e
parent2e770cc4395ae7a39315a55b84b4936250b6c18b (diff)
do not reserve space for stacks if armdebug is disabled
-rw-r--r--AT91SAM7S256/SAM7S256/Include/Cstartup.S13
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/nxt.ld6
2 files changed, 16 insertions, 3 deletions
diff --git a/AT91SAM7S256/SAM7S256/Include/Cstartup.S b/AT91SAM7S256/SAM7S256/Include/Cstartup.S
index 8a6a540..0293251 100644
--- a/AT91SAM7S256/SAM7S256/Include/Cstartup.S
+++ b/AT91SAM7S256/SAM7S256/Include/Cstartup.S
@@ -460,5 +460,18 @@ AT91F_Spurious_handler:
.size AT91F_Spurious_handler, . - AT91F_Spurious_handler
.endfunc
+/*------------------------------------------------------------------------------
+//*- Various debugger stacks.
+//*-------------------------------*/
+
+#ifdef ARMDEBUG
+.section .stack.abort, "aw", %nobits
+ .space 0x80; /* 128 byte abort mode stack. */
+.section .stack.debugger, "aw", %nobits
+ .space 0x48; /* 16 user mode registers + SPSR + UNDEF Next Instruction Address */
+.section .breakpoints, "aw", %nobits
+ .space 0x40; /* Single Stepping Breakpoint + 7 Breakpoints */
+#endif
+
.end
diff --git a/AT91SAM7S256/SAM7S256/gcc/nxt.ld b/AT91SAM7S256/SAM7S256/gcc/nxt.ld
index 9b7171f..e54bc5d 100644
--- a/AT91SAM7S256/SAM7S256/gcc/nxt.ld
+++ b/AT91SAM7S256/SAM7S256/gcc/nxt.ld
@@ -93,19 +93,19 @@ SECTIONS
.stack : ALIGN(8) {
/* abort stack */
__abort_stack_bottom__ = . ;
- . += 0x80; /* 128 byte abort mode stack. */
+ KEEP(*(.stack.abort))
__abort_stack__ = . ;
__abort_stack_top__ = . ;
/* debugger state */
__debugger_stack_bottom__ = . ;
- . += 0x48; /* 16 user mode registers + SPSR + UNDEF Next Instruction Address */
+ KEEP(*(.stack.debugger))
__debugger_stack__ = . ;
__debugger_stack_top__ = . ;
/* breakpoints */
__breakpoints_start__ = . ;
- . += 0x40; /* Single Stepping Breakpoint + 7 Breakpoints */
+ KEEP(*(.breakpoints))
__breakpoints_end__ = . ;
} > DATA