CMSIS-Core (Cortex-M)  Version 5.1.2
CMSIS-Core support for Cortex-M processor-based devices
 All Data Structures Files Functions Variables Enumerations Enumerator Groups Pages
Version Control per Core (Depricated)

Version #define symbols for CMSIS release specific C/C++ source code. More...

Macros

#define __XXX_CMSIS_VERSION_MAIN
 Contains the CMSIS major version for core of type XXX, i.e. CM0 or SC300. More...
 
#define __XXX_CMSIS_VERSION_SUB
 Contains the CMSIS minor version for core of type XXX, i.e. CM0 or SC300. More...
 
#define __XXX_CMSIS_VERSION
 Contains the CMSIS version for core of type XXX, i.e. CM0 or SC300. More...
 

Description

Prior CMSIS release 5.1.0 the version information was core specific.

Code Example:

#if !defined(__CM_CMSIS_VERSION) && defined(__CORTEX_M)
#if ((__CORTEX_M == 0) && (__CM0_CMSIS_VERSION >= 0x00050000)) || \
((__CORTEX_M == 3) && (__CM3_CMSIS_VERSION >= 0x00050000)) || \
((__CORTEX_M == 4) && (__CM4_CMSIS_VERSION >= 0x00050000)) || \
((__CORTEX_M == 7) && (__CM7_CMSIS_VERSION >= 0x00050000))
#error Yes, we have CMSIS 5!
#else
#error We need CMSIS 5!
#endif
#else
#error We need a Cortex-M controller!
#endif

Macro Definition Documentation

#define __XXX_CMSIS_VERSION

The CMSIS version is a combination of the __CM_CMSIS_VERSION_MAIN (bits 31..15) and __CM_CMSIS_VERSION_SUB (bits 14..0).

Deprecated:
Only rely on this define for CMSIS 5.0 and before.
#define __XXX_CMSIS_VERSION_MAIN

The CMSIS major version can be used to differentiate between CMSIS major releases.

Deprecated:
Only rely on this define for CMSIS 5.0 and before.
#define __XXX_CMSIS_VERSION_SUB

The CMSIS minor version can be used to query a CMSIS release update level.

Deprecated:
Only rely on this define for CMSIS 5.0 and before.