From d2e683cc1e895231cb785f729b23d08d8f26e45c Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Mon, 25 Jul 2016 11:57:26 +0100 Subject: [PATCH 1/2] Bring missing stack definitions for various targets. Those definitions where available in libraries/test/rtos/mbed/* tests but not in TESTS/mbedmicro-rtos-mbed/* tests. --- TESTS/mbedmicro-rtos-mbed/basic/main.cpp | 9 +++++++++ TESTS/mbedmicro-rtos-mbed/isr/main.cpp | 8 ++++++++ TESTS/mbedmicro-rtos-mbed/mail/main.cpp | 8 ++++++++ TESTS/mbedmicro-rtos-mbed/mutex/main.cpp | 8 ++++++++ TESTS/mbedmicro-rtos-mbed/queue/main.cpp | 8 ++++++++ TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp | 8 ++++++++ TESTS/mbedmicro-rtos-mbed/signals/main.cpp | 8 ++++++++ 7 files changed, 57 insertions(+) diff --git a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp index c98d4c9a642..5e2ba079c5d 100644 --- a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp @@ -13,6 +13,15 @@ #define STACK_SIZE DEFAULT_STACK_SIZE/2 #elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) +#define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) +#define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) +#define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) +#define STACK_SIZE 512 +#else #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif diff --git a/TESTS/mbedmicro-rtos-mbed/isr/main.cpp b/TESTS/mbedmicro-rtos-mbed/isr/main.cpp index ec16a4ea7ab..34ef68aef35 100644 --- a/TESTS/mbedmicro-rtos-mbed/isr/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/isr/main.cpp @@ -16,6 +16,14 @@ #define STACK_SIZE DEFAULT_STACK_SIZE/4 #elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) + #define STACK_SIZE 512 #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif diff --git a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp index 60e51174107..494ae191ccc 100644 --- a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp @@ -24,6 +24,14 @@ typedef struct { #define STACK_SIZE DEFAULT_STACK_SIZE/2 #elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) + #define STACK_SIZE 512 #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif diff --git a/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp b/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp index bbd29dec2e5..86cadb575fb 100644 --- a/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp @@ -26,6 +26,14 @@ #define STACK_SIZE DEFAULT_STACK_SIZE/2 #elif defined(TARGET_STM32F303K8) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) + #define STACK_SIZE 512 #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif diff --git a/TESTS/mbedmicro-rtos-mbed/queue/main.cpp b/TESTS/mbedmicro-rtos-mbed/queue/main.cpp index 98dd5e13f6f..a2f9c8ef35c 100644 --- a/TESTS/mbedmicro-rtos-mbed/queue/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/queue/main.cpp @@ -24,6 +24,14 @@ typedef struct { #define STACK_SIZE DEFAULT_STACK_SIZE/4 #elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) + #define STACK_SIZE 512 #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif diff --git a/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp b/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp index 2024a0286ef..b36c4b7d484 100644 --- a/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp @@ -29,6 +29,14 @@ #define STACK_SIZE DEFAULT_STACK_SIZE/2 #elif defined(TARGET_STM32F303K8) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/4 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) + #define STACK_SIZE 512 #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif diff --git a/TESTS/mbedmicro-rtos-mbed/signals/main.cpp b/TESTS/mbedmicro-rtos-mbed/signals/main.cpp index 866b67d0eb6..11cd3ff170b 100644 --- a/TESTS/mbedmicro-rtos-mbed/signals/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/signals/main.cpp @@ -15,6 +15,14 @@ const int SIGNAL_HANDLE_DELEY = 25; #define STACK_SIZE DEFAULT_STACK_SIZE/4 #elif (defined(TARGET_STM32F030R8)) && defined(TOOLCHAIN_IAR) #define STACK_SIZE DEFAULT_STACK_SIZE/2 +#elif (defined(TARGET_EFM32HG_STK3400)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 512 +#elif (defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32PG_STK3401)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 768 +#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO) + #define STACK_SIZE 1536 +#elif defined(TARGET_MCU_NRF51822) + #define STACK_SIZE 512 #else #define STACK_SIZE DEFAULT_STACK_SIZE #endif From 1752f23ff808772356c1c4354dae50dfb91ce407 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Mon, 25 Jul 2016 13:24:57 +0100 Subject: [PATCH 2/2] Remove double #else statement --- TESTS/mbedmicro-rtos-mbed/basic/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp index 5e2ba079c5d..ee61cbc4efd 100644 --- a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp @@ -22,7 +22,6 @@ #elif defined(TARGET_MCU_NRF51822) #define STACK_SIZE 512 #else -#else #define STACK_SIZE DEFAULT_STACK_SIZE #endif