Skip to content

Commit 57be9d2

Browse files
committed
Merge branch 'fix_background_overflow' of https://github.com/c1728p9/mbed-os into dev_rollup
2 parents b9f9817 + 9613e0f commit 57be9d2

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

rtos/TARGET_CORTEX/mbed_rtx_conf.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,16 @@
3939
#define OS_TIMER_THREAD_STACK_SIZE MBED_CONF_RTOS_TIMER_THREAD_STACK_SIZE
4040
#endif
4141

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
4248
#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)
4450
#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)
4652
#endif
4753

4854
#define OS_DYNAMIC_MEM_SIZE 0

rtos/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
"thread-stack-size": {
1818
"help": "The default stack size of new threads",
1919
"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
2024
}
2125
},
2226
"macros": ["_RTE_"],

0 commit comments

Comments
 (0)