mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-20 12:29:03 +00:00
targets/gba: make linker script cleaner
Make it clearer where the stack is located.
This commit is contained in:
@@ -7,10 +7,8 @@ MEMORY {
|
|||||||
rom : ORIGIN = 0x08000000, LENGTH = 32M /* flash ROM */
|
rom : ORIGIN = 0x08000000, LENGTH = 32M /* flash ROM */
|
||||||
}
|
}
|
||||||
|
|
||||||
__iwram_top = ORIGIN(iwram) + LENGTH(iwram);;
|
__stack_size_irq = 1K;
|
||||||
_stack_size = 3K;
|
__stack_size_usr = 2K;
|
||||||
__sp_irq = _stack_top;
|
|
||||||
__sp_usr = _stack_top - 1K;
|
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
@@ -35,8 +33,10 @@ SECTIONS
|
|||||||
.stack (NOLOAD) :
|
.stack (NOLOAD) :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
. += _stack_size;
|
__sp_irq = .;
|
||||||
_stack_top = .;
|
. += __stack_size_irq;
|
||||||
|
__sp_usr = .;
|
||||||
|
. += __stack_size_usr;
|
||||||
} >iwram
|
} >iwram
|
||||||
|
|
||||||
/* Start address (in flash) of .data, used by startup code. */
|
/* Start address (in flash) of .data, used by startup code. */
|
||||||
|
|||||||
Reference in New Issue
Block a user