From 10d2b58d1ec5c8ea946e397eca4809cf3b61c53f Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Thu, 26 May 2016 09:22:24 -0500 Subject: [PATCH 1/3] Pull up on config store enough to fix IAR Pull up on the configuration-store repo enough to fix IAR. This patch does not pull up to master on since this has broken tests which do not compile. --- core/configuration-store.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/configuration-store.lib b/core/configuration-store.lib index 8508dbcb8b..584d86db5a 100644 --- a/core/configuration-store.lib +++ b/core/configuration-store.lib @@ -1 +1 @@ -https://github.com/ARMmbed/configuration-store/#f0a4c07cce8c84513f528e5939c5a1469385d2a8 +https://github.com/ARMmbed/configuration-store/#3e5d635ba44915b45fd575905296e587a5f0d18e From bb17d6ada9b4e582df574d04c87e6d73945dd5d7 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Thu, 26 May 2016 17:37:43 -0500 Subject: [PATCH 2/3] Rename disassembly file to fix testing with IAR Disassembly files can unintentionally get picked up by the test build system. This patch changes the file extension on those files from ".s" to ".s.txt" so they are ignored. --- tools/toolchains/iar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index bef166cbde..9e233fc400 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -104,7 +104,7 @@ class IAR(mbedToolchain): def cc_extra(self, object): base, _ = splitext(object) - return ["-l", base + '.s'] + return ["-l", base + '.s.txt'] def get_compile_options(self, defines, includes): return ['-D%s' % d for d in defines] + ['-f', self.get_inc_file(includes)] From caa88ba9f4cc3bf564f25126a58a21041af70ac1 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Thu, 26 May 2016 17:40:03 -0500 Subject: [PATCH 3/3] More IAR test fixes Make the following changes: -Fix keyword used in forced inline pragma -Move alignment test variables off of the stack since alignment there is platform dependent. --- hal/TESTS/api/toolchain/attributes.c | 21 ++++++++++----------- hal/api/toolchain.h | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/hal/TESTS/api/toolchain/attributes.c b/hal/TESTS/api/toolchain/attributes.c index 196d968c1c..25c0df7294 100644 --- a/hal/TESTS/api/toolchain/attributes.c +++ b/hal/TESTS/api/toolchain/attributes.c @@ -19,29 +19,28 @@ int testPacked() { return failed; } +ALIGN(8) static char a_align_test; +ALIGN(8) static char b_align_test; +ALIGN(16)static char c_align_test; +ALIGN(8) static char d_align_test; +ALIGN(16)static char e_align_test; int testAlign() { int failed = 0; - ALIGN(8) char a; - ALIGN(8) char b; - ALIGN(16) char c; - ALIGN(8) char d; - ALIGN(16) char e; - - if(((uintptr_t)&a) & 0x7){ + if(((uintptr_t)&a_align_test) & 0x7){ failed++; } - if(((uintptr_t)&b) & 0x7){ + if(((uintptr_t)&b_align_test) & 0x7){ failed++; } - if(((uintptr_t)&c) & 0xf){ + if(((uintptr_t)&c_align_test) & 0xf){ failed++; } - if(((uintptr_t)&d) & 0x7){ + if(((uintptr_t)&d_align_test) & 0x7){ failed++; } - if(((uintptr_t)&e) & 0xf){ + if(((uintptr_t)&e_align_test) & 0xf){ failed++; } diff --git a/hal/api/toolchain.h b/hal/api/toolchain.h index b8756d206c..6baa6bd51a 100644 --- a/hal/api/toolchain.h +++ b/hal/api/toolchain.h @@ -146,7 +146,7 @@ #if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM) #define FORCEINLINE static inline __attribute__((always_inline)) #elif defined(__ICCARM__) -#define FORCEINLINE _Pragma("inline=force") static +#define FORCEINLINE _Pragma("inline=forced") static #else #define FORCEINLINE static inline #endif