mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 16:39:52 +00:00
[SAMR21] change stack allocation to use all free RAM (#2334)
Initially fixed size 8k was allocated for stack. As result there was almost no free RAM. This change creates stack on all free RAM. Signed-off-by: Oleksandr Grytsov <[email protected]>
This commit is contained in:
committed by
Jonathan Hui
parent
1667cc7558
commit
c4dc72cf2d
+7
-9
@@ -53,9 +53,6 @@ MEMORY
|
||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
|
||||
}
|
||||
|
||||
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
|
||||
STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
|
||||
|
||||
/* Section Definitions */
|
||||
SECTIONS
|
||||
{
|
||||
@@ -151,15 +148,16 @@ SECTIONS
|
||||
} > ram
|
||||
|
||||
/* stack section */
|
||||
.stack (NOLOAD):
|
||||
.stack_dummy (NOLOAD):
|
||||
{
|
||||
. = ALIGN(8);
|
||||
_sstack = .;
|
||||
. = . + STACK_SIZE;
|
||||
. = ALIGN(8);
|
||||
_estack = .;
|
||||
KEEP(*(.stack*))
|
||||
} > ram
|
||||
|
||||
_sstack = _ebss;
|
||||
_estack = ORIGIN(ram) + LENGTH(ram);
|
||||
|
||||
ASSERT(_sstack < _estack, "region RAM overflowed with stack")
|
||||
|
||||
. = ALIGN(4);
|
||||
_end = . ;
|
||||
end = _end;
|
||||
|
||||
Reference in New Issue
Block a user