]> 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 <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&amp;dn=expat.txt MIT */
24   $(document).ready(function() { init_search(); });
25 /* @license-end */
26 </script>
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>
34 </head>
35 <body>
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37 <div id="titlearea">
38 <table cellspacing="0" cellpadding="0">
39  <tbody>
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    &#160;<span id="projectnumber"><script type="text/javascript">
45      <!--
46      writeHeader.call(this);
47      writeVersionDropdown.call(this, "CMSIS-Core (Cortex-M)");
48      //-->
49     </script>
50    </span>
51    </div>
52    <div id="projectbrief">CMSIS-Core support for Cortex-M processor-based devices</div>
53   </td>
54    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
55         <span class="left">
56           <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</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>
63           </span>
64         </div>
65 </td>
66   <!--END !PROJECT_NAME-->
67  </tr>
68  </tbody>
69 </table>
70 </div>
71 <!-- end header part -->
72 <div id="CMSISnav" class="tabs1">
73   <ul class="tablist">
74     <script type="text/javascript">
75       writeComponentTabs.call(this);
76     </script>
77   </ul>
78 </div>
79 <script type="text/javascript">
80   writeSubComponentTabs.call(this);
81 </script>
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
86 /* @license-end */
87 </script>
88 </div><!-- top -->
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
90   <div id="nav-tree">
91     <div id="nav-tree-contents">
92       <div id="nav-sync" class="sync"></div>
93     </div>
94   </div>
95   <div id="splitbar" style="-moz-user-select:none;" 
96        class="ui-resizable-handle">
97   </div>
98 </div>
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('cmsis_core_files.html',''); initResizable(); });
102 /* @license-end */
103 </script>
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)">
110 </div>
111
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
115 <div class="SRPage">
116 <div id="SRIndex">
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>
121 </div>
122 </div>
123 </div>
124 </div>
125
126 <div><div class="header">
127   <div class="headertitle"><div class="title">CMSIS-Core Files </div></div>
128 </div><!--header-->
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>
131 <ol type="1">
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>
134 </ol>
135 <p>The detailed file structure of the CMSIS-Core files is shown in the following picture.</p>
136 <div class="image">
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>
145 <ul>
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>
149 </ul>
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_&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>
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_cm55.h   </td><td class="markdownTableBodyLeft">Cortex-M55 processor    </td></tr>
179 <tr class="markdownTableRowEven">
180 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_cm85.h   </td><td class="markdownTableBodyLeft">Cortex-M85 processor    </td></tr>
181 <tr class="markdownTableRowOdd">
182 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_starmc1.h   </td><td class="markdownTableBodyLeft">STAR-MC1 processor    </td></tr>
183 <tr class="markdownTableRowEven">
184 <td class="markdownTableBodyLeft">┣ ðŸ“„ core_sc000.h   </td><td class="markdownTableBodyLeft">SC000 processor    </td></tr>
185 <tr class="markdownTableRowOdd">
186 <td class="markdownTableBodyLeft">â”— ðŸ“„ core_sc300.h   </td><td class="markdownTableBodyLeft">SC300 processor   </td></tr>
187 </table>
188 <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>
189 <h2><a class="anchor" id="cmsis_compiler_files"></a>
190 CMSIS-Core Compiler Files</h2>
191 <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>
192 <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>
193 <table class="markdownTable">
194 <tr class="markdownTableHead">
195 <th class="markdownTableHeadLeft">Header File   </th><th class="markdownTableHeadLeft">Description    </th></tr>
196 <tr class="markdownTableRowOdd">
197 <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>
198 <tr class="markdownTableRowEven">
199 <td class="markdownTableBodyLeft">┣ ðŸ“„ cmsis_compiler.h   </td><td class="markdownTableBodyLeft">Main CMSIS-Core compiler header file    </td></tr>
200 <tr class="markdownTableRowOdd">
201 <td class="markdownTableBodyLeft">â”— ðŸ“‚ m-profile   </td><td class="markdownTableBodyLeft">Directory for M-Profile specific files    </td></tr>
202 <tr class="markdownTableRowEven">
203 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_armclang_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core Arm Clang compiler file for Cortex-M    </td></tr>
204 <tr class="markdownTableRowOdd">
205 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_clang_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core Clang compiler file for Cortex-M    </td></tr>
206 <tr class="markdownTableRowEven">
207 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_gcc_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core GCC compiler file for Cortex-M    </td></tr>
208 <tr class="markdownTableRowOdd">
209 <td class="markdownTableBodyLeft">&emsp;&#160; â”£ ðŸ“„ cmsis_iccarm_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core IAR compiler file for Cortex-M    </td></tr>
210 <tr class="markdownTableRowEven">
211 <td class="markdownTableBodyLeft">&emsp;&#160; â”— ðŸ“„ cmsis_tiarmclang_m.h   </td><td class="markdownTableBodyLeft">CMSIS-Core TI Clang compiler file   </td></tr>
212 </table>
213 <h2><a class="anchor" id="cmsis_feature_files"></a>
214 CMSIS-Core Architecture Feature Files</h2>
215 <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>
216 <p>For Cortex-M cores following architecture feature files are provided in the <code>CMSIS/Core/Include/m-profile/</code> folder:</p>
217 <table class="markdownTable">
218 <tr class="markdownTableHead">
219 <th class="markdownTableHeadLeft">Header File   </th><th class="markdownTableHeadLeft">Feature    </th></tr>
220 <tr class="markdownTableRowOdd">
221 <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>
222 <tr class="markdownTableRowEven">
223 <td class="markdownTableBodyLeft">┣ ðŸ“‚ m-profile   </td><td class="markdownTableBodyLeft">Directory for M-Profile specific files    </td></tr>
224 <tr class="markdownTableRowOdd">
225 <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>
226 <tr class="markdownTableRowEven">
227 <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>
228 <tr class="markdownTableRowOdd">
229 <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>
230 <tr class="markdownTableRowEven">
231 <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>
232 <tr class="markdownTableRowOdd">
233 <td class="markdownTableBodyLeft">&emsp;&#160; â”— ðŸ“„ armv81m_pac.h   </td><td class="markdownTableBodyLeft">PAC functions    </td></tr>
234 <tr class="markdownTableRowEven">
235 <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>
236 </table>
237 <h2><a class="anchor" id="core_version_sect"></a>
238 CMSIS Version and Processor Information</h2>
239 <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>
240 <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>
241 <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>
242 <div class="line"><span class="preprocessor">#define __CM_CMSIS_VERSION       ((__CM_CMSIS_VERSION_MAIN &lt;&lt; 16U) | \</span></div>
243 <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>
244 </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>
245 <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>
246 <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>
247 </div></div><!-- contents -->
248 </div><!-- PageDoc -->
249 </div><!-- doc-content -->
250 <!-- start footer part -->
251 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
252   <ul>
253     <li class="footer">
254       <script type="text/javascript">
255         <!--
256         writeFooter.call(this);
257         //-->
258       </script> 
259     </li>
260   </ul>
261 </div>
262 </body>
263 </html>