Skip to content

Commit f24ac50

Browse files
author
Deepika
committed
Set main thread stack size as 3K for constrained targets
1 parent f549f14 commit f24ac50

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

targets/TARGET_NUVOTON/mbed_rtx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545
#error "no toolchain defined"
4646
#endif
4747

48+
#if defined(TARGET_NANO100)
49+
#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
50+
#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
51+
#endif
52+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072
53+
#endif
54+
4855
#endif // TARGET_NUVOTON
4956

5057
#endif // MBED_MBED_RTX_H

targets/TARGET_STM/mbed_rtx.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,11 @@ extern uint32_t __HeapLimit[];
136136
#define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit))
137137
#endif
138138

139+
#if (defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB))
140+
#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
141+
#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
142+
#endif
143+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072
144+
#endif
145+
139146
#endif // MBED_MBED_RTX_H

targets/TARGET_TOSHIBA/mbed_rtx.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#ifndef INITIAL_SP
2323
#define INITIAL_SP (0x20004000UL)
2424
#endif
25+
#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
26+
#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
27+
#endif
28+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072
2529

2630
#endif
2731

@@ -30,6 +34,10 @@
3034
#ifndef INITIAL_SP
3135
#define INITIAL_SP (0x20080000UL)
3236
#endif
37+
#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
38+
#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
39+
#endif
40+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072
3341

3442
#endif
3543

0 commit comments

Comments
 (0)