CMSIS/RTX: Move Idle and Timer thread stack to bss section.

In case of ARM compiler, idle and timer thread stack though assigned
to `.bss.os` section since not zero initialized are part of `data` section.

In this commit, we are moving stacks of idle and timer thread to bss
section and thereby saving ROM space.
pull/12949/head
deepikabhavnani 2018-12-13 13:54:51 -06:00 committed by Martin Kojtal
parent dd21ea0ae0
commit 9549fff786
1 changed files with 8 additions and 1 deletions

View File

@ -125,9 +125,12 @@ static osRtxThread_t os_idle_thread_cb \
__attribute__((section(".bss.os.thread.cb")));
// Idle Thread Stack
#if defined (__CC_ARM)
static uint64_t os_idle_thread_stack[OS_IDLE_THREAD_STACK_SIZE/8];
#else
static uint64_t os_idle_thread_stack[OS_IDLE_THREAD_STACK_SIZE/8] \
__attribute__((section(".bss.os.thread.stack")));
#endif
// Idle Thread Attributes
static const osThreadAttr_t os_idle_thread_attr = {
#if defined(OS_IDLE_THREAD_NAME)
@ -181,9 +184,13 @@ __attribute__((section(".data.os.timer.mpi"))) =
static osRtxThread_t os_timer_thread_cb \
__attribute__((section(".bss.os.thread.cb")));
#if defined (__CC_ARM)
static uint64_t os_timer_thread_stack[OS_TIMER_THREAD_STACK_SIZE/8];
#else
// Timer Thread Stack
static uint64_t os_timer_thread_stack[OS_TIMER_THREAD_STACK_SIZE/8] \
__attribute__((section(".bss.os.thread.stack")));
#endif
// Timer Thread Attributes
static const osThreadAttr_t os_timer_thread_attr = {