1 /**************************************************************************************************/
3 \defgroup version_control_gr Version Control
4 \brief Version \#define symbols for CMSIS release specific C/C++ source code
6 The header file <b>cmsis_version.h</b> is included by each core header so that these definitions are available.
10 #if defined(__CM_CMSIS_VERSION) && \
11 (__CM_CMSIS_VERSION >= 0x00050001)
12 #error Yes, we have CMSIS 5.1 or later
14 #error We need CMSIS 5.1 or later!
21 \brief Contains the CMSIS major version
22 \details The CMSIS major version can be used to differentiate between CMSIS major releases.
24 #define __CM_CMSIS_VERSION_MAIN
27 \brief Contains the CMSIS minor version
28 \details The CMSIS minor version can be used to query a CMSIS release update level.
30 #define __CM_CMSIS_VERSION_SUB
33 \brief Contains the CMSIS version
34 \details The CMSIS version is a combination of the \ref __CM_CMSIS_VERSION_MAIN (bits 31..15) and \ref __CM_CMSIS_VERSION_SUB (bits 14..0).
36 #define __CM_CMSIS_VERSION
39 \brief Contains the core version for a Cortex-M class controller.
40 \details This define can be used to differentiate between the various available Cortex-M controllers.
42 - 0 for a Cortex-M0 or Cortex-M0+
49 This define is only available for Cortex-M class controllers.
52 #if defined(__CORTEX_M) && (__CORTEX_M == 4)
53 #error Yes, we have an Cortex-M4 controller.
55 #error We need a Cortex-M4 controller!
62 \brief Contains the core version for a Cortex Secure Core controller.
63 \details This define can be used to differentiate between the various available Cortex Secure Core controllers.
65 - 000 for a Cortex-SC000
66 - 300 for a Cortex-SC300
68 This define is only available for Cortex Secure Core controllers.
71 #if defined(__CORTEX_SC) && (__CORTEX_SC == 300U)
72 #error Yes, we have an Cortex SC300 controller.
74 #error We need a Cortex SC300 controller!
81 \defgroup version_control_depricated_gr Version Control per Core (Depricated)
82 \brief Version \#define symbols for CMSIS release specific C/C++ source code
84 Prior CMSIS release 5.1.0 the version information was core specific.
88 #if !defined(__CM_CMSIS_VERSION) && defined(__CORTEX_M)
89 #if ((__CORTEX_M == 0) && (__CM0_CMSIS_VERSION >= 0x00050000)) || \
90 ((__CORTEX_M == 3) && (__CM3_CMSIS_VERSION >= 0x00050000)) || \
91 ((__CORTEX_M == 4) && (__CM4_CMSIS_VERSION >= 0x00050000)) || \
92 ((__CORTEX_M == 7) && (__CM7_CMSIS_VERSION >= 0x00050000))
93 #error Yes, we have CMSIS 5!
95 #error We need CMSIS 5!
98 #error We need a Cortex-M controller!
105 \brief Contains the CMSIS major version for core of type XXX, i.e. CM0 or SC300.
106 \details The CMSIS major version can be used to differentiate between CMSIS major releases.
107 \deprecated Only rely on this define for CMSIS 5.0 and before.
109 #define __XXX_CMSIS_VERSION_MAIN
112 \brief Contains the CMSIS minor version for core of type XXX, i.e. CM0 or SC300.
113 \details The CMSIS minor version can be used to query a CMSIS release update level.
114 \deprecated Only rely on this define for CMSIS 5.0 and before.
116 #define __XXX_CMSIS_VERSION_SUB
119 \brief Contains the CMSIS version for core of type XXX, i.e. CM0 or SC300.
120 \details The CMSIS version is a combination of the \ref __CM_CMSIS_VERSION_MAIN (bits 31..15) and \ref __CM_CMSIS_VERSION_SUB (bits 14..0).
121 \deprecated Only rely on this define for CMSIS 5.0 and before.
123 #define __XXX_CMSIS_VERSION