diff --git a/cpu/cc2538/cc2538.lds b/cpu/cc2538/cc2538.lds index 84908bd60..cfd4cb48c 100644 --- a/cpu/cc2538/cc2538.lds +++ b/cpu/cc2538/cc2538.lds @@ -106,6 +106,11 @@ SECTIONS _ebss = .; } > SRAM + .stack (NOLOAD) : + { + *(.stack) + } > SRAM + #if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0) .nrdata (NOLOAD) : { diff --git a/cpu/cc2538/startup-gcc.c b/cpu/cc2538/startup-gcc.c index b72701505..bf00c90f9 100644 --- a/cpu/cc2538/startup-gcc.c +++ b/cpu/cc2538/startup-gcc.c @@ -89,7 +89,7 @@ void uart1_isr(void) WEAK_ALIAS(default_handler); #endif /*---------------------------------------------------------------------------*/ /* Allocate stack space */ -static unsigned long stack[512]; +static unsigned long stack[512] __attribute__ ((section(".stack"))); /*---------------------------------------------------------------------------*/ /* Linker construct indicating .text section location */ extern uint8_t _text[0];