Skip to content

Commit 07b0e84

Browse files
Deepikaadbridge
authored andcommitted
Set main thread stack size as 3K for constrained targets
1 parent 0d5166c commit 07b0e84

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
@@ -137,4 +137,11 @@ extern uint32_t __HeapLimit[];
137137
#define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit))
138138
#endif
139139

140+
#if (defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB))
141+
#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
142+
#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE
143+
#endif
144+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072
145+
#endif
146+
140147
#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)