Skip to content

Commit 7b94d4d

Browse files
committed
Add MBED_CONF_APP_TIMER/IDLE_THREAD_STACK_SIZE to configure timer/idle thread stack size by application
1 parent 285bb87 commit 7b94d4d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

rtos/TARGET_CORTEX/mbed_rtx_conf.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,20 @@
3434

3535
#define OS_STACK_SIZE MBED_CONF_APP_THREAD_STACK_SIZE
3636

37-
#ifndef OS_TIMER_THREAD_STACK_SIZE
38-
#define OS_TIMER_THREAD_STACK_SIZE 768
37+
/** The timer thread's stack size can be configured by the application, if not explicitly specified, it'll default to 768 */
38+
#ifndef MBED_CONF_APP_TIMER_THREAD_STACK_SIZE
39+
#define MBED_CONF_APP_TIMER_THREAD_STACK_SIZE 768
3940
#endif
4041

41-
#ifndef OS_IDLE_THREAD_STACK_SIZE
42-
#define OS_IDLE_THREAD_STACK_SIZE 512
42+
#define OS_TIMER_THREAD_STACK_SIZE MBED_CONF_APP_TIMER_THREAD_STACK_SIZE
43+
44+
/** The idle thread's stack size can be configured by the application, if not explicitly specified, it'll default to 512 */
45+
#ifndef MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
46+
#define MBED_CONF_APP_IDLE_THREAD_STACK_SIZE 512
4347
#endif
4448

49+
#define OS_IDLE_THREAD_STACK_SIZE MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
50+
4551
#define OS_DYNAMIC_MEM_SIZE 0
4652

4753
#if defined(OS_TICK_FREQ) && (OS_TICK_FREQ != 1000)

0 commit comments

Comments
 (0)