From d50dd5ab9567cc308e412c5e9e775dc8e15fb509 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan Date: Fri, 3 Feb 2012 23:57:04 +0100 Subject: merge armdebug rc1 This enables the use of GDB or GDB based debuggers to debug the code running on the NXT brick using the USB connection. --- AT91SAM7S256/SAM7S256/gcc/nxt.ld | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'AT91SAM7S256/SAM7S256/gcc/nxt.ld') diff --git a/AT91SAM7S256/SAM7S256/gcc/nxt.ld b/AT91SAM7S256/SAM7S256/gcc/nxt.ld index d63944e..9b7171f 100644 --- a/AT91SAM7S256/SAM7S256/gcc/nxt.ld +++ b/AT91SAM7S256/SAM7S256/gcc/nxt.ld @@ -87,6 +87,30 @@ SECTIONS __STARTOFUSERFLASH_FROM_LINKER = ALIGN (LOADADDR (.data) + SIZEOF (.data), 0x100); + /* + * The various debugger stacks. + */ + .stack : ALIGN(8) { + /* abort stack */ + __abort_stack_bottom__ = . ; + . += 0x80; /* 128 byte abort mode stack. */ + __abort_stack__ = . ; + __abort_stack_top__ = . ; + + /* debugger state */ + __debugger_stack_bottom__ = . ; + . += 0x48; /* 16 user mode registers + SPSR + UNDEF Next Instruction Address */ + __debugger_stack__ = . ; + __debugger_stack_top__ = . ; + + /* breakpoints */ + __breakpoints_start__ = . ; + . += 0x40; /* Single Stepping Breakpoint + 7 Breakpoints */ + __breakpoints_end__ = . ; + } > DATA + + __breakpoints_num__ = (__breakpoints_end__ - __breakpoints_start__) / 8; + /* .bss section which is used for uninitialized data */ .bss (NOLOAD) : { -- cgit v1.2.3