aducrf101: Rearrange stack and heap to maximize available stack space

Stack now starts at the top of RAM, heap starts after BSS, and
they grow towards each other.
This commit is contained in:
Jim Paris 2014-07-29 18:06:43 -04:00
parent 62b8aafb03
commit 3e193cca2c
2 changed files with 5 additions and 13 deletions

View File

@ -91,10 +91,8 @@ SECTIONS
} > ram AT > flash
.bss : {
/* Stack is in BSS */
. = ALIGN(8);
__bss_start = .;
*(.bss.stack)
*(.bss)
*(.bss.*)
*(COMMON)
@ -102,4 +100,9 @@ SECTIONS
__bss_end = .;
end = .;
} > ram
/* Heap grows up from "end" (after bss), and stack grows down from
the end of RAM. */
. = ORIGIN(ram) + LENGTH(ram);
stack_end = .;
}

View File

@ -32,19 +32,8 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __STACK_SIZE
#define __STACK_SIZE 1024
#endif
.equ SCB_VTOR, 0xE000ED08
/* Stack */
.section .bss.stack
stack_start:
.space __STACK_SIZE, 0
stack_end:
.global stack_end
/* Vector table */
.macro handler name
.long \name\()