From 07b0e8462290706fa764ab3735ad9bf4fda6b28c Mon Sep 17 00:00:00 2001 From: Deepika Date: Fri, 28 Sep 2018 11:14:43 -0500 Subject: [PATCH] Set main thread stack size as 3K for constrained targets --- targets/TARGET_NUVOTON/mbed_rtx.h | 7 +++++++ targets/TARGET_STM/mbed_rtx.h | 7 +++++++ targets/TARGET_TOSHIBA/mbed_rtx.h | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/targets/TARGET_NUVOTON/mbed_rtx.h b/targets/TARGET_NUVOTON/mbed_rtx.h index 137e4c1a24..1b4e2b4986 100644 --- a/targets/TARGET_NUVOTON/mbed_rtx.h +++ b/targets/TARGET_NUVOTON/mbed_rtx.h @@ -45,6 +45,13 @@ #error "no toolchain defined" #endif +#if defined(TARGET_NANO100) +#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#endif +#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072 +#endif + #endif // TARGET_NUVOTON #endif // MBED_MBED_RTX_H diff --git a/targets/TARGET_STM/mbed_rtx.h b/targets/TARGET_STM/mbed_rtx.h index 2d1271a368..48cb950a20 100644 --- a/targets/TARGET_STM/mbed_rtx.h +++ b/targets/TARGET_STM/mbed_rtx.h @@ -137,4 +137,11 @@ extern uint32_t __HeapLimit[]; #define ISR_STACK_SIZE ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit)) #endif +#if (defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB)) +#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#endif +#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072 +#endif + #endif // MBED_MBED_RTX_H diff --git a/targets/TARGET_TOSHIBA/mbed_rtx.h b/targets/TARGET_TOSHIBA/mbed_rtx.h index b6fe6163b8..bad006f505 100644 --- a/targets/TARGET_TOSHIBA/mbed_rtx.h +++ b/targets/TARGET_TOSHIBA/mbed_rtx.h @@ -22,6 +22,10 @@ #ifndef INITIAL_SP #define INITIAL_SP (0x20004000UL) #endif +#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#endif +#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072 #endif @@ -30,6 +34,10 @@ #ifndef INITIAL_SP #define INITIAL_SP (0x20080000UL) #endif +#ifdef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#undef MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE +#endif +#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 3072 #endif