]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Core/src/Ref_VersionControl.txt
Recommend to call SystemCoreClockUpdate() after .BSS initialization.
[cmsis] / CMSIS / DoxyGen / Core / src / Ref_VersionControl.txt
1 /**************************************************************************************************/
2 /**
3 \defgroup   version_control_gr    Version Control
4 \brief      Version \#define symbols for CMSIS release specific C/C++ source code
5 \details
6 The header file <b>cmsis_version.h</b> is included by each core header so that these definitions are available. 
7
8 <b>Code Example:</b>
9 \code
10 #if defined(__CM_CMSIS_VERSION) && \
11     (__CM_CMSIS_VERSION >= 0x00050001)
12 #error Yes, we have CMSIS 5.1 or later
13 #else
14 #error We need CMSIS 5.1 or later!
15 #endif
16 \endcode
17 @{
18 */
19
20 /**
21 \brief Contains the CMSIS major version
22 \details The CMSIS major version can be used to differentiate between CMSIS major releases.
23 */
24 #define __CM_CMSIS_VERSION_MAIN
25
26 /**
27 \brief Contains the CMSIS minor version
28 \details The CMSIS minor version can be used to query a CMSIS release update level.
29 */
30 #define __CM_CMSIS_VERSION_SUB
31
32 /**
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).
35 */
36 #define __CM_CMSIS_VERSION
37
38 /**
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.
41 Possible values are:
42  - 0 for a Cortex-M0 or Cortex-M0+
43  - 3 for a Cortex-M3
44  - 4 for a Cortex-M4
45  - 7 for a Cortex-M7
46 \if ARMv8M
47  - 23 for a Cortex-M23
48  - 33 for a Cortex-M33
49  - 35 for a Cortex-M35P
50 \endif 
51
52 This define is only available for Cortex-M class controllers.
53 <b>Code Example:</b>
54 \code
55 #if defined(__CORTEX_M) && (__CORTEX_M == 4)
56 #error Yes, we have an Cortex-M4 controller.
57 #else
58 #error We need a Cortex-M4 controller!
59 #endif
60 \endcode
61 */
62 #define __CORTEX_M
63
64
65 /**
66 \cond (ARMSC)
67 */
68
69 /**
70 \brief Contains the core version for a Cortex Secure Core controller.
71 \details This define can be used to differentiate between the various available Cortex Secure Core controllers.
72 Possible values are:
73  - 000 for a Cortex-SC000
74  - 300 for a Cortex-SC300
75  
76 This define is only available for Cortex Secure Core controllers.
77 <b>Code Example:</b>
78 \code
79 #if defined(__CORTEX_SC) && (__CORTEX_SC == 300U)
80 #error Yes, we have an Cortex SC300 controller.
81 #else
82 #error We need a Cortex SC300 controller!
83 #endif
84 \endcode
85 */
86 #define __CORTEX_SC
87 /**
88 \endcond
89 */
90
91 /**
92 \defgroup   version_control_depricated_gr    Version Control per Core (Depricated)
93 \brief      Version \#define symbols for CMSIS release specific C/C++ source code
94 \details
95 Prior CMSIS release 5.1.0 the version information was core specific.
96
97 <b>Code Example:</b>
98 \code
99 #if !defined(__CM_CMSIS_VERSION) && defined(__CORTEX_M)
100 #if ((__CORTEX_M == 0) && (__CM0_CMSIS_VERSION >= 0x00050000)) || \
101     ((__CORTEX_M == 3) && (__CM3_CMSIS_VERSION >= 0x00050000)) || \
102     ((__CORTEX_M == 4) && (__CM4_CMSIS_VERSION >= 0x00050000)) || \
103     ((__CORTEX_M == 7) && (__CM7_CMSIS_VERSION >= 0x00050000))
104 #error Yes, we have CMSIS 5!
105 #else
106 #error We need CMSIS 5!
107 #endif
108 #else
109 #error We need a Cortex-M controller!
110 #endif
111 \endcode
112 @{
113 */
114
115 /**
116 \brief Contains the CMSIS major version for core of type XXX, i.e. CM0 or SC300.
117 \details The CMSIS major version can be used to differentiate between CMSIS major releases.
118 \deprecated Only rely on this define for CMSIS 5.0 and before.
119 */
120 #define __XXX_CMSIS_VERSION_MAIN
121
122 /**
123 \brief Contains the CMSIS minor version for core of type XXX, i.e. CM0 or SC300.
124 \details The CMSIS minor version can be used to query a CMSIS release update level.
125 \deprecated Only rely on this define for CMSIS 5.0 and before.
126 */
127 #define __XXX_CMSIS_VERSION_SUB
128
129 /**
130 \brief Contains the CMSIS version for core of type XXX, i.e. CM0 or SC300.
131 \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).
132 \deprecated Only rely on this define for CMSIS 5.0 and before.
133 */
134 #define __XXX_CMSIS_VERSION
135
136 /**
137 @}
138 */
139
140 /**
141 @}
142 */