cc2538: Move the stack out of .bss
The initialization code clearing .bss is allowed to use the stack, so the stack can not be in .bss, or this code will badly fail if it uses the stack. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
parent
0de729572b
commit
609c615303
|
@ -106,6 +106,11 @@ SECTIONS
|
||||||
_ebss = .;
|
_ebss = .;
|
||||||
} > SRAM
|
} > SRAM
|
||||||
|
|
||||||
|
.stack (NOLOAD) :
|
||||||
|
{
|
||||||
|
*(.stack)
|
||||||
|
} > SRAM
|
||||||
|
|
||||||
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
|
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
|
||||||
.nrdata (NOLOAD) :
|
.nrdata (NOLOAD) :
|
||||||
{
|
{
|
||||||
|
|
|
@ -89,7 +89,7 @@ void uart1_isr(void) WEAK_ALIAS(default_handler);
|
||||||
#endif
|
#endif
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Allocate stack space */
|
/* Allocate stack space */
|
||||||
static unsigned long stack[512];
|
static unsigned long stack[512] __attribute__ ((section(".stack")));
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Linker construct indicating .text section location */
|
/* Linker construct indicating .text section location */
|
||||||
extern uint8_t _text[0];
|
extern uint8_t _text[0];
|
||||||
|
|
Loading…
Reference in a new issue