Skip to content

Commit e821c4d

Browse files
committed
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.
1 parent 5674797 commit e821c4d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

TESTS/mbed_platform/stats_cpu/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ using namespace utest::v1;
2929

3030
DigitalOut led1(LED1);
3131

32+
// Targets with these cores have their RAM enough size to create threads with bigger stacks
33+
#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(__CORTEX_M7)
34+
#define MAX_THREAD_STACK 512
35+
#else
3236
#define MAX_THREAD_STACK 384
37+
#endif
38+
3339
#define SAMPLE_TIME 1000 // msec
3440
#define LOOP_TIME 2000 // msec
3541

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,14 @@
2626
#else
2727

2828
#define THREAD_STACK_SIZE 512
29-
#if defined(__CORTEX_A9)
29+
#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(TARGET_ARM_FM) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
3030
#define PARALLEL_THREAD_STACK_SIZE 512
31-
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
32-
#define PARALLEL_THREAD_STACK_SIZE 512
33-
#elif defined(TARGET_ARM_FM)
34-
#define PARALLEL_THREAD_STACK_SIZE 512
35-
#elif defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
36-
#define PARALLEL_THREAD_STACK_SIZE 512
31+
#define CHILD_THREAD_STACK_SIZE 512
3732
#else
3833
#define PARALLEL_THREAD_STACK_SIZE 384
39-
#endif
4034
#define CHILD_THREAD_STACK_SIZE 384
35+
#endif
36+
4137

4238
using namespace utest::v1;
4339

0 commit comments

Comments
 (0)