mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
Fixed linker script to allow growing stack+heap.
This commit is contained in:
@ -40,8 +40,6 @@ MEMORY
|
|||||||
ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
|
ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
|
||||||
}
|
}
|
||||||
|
|
||||||
RAM_END = 0x20088000 ; /* There is a way to define this as ram.ORIGIN + ram.LENGTH ? */
|
|
||||||
|
|
||||||
/* Section Definitions */
|
/* Section Definitions */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
@ -116,7 +114,7 @@ SECTIONS
|
|||||||
} > ram
|
} > ram
|
||||||
|
|
||||||
/* .bss section which is used for uninitialized data */
|
/* .bss section which is used for uninitialized data */
|
||||||
.bss (NOLOAD) :
|
.bss ALIGN(4) (NOLOAD) :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_sbss = . ;
|
_sbss = . ;
|
||||||
@ -131,10 +129,18 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
||||||
/* put stack section at the bottom of ram space */
|
/* .stack_dummy section doesn't contains any symbols. It is only
|
||||||
.stack RAM_END (NOLOAD):
|
used for linker to calculate size of stack sections, and assign
|
||||||
|
values to stack symbols later */
|
||||||
|
.stack_dummy :
|
||||||
{
|
{
|
||||||
_sstack = .;
|
*(.stack*)
|
||||||
_estack = .;
|
|
||||||
} > ram
|
} > ram
|
||||||
|
|
||||||
|
/* Set stack top to end of ram, and stack limit move down by
|
||||||
|
* size of stack_dummy section */
|
||||||
|
__StackTop = ORIGIN(ram) + LENGTH(ram);
|
||||||
|
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||||
|
PROVIDE(_sstack = __StackLimit);
|
||||||
|
PROVIDE(_estack = __StackTop);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user