Fix Greentea test code with Cortex-M23/M33

Enlarge stack size of forked thread for Cortex-M23/M33 targets
pull/7302/head
ccli8 2018-03-05 18:07:09 +08:00
parent c382e9642e
commit 43b98cf405
7 changed files with 25 additions and 1 deletions

View File

@ -29,7 +29,11 @@
using utest::v1::Case;
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define TEST_STACK_SIZE 512
#else
#define TEST_STACK_SIZE 256
#endif
#define ONE_MILLI_SEC 1000
volatile uint32_t elapsed_time_ms = 0;

View File

@ -30,7 +30,11 @@ using utest::v1::Case;
#error [NOT_SUPPORTED] test not supported
#endif
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 320 /* 512B stack on GCC_ARM compiler cause out of memory on some 16kB RAM boards e.g. NUCLEO_F070RB */
#endif
#define MAX_FLAG_POS 30
#define PROHIBITED_FLAG_POS 31

View File

@ -29,7 +29,11 @@
using namespace utest::v1;
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/
#endif
#define QUEUE_SIZE 16
#define THREAD_1_ID 1
#define THREAD_2_ID 2

View File

@ -37,6 +37,8 @@ volatile bool thread_should_continue = true;
#if defined(__CORTEX_A9)
#define THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 256
#endif

View File

@ -29,7 +29,11 @@
using namespace utest::v1;
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define TEST_STACK_SIZE 768
#else
#define TEST_STACK_SIZE 512
#endif
#define TEST_LONG_DELAY 20
#define TEST_DELAY 10

View File

@ -32,6 +32,8 @@
#define THREAD_STACK_SIZE 512
#if defined(__CORTEX_A9)
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(__CORTEX_M23) || defined(__CORTEX_M33)
#define PARALLEL_THREAD_STACK_SIZE 512
#else
#define PARALLEL_THREAD_STACK_SIZE 384
#endif

View File

@ -43,9 +43,13 @@ static const int thr_test_num_secs = 5;
static const int thr_test_max_data_size = 32;
static const int thr_test_num_threads = 3;
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
static const int thr_test_min_stack_size = 1280;
static const int thr_test_max_stack_size = 1280;
#else
static const int thr_test_min_stack_size = 768;
static const int thr_test_max_stack_size = 1024;
#endif
typedef struct {
uint8_t *buffs[max_test_keys][thr_test_num_buffs];