1 <!-- HTML header for doxygen 1.9.6-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=11"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>CMSIS-Core (Cortex-M): CMSIS-Core Files</title>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <script type="text/javascript" src="tabs.js"></script>
13 <script type="text/javascript" src="footer.js"></script>
14 <script type="text/javascript" src="navtree.js"></script>
15 <link href="navtree.css" rel="stylesheet" type="text/css"/>
16 <script type="text/javascript" src="resize.js"></script>
17 <script type="text/javascript" src="navtreedata.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="search/search.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="search/searchdata.js"></script>
21 <script type="text/javascript" src="search/search.js"></script>
22 <script type="text/javascript">
23 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
24 $(document).ready(function() { init_search(); });
27 <script type="text/javascript" src="darkmode_toggle.js"></script>
28 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
29 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
30 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
31 <link href="extra_tabs.css" rel="stylesheet" type="text/css"/>
32 <link href="version.css" rel="stylesheet" type="text/css"/>
33 <script type="text/javascript" src="../../version.js"></script>
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 55px;">
41 <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
42 <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
43 <div id="projectname">CMSIS-Core (Cortex-M)
44  <span id="projectnumber"><script type="text/javascript">
46 writeHeader.call(this);
47 writeVersionDropdown.call(this, "CMSIS-Core (Cortex-M)");
52 <div id="projectbrief">CMSIS-Core support for Cortex-M processor-based devices</div>
54 <td> <div id="MSearchBox" class="MSearchBoxInactive">
56 <span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
57 <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
58 onfocus="searchBox.OnSearchFieldFocus(true)"
59 onblur="searchBox.OnSearchFieldFocus(false)"
60 onkeyup="searchBox.OnSearchFieldChange(event)"/>
61 </span><span class="right">
62 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66 <!--END !PROJECT_NAME-->
71 <!-- end header part -->
72 <div id="CMSISnav" class="tabs1">
74 <script type="text/javascript">
75 writeComponentTabs.call(this);
79 <script type="text/javascript">
80 writeSubComponentTabs.call(this);
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
91 <div id="nav-tree-contents">
92 <div id="nav-sync" class="sync"></div>
95 <div id="splitbar" style="-moz-user-select:none;"
96 class="ui-resizable-handle">
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('cmsis_core_files.html',''); initResizable(); });
104 <div id="doc-content">
105 <!-- window showing the filter options -->
106 <div id="MSearchSelectWindow"
107 onmouseover="return searchBox.OnSearchSelectShow()"
108 onmouseout="return searchBox.OnSearchSelectHide()"
109 onkeydown="return searchBox.OnSearchSelectKey(event)">
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
117 <div id="SRResults"></div>
118 <div class="SRStatus" id="Loading">Loading...</div>
119 <div class="SRStatus" id="Searching">Searching...</div>
120 <div class="SRStatus" id="NoMatches">No Matches</div>
126 <div><div class="header">
127 <div class="headertitle"><div class="title">CMSIS-Core Files </div></div>
129 <div class="contents">
130 <div class="textblock"><p><a class="anchor" id="md_src_core_std_files"></a> CMSIS-Core files can be differentiated in two main groups:</p>
132 <li><a class="el" href="cmsis_core_files.html#cmsis_standard_files">CMSIS-Core Standard Files</a> are provided by Arm for supported CPU cores as part of the CMSIS-Core software component. These files typically do not require any modifications and are expected to be included via CMSIS-Core device files.</li>
133 <li><a class="el" href="cmsis_device_files.html">CMSIS-Core Device Files</a> are specified in CMSIS-Core methodology, and are typically provided by CPU device vendors to correctly cover their specific functionalities. Some of them may expect additional application-specific changes.</li>
135 <p>The detailed file structure of the CMSIS-Core files is shown in the following picture.</p>
137 <img src="CMSIS_CORE_Files.png" alt=""/>
138 <div class="caption">
139 CMSIS-Core File Structure</div></div>
140 <p><a class="el" href="cmsis_files_dfps.html">Delivery in CMSIS-Packs</a> explains how <a class="el" href="cmsis_core_files.html">CMSIS-Core Files</a> can be distributed in CMSIS-Pack format.</p>
141 <h1><a class="anchor" id="cmsis_standard_files"></a>
142 CMSIS-Core Standard Files</h1>
143 <p>The CMSIS-Core Standard file implement all attributes specific to Arm processor cores and generally do not need any modifications.</p>
144 <p>The files are provided by Arm as CMSIS-Core software component that is part of the <a href="../General/cmsis_pack.html">CMSIS Software pack</a>. The CMSIS-Core standard files can be split into following categories explained below:</p>
146 <li><a class="el" href="cmsis_core_files.html#cmsis_processor_files">CMSIS-Core Processor Files</a></li>
147 <li><a class="el" href="cmsis_core_files.html#cmsis_compiler_files">CMSIS-Core Compiler Files</a></li>
148 <li><a class="el" href="cmsis_core_files.html#cmsis_feature_files">CMSIS-Core Architecture Feature Files</a></li>
150 <h2><a class="anchor" id="cmsis_processor_files"></a>
151 CMSIS-Core Processor Files</h2>
152 <p>The CMSIS-Core processor files define the core peripherals and provide helper functions for their access.</p>
153 <p>The files have naming convention <code>core_<cpu>.h</code>, with one file available for each supported processor <code><cpu></code> as listed in the table below.</p>
154 <table class="markdownTable">
155 <tr class="markdownTableHead">
156 <th class="markdownTableHeadLeft">Header File </th><th class="markdownTableHeadLeft">Target Processor Core </th></tr>
157 <tr class="markdownTableRowOdd">
158 <td class="markdownTableBodyLeft">📂 CMSIS/Core/Include </td><td class="markdownTableBodyLeft">CMSIS-Core include folder (<a href="https://github.com/ARM-software/CMSIS_6/tree/main/CMSIS/Core/Include/">See on GitHub</a>) </td></tr>
159 <tr class="markdownTableRowEven">
160 <td class="markdownTableBodyLeft">┣ 📄 core_cm0.h </td><td class="markdownTableBodyLeft">Cortex-M0 processor </td></tr>
161 <tr class="markdownTableRowOdd">
162 <td class="markdownTableBodyLeft">┣ 📄 core_cm0plus.h </td><td class="markdownTableBodyLeft">Cortex-M0+ processor </td></tr>
163 <tr class="markdownTableRowEven">
164 <td class="markdownTableBodyLeft">┣ 📄 core_cm1.h </td><td class="markdownTableBodyLeft">Cortex-M1 processor </td></tr>
165 <tr class="markdownTableRowOdd">
166 <td class="markdownTableBodyLeft">┣ 📄 core_cm3.h </td><td class="markdownTableBodyLeft">Cortex-M3 processor </td></tr>
167 <tr class="markdownTableRowEven">
168 <td class="markdownTableBodyLeft">┣ 📄 core_cm4.h </td><td class="markdownTableBodyLeft">Cortex-M4 processor </td></tr>
169 <tr class="markdownTableRowOdd">
170 <td class="markdownTableBodyLeft">┣ 📄 core_cm7.h </td><td class="markdownTableBodyLeft">Cortex-M7 processor </td></tr>
171 <tr class="markdownTableRowEven">
172 <td class="markdownTableBodyLeft">┣ 📄 core_cm23.h </td><td class="markdownTableBodyLeft">Cortex-M23 processor </td></tr>
173 <tr class="markdownTableRowOdd">
174 <td class="markdownTableBodyLeft">┣ 📄 core_cm33.h </td><td class="markdownTableBodyLeft">Cortex-M33 processor </td></tr>
175 <tr class="markdownTableRowEven">
176 <td class="markdownTableBodyLeft">┣ 📄 core_cm35p.h </td><td class="markdownTableBodyLeft">Cortex-M35P processor </td></tr>
177 <tr class="markdownTableRowOdd">
178 <td class="markdownTableBodyLeft">┣ 📄 core_cm52.h </td><td class="markdownTableBodyLeft">Cortex-M52 processor </td></tr>
179 <tr class="markdownTableRowEven">
180 <td class="markdownTableBodyLeft">┣ 📄 core_cm55.h </td><td class="markdownTableBodyLeft">Cortex-M55 processor </td></tr>
181 <tr class="markdownTableRowOdd">
182 <td class="markdownTableBodyLeft">┣ 📄 core_cm85.h </td><td class="markdownTableBodyLeft">Cortex-M85 processor </td></tr>
183 <tr class="markdownTableRowEven">
184 <td class="markdownTableBodyLeft">┣ 📄 core_starmc1.h </td><td class="markdownTableBodyLeft">STAR-MC1 processor </td></tr>
185 <tr class="markdownTableRowOdd">
186 <td class="markdownTableBodyLeft">┣ 📄 core_sc000.h </td><td class="markdownTableBodyLeft">SC000 processor </td></tr>
187 <tr class="markdownTableRowEven">
188 <td class="markdownTableBodyLeft">┗ 📄 core_sc300.h </td><td class="markdownTableBodyLeft">SC300 processor </td></tr>
190 <p>The files also include the <a class="el" href="cmsis_core_files.html#cmsis_compiler_files">CMSIS-Core Compiler Files</a> and depending on the features supported by the core also correponding <a class="el" href="cmsis_core_files.html#cmsis_feature_files">CMSIS-Core Architecture Feature Files</a>.</p>
191 <h2><a class="anchor" id="cmsis_compiler_files"></a>
192 CMSIS-Core Compiler Files</h2>
193 <p>The CMSIS-Core compiler files provide consistent implementations of <code>#define</code> symbols that allow toolchain-agnostic usage of CMSIS-Core. <a class="el" href="cmsis_core_files.html#cmsis_processor_files">CMSIS-Core Processor Files</a> rely on such toolchain-agnostic abstractions by including <code>cmsis_compiler.h</code> file that then selects the target compiler-specific implementatation depending on the toolchain used in the project.</p>
194 <p>CMSIS-Core compiler files are provided in <code>CMSIS/Core/Include/</code> directory, and define the supported compilers as listed in <a class="el" href="index.html#tested_tools_sec">Tested and Verified Toolchains</a>. <a class="el" href="group__compiler__conntrol__gr.html">Compiler Control</a> documents the functionalities provided by the CMSIS compliant toolchains.</p>
195 <table class="markdownTable">
196 <tr class="markdownTableHead">
197 <th class="markdownTableHeadLeft">Header File </th><th class="markdownTableHeadLeft">Description </th></tr>
198 <tr class="markdownTableRowOdd">
199 <td class="markdownTableBodyLeft">📂 CMSIS/Core/Include </td><td class="markdownTableBodyLeft">CMSIS-Core include folder (<a href="https://github.com/ARM-software/CMSIS_6/tree/main/CMSIS/Core/Include/">See on GitHub</a>) </td></tr>
200 <tr class="markdownTableRowEven">
201 <td class="markdownTableBodyLeft">┣ 📄 cmsis_compiler.h </td><td class="markdownTableBodyLeft">Main CMSIS-Core compiler header file </td></tr>
202 <tr class="markdownTableRowOdd">
203 <td class="markdownTableBodyLeft">┗ 📂 m-profile </td><td class="markdownTableBodyLeft">Directory for M-Profile specific files </td></tr>
204 <tr class="markdownTableRowEven">
205 <td class="markdownTableBodyLeft">   ┣ 📄 cmsis_armclang_m.h </td><td class="markdownTableBodyLeft">CMSIS-Core Arm Clang compiler file for Cortex-M </td></tr>
206 <tr class="markdownTableRowOdd">
207 <td class="markdownTableBodyLeft">   ┣ 📄 cmsis_clang_m.h </td><td class="markdownTableBodyLeft">CMSIS-Core Clang compiler file for Cortex-M </td></tr>
208 <tr class="markdownTableRowEven">
209 <td class="markdownTableBodyLeft">   ┣ 📄 cmsis_gcc_m.h </td><td class="markdownTableBodyLeft">CMSIS-Core GCC compiler file for Cortex-M </td></tr>
210 <tr class="markdownTableRowOdd">
211 <td class="markdownTableBodyLeft">   ┣ 📄 cmsis_iccarm_m.h </td><td class="markdownTableBodyLeft">CMSIS-Core IAR compiler file for Cortex-M </td></tr>
212 <tr class="markdownTableRowEven">
213 <td class="markdownTableBodyLeft">   â”— 📄 cmsis_tiarmclang_m.h </td><td class="markdownTableBodyLeft">CMSIS-Core TI Clang compiler file </td></tr>
215 <h2><a class="anchor" id="cmsis_feature_files"></a>
216 CMSIS-Core Architecture Feature Files</h2>
217 <p>Several architecture-specific features are implemented in separate header files that then gets included by <a class="el" href="cmsis_core_files.html#cmsis_processor_files">CMSIS-Core Processor Files</a> if corresponding feature is supported.</p>
218 <p>For Cortex-M cores following architecture feature files are provided in the <code>CMSIS/Core/Include/m-profile/</code> folder:</p>
219 <table class="markdownTable">
220 <tr class="markdownTableHead">
221 <th class="markdownTableHeadLeft">Header File </th><th class="markdownTableHeadLeft">Feature </th></tr>
222 <tr class="markdownTableRowOdd">
223 <td class="markdownTableBodyLeft">📂 CMSIS/Core/Include </td><td class="markdownTableBodyLeft">CMSIS-Core include folder (<a href="https://github.com/ARM-software/CMSIS_6/tree/main/CMSIS/Core/Include/">See on GitHub</a>) </td></tr>
224 <tr class="markdownTableRowEven">
225 <td class="markdownTableBodyLeft">┣ 📂 m-profile </td><td class="markdownTableBodyLeft">Directory for M-Profile specific files </td></tr>
226 <tr class="markdownTableRowOdd">
227 <td class="markdownTableBodyLeft">   ┣ 📄 armv7m_cache1.h </td><td class="markdownTableBodyLeft"><a class="el" href="group__cache__functions__m7.html">Cache Functions (Level-1)</a> </td></tr>
228 <tr class="markdownTableRowEven">
229 <td class="markdownTableBodyLeft">   ┣ 📄 armv7m_mpu.h </td><td class="markdownTableBodyLeft"><a class="el" href="group__mpu__functions.html">MPU Functions for Armv6-M/v7-M</a> </td></tr>
230 <tr class="markdownTableRowOdd">
231 <td class="markdownTableBodyLeft">   ┣ 📄 armv8m_mpu.h </td><td class="markdownTableBodyLeft"><a class="el" href="group__mpu8__functions.html">MPU Functions for Armv8-M</a> </td></tr>
232 <tr class="markdownTableRowEven">
233 <td class="markdownTableBodyLeft">   ┣ 📄 armv8m_pmu.h </td><td class="markdownTableBodyLeft"><a class="el" href="group__pmu8__functions.html">PMU Functions for Armv8.1-M</a> </td></tr>
234 <tr class="markdownTableRowOdd">
235 <td class="markdownTableBodyLeft">   â”— 📄 armv81m_pac.h </td><td class="markdownTableBodyLeft">PAC functions </td></tr>
236 <tr class="markdownTableRowEven">
237 <td class="markdownTableBodyLeft">┗ 📄 tz_context.h </td><td class="markdownTableBodyLeft">API header file for <a class="el" href="group__context__trustzone__functions.html">RTOS Context Management</a> </td></tr>
239 <h2><a class="anchor" id="core_version_sect"></a>
240 CMSIS Version and Processor Information</h2>
241 <p><a class="el" href="group__version__control__gr.html#ga39f3d64ff95fb58feccc7639e537ff89">__CM_CMSIS_VERSION</a> is defined in the <code>cmsis_version.h</code> file and provides the version of the CMSIS-Core (Cortex-M). It is constructed as follows:</p>
242 <div class="fragment"><div class="line"><span class="preprocessor">#define __CM_CMSIS_VERSION_MAIN ( 5U) </span><span class="comment">/* [31:16] CMSIS Core(M) main version */</span><span class="preprocessor"></span></div>
243 <div class="line"><span class="preprocessor">#define __CM_CMSIS_VERSION_SUB ( 7U) </span><span class="comment">/* [15:0] CMSIS Core(M) sub version */</span><span class="preprocessor"></span></div>
244 <div class="line"><span class="preprocessor">#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \</span></div>
245 <div class="line"><span class="preprocessor"> __CM_CMSIS_VERSION_SUB ) </span><span class="comment">/* CMSIS Core(M) version number */</span><span class="preprocessor"></span></div>
246 </div><!-- fragment --><p>The <code>cmsis_version.h</code> is included by each <code>cpu_<core>.h</code> so the CMSIS version defines are available via them already.</p>
247 <p>The <code>cpu_<core>.h</code> files use specific defines (such as <a class="el" href="group__version__control__gr.html#ga63ea62503c88acab19fcf3d5743009e3">__CORTEX_M</a>) that provide identification of the target processor core.</p>
248 <p>These defines can be used in the <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> to verify a minimum CMSIS-Core version as well as the target processor. Read more at <a class="el" href="group__version__control__gr.html">Version Control</a>. </p>
249 </div></div><!-- contents -->
250 </div><!-- PageDoc -->
251 </div><!-- doc-content -->
252 <!-- start footer part -->
253 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
256 <script type="text/javascript">
258 writeFooter.call(this);