From c0374e2471dfcffd9fff4376c61ab2c46b55ba2e Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Fri, 16 Jun 2017 10:11:12 +0100 Subject: [PATCH] RTOS: Allow per target definition of OS_IDLE_THREAD_STACK_SIZE. The stack required for the idle thread is highly dependent on the target because it will call the sleep function which is target specific. While 256 bytes of stack is enough for most targets, others like the NRF52840 might require more. With this change, target maintainers can specify the idle thread stack size in their mbed_rtx.h file. --- rtos/rtx5/mbed_rtx_conf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtos/rtx5/mbed_rtx_conf.h b/rtos/rtx5/mbed_rtx_conf.h index e4f2f807a1..c41a8df5e0 100644 --- a/rtos/rtx5/mbed_rtx_conf.h +++ b/rtos/rtx5/mbed_rtx_conf.h @@ -32,7 +32,9 @@ #define OS_STACK_SIZE MBED_CONF_APP_THREAD_STACK_SIZE #define OS_TIMER_THREAD_STACK_SIZE 768 -#define OS_IDLE_THREAD_STACK_SIZE 512 +#ifndef OS_IDLE_THREAD_STACK_SIZE +#define OS_IDLE_THREAD_STACK_SIZE 256 +#endif #define OS_DYNAMIC_MEM_SIZE 0