diff --git a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog index 2ecb5c4c20..5c9ae5c8cb 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog +++ b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog @@ -1,3 +1,7 @@ +2009-04-06 Joel Sherrill + + * startup/linkcmds: Move stack so it does not overlap workarea. + 2009-03-26 Joel Sherrill * Makefile.am, console/console.c, startup/linkcmds: Now links but diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds b/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds index 34dee31e11..cdbc7a037e 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds +++ b/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds @@ -24,6 +24,7 @@ DO NOT MODIFY THIS FILE RamBase = DEFINED(RamBase) ? RamBase : 0x00000000; RamSize = DEFINED(RamSize) ? RamSize : 0x00800000; HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; +StackSize = DEFINED(StackSize) ? HeapSize : 1024; MEMORY { @@ -242,6 +243,9 @@ SECTIONS . = ALIGN(32 / 8); __bss_end = ABSOLUTE(.); + _stack_low = ABSOLUTE(.); + . += StackSize; + _stack_high = ABSOLUTE(.); WorkAreaBase = .; } > onchip_memory_0 @@ -323,8 +327,8 @@ __alt_data_end = 0x00800000; * The next two symbols define the location of the default stack. You can * override them to move the stack to a different memory. */ -PROVIDE( __alt_stack_pointer = __alt_data_end ); -PROVIDE( __alt_stack_limit = _end ); +PROVIDE( __alt_stack_pointer = _stack_high ); +PROVIDE( __alt_stack_limit = _stack_low ); /* * This symbol controls where the start of the heap is. If the stack is