File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 45
45
#else
46
46
#define EXTRA_IDLE_STACK 0
47
47
#endif
48
+
49
+ // Increase the idle thread stack size when debug is enabled
50
+ #if defined(MBED_DEBUG )
51
+ #define EXTRA_IDLE_STACK_DEBUG MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_DEBUG_EXTRA
52
+ #else
53
+ #define EXTRA_IDLE_STACK_DEBUG 0
54
+ #endif
55
+
48
56
#ifdef MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
49
- #define OS_IDLE_THREAD_STACK_SIZE ( MBED_CONF_APP_IDLE_THREAD_STACK_SIZE + EXTRA_IDLE_STACK)
57
+ #define OS_IDLE_THREAD_STACK_SIZE MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
50
58
#else
51
- #define OS_IDLE_THREAD_STACK_SIZE (MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE + EXTRA_IDLE_STACK)
59
+ #define OS_IDLE_THREAD_STACK_SIZE (MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE + EXTRA_IDLE_STACK + EXTRA_IDLE_STACK_DEBUG )
52
60
#endif
53
61
54
62
#define OS_DYNAMIC_MEM_SIZE 0
Original file line number Diff line number Diff line change 21
21
"idle-thread-stack-size-tickless-extra" : {
22
22
"help" : " Additional size to add to the idle thread when tickless is enabled and LPTICKER_DELAY_TICKS is used" ,
23
23
"value" : 256
24
+ },
25
+ "idle-thread-stack-size-debug-extra" : {
26
+ "help" : " Additional size to add to the idle thread when code compilation optimisation is disabled" ,
27
+ "value" : 0
24
28
}
25
29
},
26
30
"macros" : [" _RTE_" ],
27
31
"target_overrides" : {
28
32
"*" : {
29
33
"target.boot-stack-size" : " 0x400"
34
+ },
35
+ "STM" : {
36
+ "idle-thread-stack-size-debug-extra" : 128
37
+ },
38
+ "STM32L1" : {
39
+ "idle-thread-stack-size-debug-extra" : 512
30
40
},
31
41
"MCU_NRF51" : {
32
42
"target.boot-stack-size" : " 0x800"
You can’t perform that action at this time.
0 commit comments