cmsis: Update includes to those of CMSIS v5.6.0
Update CMSIS includes to those of the latest CMSIS
release (v5.6.0) to get the support for ARMv8.1-M
Mainline architecture.
Change-Id: Ifc29a0539989f08d2fb805b72294431b26b82cda
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
diff --git a/platform/ext/cmsis/cmsis_compiler.h b/platform/ext/cmsis/cmsis_compiler.h
index 5a828c3..adbf296 100644
--- a/platform/ext/cmsis/cmsis_compiler.h
+++ b/platform/ext/cmsis/cmsis_compiler.h
@@ -1,11 +1,11 @@
/**************************************************************************//**
* @file cmsis_compiler.h
* @brief CMSIS compiler generic header file
- * @version V5.0.2
- * @date 13. February 2017
+ * @version V5.1.0
+ * @date 09. October 2018
******************************************************************************/
/*
- * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -28,16 +28,22 @@
#include <stdint.h>
/*
- * ARM Compiler 4/5
+ * Arm Compiler 4/5
*/
#if defined ( __CC_ARM )
#include "cmsis_armcc.h"
/*
- * ARM Compiler 6 (armclang)
+ * Arm Compiler 6.6 LTM (armclang)
*/
-#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
+#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) && (__ARMCC_VERSION < 6100100)
+ #include "cmsis_armclang_ltm.h"
+
+ /*
+ * Arm Compiler above 6.10.1 (armclang)
+ */
+#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
#include "cmsis_armclang.h"
@@ -52,100 +58,11 @@
* IAR Compiler
*/
#elif defined ( __ICCARM__ )
-
-
- #ifndef __ASM
- #define __ASM __asm
- #endif
- #ifndef __INLINE
- #define __INLINE inline
- #endif
- #ifndef __STATIC_INLINE
- #define __STATIC_INLINE static inline
- #endif
-
- #include <cmsis_iar.h>
-
- /* CMSIS compiler control architecture macros */
- #if (__CORE__ == __ARM6M__) || (__CORE__ == __ARM6SM__)
- #ifndef __ARM_ARCH_6M__
- #define __ARM_ARCH_6M__ 1
- #endif
- #elif (__CORE__ == __ARM7M__)
- #ifndef __ARM_ARCH_7M__
- #define __ARM_ARCH_7M__ 1
- #endif
- #elif (__CORE__ == __ARM7EM__)
- #ifndef __ARM_ARCH_7EM__
- #define __ARM_ARCH_7EM__ 1
- #endif
- #endif
-
- #ifndef __NO_RETURN
- #define __NO_RETURN __noreturn
- #endif
- #ifndef __USED
- #define __USED __root
- #endif
- #ifndef __WEAK
- #define __WEAK __weak
- #endif
- #ifndef __PACKED
- #define __PACKED __packed
- #endif
- #ifndef __PACKED_STRUCT
- #define __PACKED_STRUCT __packed struct
- #endif
- #ifndef __UNALIGNED_UINT32 /* deprecated */
- __packed struct T_UINT32 { uint32_t v; };
- #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
- #endif
- #ifndef __UNALIGNED_UINT16_WRITE
- __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
- #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
- #endif
- #ifndef __UNALIGNED_UINT16_READ
- __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
- #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
- #endif
- #ifndef __UNALIGNED_UINT32_WRITE
- __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
- #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
- #endif
- #ifndef __UNALIGNED_UINT32_READ
- __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
- #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
- #endif
- #ifndef __ALIGNED
- #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
- #define __ALIGNED(x)
- #endif
-
- // Workaround for missing __CLZ intrinsic in
- // various versions of the IAR compilers.
- // __IAR_FEATURE_CLZ__ should be defined by
- // the compiler that supports __CLZ internally.
- #if (defined (__ARM_ARCH_6M__)) && (__ARM_ARCH_6M__ == 1) && (!defined (__IAR_FEATURE_CLZ__))
- __STATIC_INLINE uint32_t __CLZ(uint32_t data)
- {
- if (data == 0u) { return 32u; }
-
- uint32_t count = 0;
- uint32_t mask = 0x80000000;
-
- while ((data & mask) == 0)
- {
- count += 1u;
- mask = mask >> 1u;
- }
-
- return (count);
- }
- #endif
+ #include <cmsis_iccarm.h>
/*
- * TI ARM Compiler
+ * TI Arm Compiler
*/
#elif defined ( __TI_ARM__ )
#include <cmsis_ccs.h>
@@ -159,6 +76,9 @@
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
+ #ifndef __STATIC_FORCEINLINE
+ #define __STATIC_FORCEINLINE __STATIC_INLINE
+ #endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
@@ -174,6 +94,9 @@
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __attribute__((packed))
#endif
+ #ifndef __PACKED_UNION
+ #define __PACKED_UNION union __attribute__((packed))
+ #endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
@@ -197,6 +120,13 @@
#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif
+ #ifndef __RESTRICT
+ #define __RESTRICT __restrict
+ #endif
+ #ifndef __COMPILER_BARRIER
+ #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
+ #define __COMPILER_BARRIER() (void)0
+ #endif
/*
@@ -218,6 +148,9 @@
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
+ #ifndef __STATIC_FORCEINLINE
+ #define __STATIC_FORCEINLINE __STATIC_INLINE
+ #endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
@@ -233,6 +166,9 @@
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __packed__
#endif
+ #ifndef __PACKED_UNION
+ #define __PACKED_UNION union __packed__
+ #endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __packed__ T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
@@ -256,6 +192,14 @@
#ifndef __ALIGNED
#define __ALIGNED(x) __align(x)
#endif
+ #ifndef __RESTRICT
+ #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
+ #define __RESTRICT
+ #endif
+ #ifndef __COMPILER_BARRIER
+ #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
+ #define __COMPILER_BARRIER() (void)0
+ #endif
/*
@@ -273,6 +217,9 @@
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
+ #ifndef __STATIC_FORCEINLINE
+ #define __STATIC_FORCEINLINE __STATIC_INLINE
+ #endif
#ifndef __NO_RETURN
// NO RETURN is automatically detected hence no warning here
#define __NO_RETURN
@@ -290,6 +237,9 @@
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT @packed struct
#endif
+ #ifndef __PACKED_UNION
+ #define __PACKED_UNION @packed union
+ #endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
@packed struct T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
@@ -314,6 +264,14 @@
#warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
#define __ALIGNED(x)
#endif
+ #ifndef __RESTRICT
+ #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
+ #define __RESTRICT
+ #endif
+ #ifndef __COMPILER_BARRIER
+ #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
+ #define __COMPILER_BARRIER() (void)0
+ #endif
#else