From e821c4da6ffb311f0086d898f03aedca176bc0f4 Mon Sep 17 00:00:00 2001 From: int_szyk Date: Wed, 4 Sep 2019 13:54:36 +0200 Subject: [PATCH] Change stack sizes. Change stack sizes in test stats_cpu and mbedmicro-rtos-mbed-threads. The value 384 was declared to make this test pass on STM32F070RB, but its main stack value has been changed to 3KB so now it passes this test with 512 stack size. The change was needed to make GR_LYCHEE pass this test on ARM compiler. --- TESTS/mbed_platform/stats_cpu/main.cpp | 6 ++++++ TESTS/mbedmicro-rtos-mbed/threads/main.cpp | 12 ++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/TESTS/mbed_platform/stats_cpu/main.cpp b/TESTS/mbed_platform/stats_cpu/main.cpp index 348da30821..1a3818293d 100644 --- a/TESTS/mbed_platform/stats_cpu/main.cpp +++ b/TESTS/mbed_platform/stats_cpu/main.cpp @@ -29,7 +29,13 @@ using namespace utest::v1; DigitalOut led1(LED1); +// Targets with these cores have their RAM enough size to create threads with bigger stacks +#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(__CORTEX_M7) +#define MAX_THREAD_STACK 512 +#else #define MAX_THREAD_STACK 384 +#endif + #define SAMPLE_TIME 1000 // msec #define LOOP_TIME 2000 // msec diff --git a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp index 470a9f081f..c66e9fb030 100644 --- a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp @@ -26,18 +26,14 @@ #else #define THREAD_STACK_SIZE 512 -#if defined(__CORTEX_A9) +#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(TARGET_ARM_FM) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA) #define PARALLEL_THREAD_STACK_SIZE 512 -#elif defined(__CORTEX_M23) || defined(__CORTEX_M33) -#define PARALLEL_THREAD_STACK_SIZE 512 -#elif defined(TARGET_ARM_FM) -#define PARALLEL_THREAD_STACK_SIZE 512 -#elif defined(TARGET_CY8CKIT_062_WIFI_BT_PSA) -#define PARALLEL_THREAD_STACK_SIZE 512 +#define CHILD_THREAD_STACK_SIZE 512 #else #define PARALLEL_THREAD_STACK_SIZE 384 -#endif #define CHILD_THREAD_STACK_SIZE 384 +#endif + using namespace utest::v1;