Skip to content

Commit 7a99cd1

Browse files
author
Cruz Monrreal
authored
Merge pull request #6773 from OpenNuvoton/nuvoton_fix_timer_stack_size
Enlarge timer thread stack size for Cortex-M23/M33
2 parents e023bb6 + 7b94d4d commit 7a99cd1

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

rtos/TARGET_CORTEX/mbed_rtx_conf.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,20 @@
3434

3535
#define OS_STACK_SIZE MBED_CONF_APP_THREAD_STACK_SIZE
3636

37-
#define OS_TIMER_THREAD_STACK_SIZE 768
38-
#ifndef OS_IDLE_THREAD_STACK_SIZE
39-
#define OS_IDLE_THREAD_STACK_SIZE 512
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
4040
#endif
4141

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
47+
#endif
48+
49+
#define OS_IDLE_THREAD_STACK_SIZE MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
50+
4251
#define OS_DYNAMIC_MEM_SIZE 0
4352

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

0 commit comments

Comments
 (0)