File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 39
39
#define OS_TIMER_THREAD_STACK_SIZE MBED_CONF_RTOS_TIMER_THREAD_STACK_SIZE
40
40
#endif
41
41
42
+ // Increase the idle thread stack size when tickless is enabled
43
+ #if defined(MBED_TICKLESS ) && defined(LPTICKER_DELAY_TICKS ) && (LPTICKER_DELAY_TICKS > 0 )
44
+ #define EXTRA_IDLE_STACK MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_TICKLESS_EXTRA
45
+ #else
46
+ #define EXTRA_IDLE_STACK 0
47
+ #endif
42
48
#ifdef MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
43
- #define OS_IDLE_THREAD_STACK_SIZE MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
49
+ #define OS_IDLE_THREAD_STACK_SIZE ( MBED_CONF_APP_IDLE_THREAD_STACK_SIZE + EXTRA_IDLE_STACK)
44
50
#else
45
- #define OS_IDLE_THREAD_STACK_SIZE MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE
51
+ #define OS_IDLE_THREAD_STACK_SIZE ( MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE + EXTRA_IDLE_STACK)
46
52
#endif
47
53
48
54
#define OS_DYNAMIC_MEM_SIZE 0
Original file line number Diff line number Diff line change 17
17
"thread-stack-size" : {
18
18
"help" : " The default stack size of new threads" ,
19
19
"value" : 4096
20
+ },
21
+ "idle-thread-stack-size-tickless-extra" : {
22
+ "help" : " Additional size to add to the idle thread when tickless is enabled and LPTICKER_DELAY_TICKS is used" ,
23
+ "value" : 256
20
24
}
21
25
},
22
26
"macros" : [" _RTE_" ],
You can’t perform that action at this time.
0 commit comments