]> begriffs open source - cmsis/blob - main/Core/cmsis_core_files.html
Update documentation for branch main
[cmsis] / main / Core / cmsis_core_files.html
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">
4 <head>
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 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
12 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
13 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="jquery.js"></script>
15 <script type="text/javascript" src="dynsections.js"></script>
16 <script type="text/javascript" src="printComponentTabs.js"></script>
17 <script type="text/javascript" src="footer.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="navtree.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="resize.js"></script>
21 <script type="text/javascript" src="navtreedata.js"></script>
22 <script type="text/javascript" src="navtree.js"></script>
23 <link href="search/search.css" rel="stylesheet" type="text/css"/>
24 <script type="text/javascript" src="search/searchdata.js"></script>
25 <script type="text/javascript" src="search/search.js"></script>
26 <script type="text/javascript">
27 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
28   $(document).ready(function() { init_search(); });
29 /* @license-end */
30 </script>
31 <script type="text/javascript" src="darkmode_toggle.js"></script>
32 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
33 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
34 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
35 <link href="version.css" rel="stylesheet" type="text/css" />
36 <script type="text/javascript" src="../../../version.js"></script>
37 </head>
38 <body>
39 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
40 <div id="titlearea">
41 <table cellspacing="0" cellpadding="0">
42  <tbody>
43  <tr style="height: 55px;">
44   <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
45   <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
46    <div id="projectname">CMSIS-Core (Cortex-M)
47    &#160;<span id="projectnumber"><script type="text/javascript">
48      <!--
49      writeHeader.call(this);
50      writeVersionDropdown.call(this);
51      //-->
52     </script>
53    </span>
54    </div>
55    <div id="projectbrief">CMSIS-Core support for Cortex-M processor-based devices</div>
56   </td>
57    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
58         <span class="left">
59           <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
60           <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
61                onfocus="searchBox.OnSearchFieldFocus(true)" 
62                onblur="searchBox.OnSearchFieldFocus(false)" 
63                onkeyup="searchBox.OnSearchFieldChange(event)"/>
64           </span><span class="right">
65             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66           </span>
67         </div>
68 </td>
69   <!--END !PROJECT_NAME-->
70  </tr>
71  </tbody>
72 </table>
73 </div>
74 <!-- end header part -->
75 <div id="CMSISnav" class="tabs1">
76   <ul class="tablist">
77     <script type="text/javascript">
78       writeComponentTabs.call(this);
79     </script>
80   </ul>
81 </div>
82 <script type="text/javascript">
83   writeSubComponentTabs.call(this);
84 </script>
85 <!-- Generated by Doxygen 1.9.6 -->
86 <script type="text/javascript">
87 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
88 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 /* @license-end */
90 </script>
91 </div><!-- top -->
92 <div id="side-nav" class="ui-resizable side-nav-resizable">
93   <div id="nav-tree">
94     <div id="nav-tree-contents">
95       <div id="nav-sync" class="sync"></div>
96     </div>
97   </div>
98   <div id="splitbar" style="-moz-user-select:none;" 
99        class="ui-resizable-handle">
100   </div>
101 </div>
102 <script type="text/javascript">
103 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
104 $(document).ready(function(){initNavTree('cmsis_core_files.html',''); initResizable(); });
105 /* @license-end */
106 </script>
107 <div id="doc-content">
108 <!-- window showing the filter options -->
109 <div id="MSearchSelectWindow"
110      onmouseover="return searchBox.OnSearchSelectShow()"
111      onmouseout="return searchBox.OnSearchSelectHide()"
112      onkeydown="return searchBox.OnSearchSelectKey(event)">
113 </div>
114
115 <!-- iframe showing the search results (closed by default) -->
116 <div id="MSearchResultsWindow">
117 <div id="MSearchResults">
118 <div class="SRPage">
119 <div id="SRIndex">
120 <div id="SRResults"></div>
121 <div class="SRStatus" id="Loading">Loading...</div>
122 <div class="SRStatus" id="Searching">Searching...</div>
123 <div class="SRStatus" id="NoMatches">No Matches</div>
124 </div>
125 </div>
126 </div>
127 </div>
128
129 <div><div class="header">
130   <div class="headertitle"><div class="title">CMSIS-Core Files </div></div>
131 </div><!--header-->
132 <div class="contents">
133 <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>
134 <ol type="1">
135 <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>
136 <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>
137 </ol>
138 <p>The detailed file structure of the CMSIS-Core files is shown in the following picture.</p>
139 <div class="image">
140 <img src="CMSIS_CORE_Files.png" alt=""/>
141 <div class="caption">
142 CMSIS-Core File Structure</div></div>
143     <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>
144 <h1><a class="anchor" id="cmsis_standard_files"></a>
145 CMSIS-Core Standard Files</h1>
146 <p>The CMSIS-Core Standard file implement all attributes specific to Arm processor cores and generally do not need any modifications.</p>
147 <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>
148 <ul>
149 <li><a class="el" href="cmsis_core_files.html#cmsis_processor_files">CMSIS-Core Processor Files</a></li>
150 <li><a class="el" href="cmsis_core_files.html#cmsis_compiler_files">CMSIS-Core Compiler Files</a></li>
151 <li><a class="el" href="cmsis_core_files.html#cmsis_feature_files">CMSIS-Core Architecture Feature Files</a></li>
152 </ul>
153 <h2><a class="anchor" id="cmsis_processor_files"></a>
154 CMSIS-Core Processor Files</h2>
155 <p>The CMSIS-Core processor files define the core peripherals and provide helper functions for their access.</p>
156 <p>The files have naming convention <code>core_&lt;cpu&gt;.h</code>, with one file available for each supported processor <code>&lt;cpu&gt;</code> as listed in the table below.</p>
157 <table class="markdownTable">
158 <tr class="markdownTableHead">
159 <th class="markdownTableHeadLeft">Header File   </th><th class="markdownTableHeadLeft">Target Processor Core    </th></tr>
160 <tr class="markdownTableRowOdd">
161 <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>
162 <tr class="markdownTableRowEven">
163 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm0.h   </td><td class="markdownTableBodyLeft">Cortex-M0 processor    </td></tr>
164 <tr class="markdownTableRowOdd">
165 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm0plus.h   </td><td class="markdownTableBodyLeft">Cortex-M0+ processor    </td></tr>
166 <tr class="markdownTableRowEven">
167 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm1.h   </td><td class="markdownTableBodyLeft">Cortex-M1 processor    </td></tr>
168 <tr class="markdownTableRowOdd">
169 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm3.h   </td><td class="markdownTableBodyLeft">Cortex-M3 processor    </td></tr>
170 <tr class="markdownTableRowEven">
171 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm4.h   </td><td class="markdownTableBodyLeft">Cortex-M4 processor    </td></tr>
172 <tr class="markdownTableRowOdd">
173 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm7.h   </td><td class="markdownTableBodyLeft">Cortex-M7 processor    </td></tr>
174 <tr class="markdownTableRowEven">
175 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm23.h   </td><td class="markdownTableBodyLeft">Cortex-M23 processor    </td></tr>
176 <tr class="markdownTableRowOdd">
177 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm33.h   </td><td class="markdownTableBodyLeft">Cortex-M33 processor    </td></tr>
178 <tr class="markdownTableRowEven">
179 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm35p.h   </td><td class="markdownTableBodyLeft">Cortex-M35P processor    </td></tr>
180 <tr class="markdownTableRowOdd">
181 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm55.h   </td><td class="markdownTableBodyLeft">Cortex-M55 processor    </td></tr>
182 <tr class="markdownTableRowEven">
183 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm85.h   </td><td class="markdownTableBodyLeft">Cortex-M85 processor    </td></tr>
184 <tr class="markdownTableRowOdd">
185 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_starmc1.h   </td><td class="markdownTableBodyLeft">STAR-MC1 processor    </td></tr>
186 <tr class="markdownTableRowEven">
187 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_sc000.h   </td><td class="markdownTableBodyLeft">SC000 processor    </td></tr>
188 <tr class="markdownTableRowOdd">
189 <td class="markdownTableBodyLeft">â”— ðŸ“„ core_sc300.h   </td><td class="markdownTableBodyLeft">SC300 processor   </td></tr>
190 </table>
191 <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>
192 <h2><a class="anchor" id="cmsis_compiler_files"></a>
193 CMSIS-Core Compiler Files</h2>
194 <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>
195 <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>
196 <table class="markdownTable">
197 <tr class="markdownTableHead">
198 <th class="markdownTableHeadLeft">Header File   </th><th class="markdownTableHeadLeft">Description    </th></tr>
199 <tr class="markdownTableRowOdd">
200 <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>
201 <tr class="markdownTableRowEven">
202 <td class="markdownTableBodyLeft">┣ ðŸ“„ cmsis_compiler.h   </td><td class="markdownTableBodyLeft">Main CMSIS-Core compiler header file    </td></tr>
203 <tr class="markdownTableRowOdd">
204 <td class="markdownTableBodyLeft">â”— ðŸ“‚ m-profile   </td><td class="markdownTableBodyLeft">Directory for M-Profile specific files    </td></tr>
205 <tr class="markdownTableRowEven">
206 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_armclang_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core Arm Clang compiler file for Cortex-M    </td></tr>
207 <tr class="markdownTableRowOdd">
208 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_clang_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core Clang compiler file for Cortex-M    </td></tr>
209 <tr class="markdownTableRowEven">
210 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_gcc_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core GCC compiler file for Cortex-M    </td></tr>
211 <tr class="markdownTableRowOdd">
212 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_iccarm_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core IAR compiler file for Cortex-M    </td></tr>
213 <tr class="markdownTableRowEven">
214 <td class="markdownTableBodyLeft">&emsp;&#160; â”— ðŸ“„ cmsis_tiarmclang_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core TI Clang compiler file   </td></tr>
215 </table>
216 <h2><a class="anchor" id="cmsis_feature_files"></a>
217 CMSIS-Core Architecture Feature Files</h2>
218 <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>
219 <p>For Cortex-M cores following architecture feature files are provided in the <code>CMSIS/Core/Include/m-profile/</code> folder:</p>
220 <table class="markdownTable">
221 <tr class="markdownTableHead">
222 <th class="markdownTableHeadLeft">Header File   </th><th class="markdownTableHeadLeft">Feature    </th></tr>
223 <tr class="markdownTableRowOdd">
224 <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>
225 <tr class="markdownTableRowEven">
226 <td class="markdownTableBodyLeft">┣ ðŸ“‚ m-profile   </td><td class="markdownTableBodyLeft">Directory for M-Profile specific files    </td></tr>
227 <tr class="markdownTableRowOdd">
228 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ armv7m_cache1.h   </td><td class="markdownTableBodyLeft"><a class="el" href="group__cache__functions__m7.html">Cache Functions (Level-1)</a>    </td></tr>
229 <tr class="markdownTableRowEven">
230 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ 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>
231 <tr class="markdownTableRowOdd">
232 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ armv8m_mpu.h   </td><td class="markdownTableBodyLeft"><a class="el" href="group__mpu8__functions.html">MPU Functions for Armv8-M</a>    </td></tr>
233 <tr class="markdownTableRowEven">
234 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ armv8m_pmu.h   </td><td class="markdownTableBodyLeft"><a class="el" href="group__pmu8__functions.html">PMU Functions for Armv8.1-M</a>    </td></tr>
235 <tr class="markdownTableRowOdd">
236 <td class="markdownTableBodyLeft">&emsp;&#160; â”— ðŸ“„ armv81m_pac.h   </td><td class="markdownTableBodyLeft">PAC functions    </td></tr>
237 <tr class="markdownTableRowEven">
238 <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 </table>
240 <h2><a class="anchor" id="core_version_sect"></a>
241 CMSIS Version and Processor Information</h2>
242 <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>
243 <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>
244 <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>
245 <div class="line"><span class="preprocessor">#define __CM_CMSIS_VERSION       ((__CM_CMSIS_VERSION_MAIN &lt;&lt; 16U) | \</span></div>
246 <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>
247 </div><!-- fragment --><p>The <code>cmsis_version.h</code> is included by each <code>cpu_&lt;core&gt;.h</code> so the CMSIS version defines are available via them already.</p>
248 <p>The <code>cpu_&lt;core&gt;.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>
249 <p>These defines can be used in the <a class="el" href="device_h_pg.html">Device Header File &lt;Device.h&gt;</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>
250 </div></div><!-- contents -->
251 </div><!-- PageDoc -->
252 </div><!-- doc-content -->
253 <!-- start footer part -->
254 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
255   <ul>
256     <li class="footer">
257       <script type="text/javascript">
258         <!--
259         writeFooter.call(this);
260         //-->
261       </script> 
262     </li>
263   </ul>
264 </div>
265 </body>
266 </html>