Skip to content

Commit 43b98cf

Browse files
committed
Fix Greentea test code with Cortex-M23/M33
Enlarge stack size of forked thread for Cortex-M23/M33 targets
1 parent c382e96 commit 43b98cf

File tree

7 files changed

+25
-1
lines changed

7 files changed

+25
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929

3030
using utest::v1::Case;
3131

32+
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
33+
#define TEST_STACK_SIZE 512
34+
#else
3235
#define TEST_STACK_SIZE 256
36+
#endif
3337
#define ONE_MILLI_SEC 1000
3438

3539
volatile uint32_t elapsed_time_ms = 0;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ using utest::v1::Case;
3030
#error [NOT_SUPPORTED] test not supported
3131
#endif
3232

33+
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
34+
#define THREAD_STACK_SIZE 512
35+
#else
3336
#define THREAD_STACK_SIZE 320 /* 512B stack on GCC_ARM compiler cause out of memory on some 16kB RAM boards e.g. NUCLEO_F070RB */
37+
#endif
3438

3539
#define MAX_FLAG_POS 30
3640
#define PROHIBITED_FLAG_POS 31

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929

3030
using namespace utest::v1;
3131

32+
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
33+
#define THREAD_STACK_SIZE 512
34+
#else
3235
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/
36+
#endif
3337
#define QUEUE_SIZE 16
3438
#define THREAD_1_ID 1
3539
#define THREAD_2_ID 2

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ volatile bool thread_should_continue = true;
3737

3838
#if defined(__CORTEX_A9)
3939
#define THREAD_STACK_SIZE 512
40+
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
41+
#define THREAD_STACK_SIZE 512
4042
#else
4143
#define THREAD_STACK_SIZE 256
4244
#endif

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929

3030
using namespace utest::v1;
3131

32+
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
33+
#define TEST_STACK_SIZE 768
34+
#else
3235
#define TEST_STACK_SIZE 512
36+
#endif
3337

3438
#define TEST_LONG_DELAY 20
3539
#define TEST_DELAY 10

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#define THREAD_STACK_SIZE 512
3333
#if defined(__CORTEX_A9)
3434
#define PARALLEL_THREAD_STACK_SIZE 512
35+
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
36+
#define PARALLEL_THREAD_STACK_SIZE 512
3537
#else
3638
#define PARALLEL_THREAD_STACK_SIZE 384
3739
#endif

features/nvstore/TESTS/nvstore/functionality/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ static const int thr_test_num_secs = 5;
4343
static const int thr_test_max_data_size = 32;
4444
static const int thr_test_num_threads = 3;
4545

46+
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
47+
static const int thr_test_min_stack_size = 1280;
48+
static const int thr_test_max_stack_size = 1280;
49+
#else
4650
static const int thr_test_min_stack_size = 768;
4751
static const int thr_test_max_stack_size = 1024;
48-
52+
#endif
4953

5054
typedef struct {
5155
uint8_t *buffs[max_test_keys][thr_test_num_buffs];

0 commit comments

Comments
 (0)