mirror of https://github.com/ARMmbed/mbed-os.git
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/8887/head
parent
255661e55b
commit
ba92372b8d
|
@ -122,9 +122,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)
|
||||
|
@ -178,9 +181,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 = {
|
||||
|
|
Loading…
Reference in New Issue