From 4318a0747f41e35e20718ac543390906c0afe98d Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Wed, 25 Mar 2020 18:22:00 +0000 Subject: [PATCH] Tests: Remove support for ARM Compiler 5 ARM Compiler 5 is no longer actively supported and was superseded in Mbed OS by ARM Compiler 6. --- TESTS/mbed_hal/flash/functional_tests/main.cpp | 16 ++-------------- TESTS/mbed_hal/spm/main.cpp | 4 ++-- UNITTESTS/target_h/platform/mbed_assert.h | 2 +- .../frameworks/unity/unity/unity_internals.h | 4 +--- features/frameworks/utest/utest/utest_shim.h | 4 +--- 5 files changed, 7 insertions(+), 23 deletions(-) diff --git a/TESTS/mbed_hal/flash/functional_tests/main.cpp b/TESTS/mbed_hal/flash/functional_tests/main.cpp index 34063d4a61..b6dcc5d3e5 100644 --- a/TESTS/mbed_hal/flash/functional_tests/main.cpp +++ b/TESTS/mbed_hal/flash/functional_tests/main.cpp @@ -55,19 +55,7 @@ static void erase_range(flash_t *flash, uint32_t addr, uint32_t size) size = size > sector_size ? size - sector_size : 0; } } -#ifdef __CC_ARM -MBED_NOINLINE -__asm static void delay_loop(uint32_t count) -{ -// AStyle should not format inline assembly -// *INDENT-OFF* -1 - SUBS a1, a1, #1 - BCS %BT1 - BX lr -// *INDENT-ON* -} -#elif defined (__ICCARM__) +#if defined (__ICCARM__) MBED_NOINLINE static void delay_loop(uint32_t count) { @@ -80,7 +68,7 @@ static void delay_loop(uint32_t count) : "cc" ); } -#elif defined ( __GNUC__ ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) +#elif defined ( __GNUC__ ) || defined(__ARMCC_VERSION) MBED_NOINLINE static void delay_loop(uint32_t count) { diff --git a/TESTS/mbed_hal/spm/main.cpp b/TESTS/mbed_hal/spm/main.cpp index cdf8b27757..2e8e235940 100644 --- a/TESTS/mbed_hal/spm/main.cpp +++ b/TESTS/mbed_hal/spm/main.cpp @@ -19,7 +19,7 @@ #error [NOT_SUPPORTED] Test supported only on PSA targets #else -#if (defined( __CC_ARM ) || defined(__ARMCC_VERSION) || defined( __ICCARM__ )) +#if (defined(__ARMCC_VERSION) || defined( __ICCARM__ )) #error [NOT_SUPPORTED] this test is supported on GCC only #else @@ -158,5 +158,5 @@ int main() } #endif // DOMAIN_NS == 1 -#endif // (defined( __CC_ARM ) || defined(__ARMCC_VERSION) || defined( __ICCARM__ )) +#endif // (defined(__ARMCC_VERSION) || defined( __ICCARM__ )) #endif // !defined(COMPONENT_PSA_SRV_IPC) diff --git a/UNITTESTS/target_h/platform/mbed_assert.h b/UNITTESTS/target_h/platform/mbed_assert.h index a8ff37564b..c52c452abe 100644 --- a/UNITTESTS/target_h/platform/mbed_assert.h +++ b/UNITTESTS/target_h/platform/mbed_assert.h @@ -106,7 +106,7 @@ do { \ #elif defined(__cplusplus) && defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) \ && (__GNUC__*100 + __GNUC_MINOR__) > 403L #define MBED_STATIC_ASSERT(expr, msg) __extension__ static_assert(expr, msg) -#elif !defined(__cplusplus) && defined(__GNUC__) && !defined(__CC_ARM) \ +#elif !defined(__cplusplus) && defined(__GNUC__) \ && (__GNUC__*100 + __GNUC_MINOR__) > 406L #define MBED_STATIC_ASSERT(expr, msg) __extension__ _Static_assert(expr, msg) #elif defined(__ICCARM__) diff --git a/features/frameworks/unity/unity/unity_internals.h b/features/frameworks/unity/unity/unity_internals.h index 337e9f30cc..8a9de63e24 100644 --- a/features/frameworks/unity/unity/unity_internals.h +++ b/features/frameworks/unity/unity/unity_internals.h @@ -227,9 +227,7 @@ typedef _US64 _U_SINT; #endif typedef UNITY_FLOAT_TYPE _UF; -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) -#else - +#if !defined(__ARMCC_VERSION) #ifndef isinf #define isinf(n) (((1.0f / f_zero) == n) ? 1 : 0) || (((-1.0f / f_zero) == n) ? 1 : 0) #define UNITY_FLOAT_NEEDS_ZERO diff --git a/features/frameworks/utest/utest/utest_shim.h b/features/frameworks/utest/utest/utest_shim.h index 7f084223b2..34ec7d1df9 100644 --- a/features/frameworks/utest/utest/utest_shim.h +++ b/features/frameworks/utest/utest/utest_shim.h @@ -28,9 +28,7 @@ #include "utest/utest_scheduler.h" #ifndef __deprecated_message -# if defined(__CC_ARM) -# define __deprecated_message(msg) __attribute__((deprecated)) -# elif defined (__ICCARM__) +# if defined (__ICCARM__) # define __deprecated_message(msg) # else # define __deprecated_message(msg) __attribute__((deprecated(msg)))