mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
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:
parent
62b8aafb03
commit
3e193cca2c
@ -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 = .;
|
||||
}
|
||||
|
@ -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\()
|
||||
|
Loading…
Reference in New Issue
Block a user