]> begriffs open source - cmsis/blob - dev/v6.0.0-dev35/Core/html/using_ARM_pg.html
Update documentation for release dev/v6.0.0-dev35
[cmsis] / dev / v6.0.0-dev35 / Core / html / using_ARM_pg.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): Using CMSIS with generic Arm Processors</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('using_ARM_pg.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">Using CMSIS with generic Arm Processors </div></div>
131 </div><!--header-->
132 <div class="contents">
133 <div class="textblock"><p>Arm provides CMSIS-Core (Cortex-M) files for the supported Arm Processors and for various compiler vendors. These files can be used when standard Arm processors should be used in a project. The table below lists the folder and device names of the Arm processors.</p>
134 <table class="cmtable">
135 <tr>
136 <th>Folder </th><th>Processor </th><th>Description  </th></tr>
137 <tr>
138 <td>".\Device\ARM\ARMCM0" </td><td>Cortex-M0 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M0 processor. The device name is ARMCM0 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM0.h&gt;.   </td></tr>
139 <tr>
140 <td>".\Device\ARM\ARMCM0plus" </td><td>Cortex-M0+ </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M0+ processor. The device name is ARMCM0plus and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM0plus.h&gt;.   </td></tr>
141 <tr>
142 <td>".\Device\ARM\ARMCM3" </td><td>Cortex-M3 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M3 processor. The device name is ARMCM3 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM3.h&gt;.   </td></tr>
143 <tr>
144 <td>".\Device\ARM\ARMCM4" </td><td>Cortex-M4 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M4 processor. The device name is ARMCM4 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM4.h&gt;.   </td></tr>
145 <tr>
146 <td>".\Device\ARM\ARMCM7" </td><td>Cortex-M7 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M7 processor. The device name is ARMCM7 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM7.h&gt;.     </td></tr>
147 <tr>
148 <td>".\Device\ARM\ARMCM23" </td><td>Cortex-M23 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M23 processor. The device name is ARMCM23 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM23.h&gt;. This device is available with and without TrustZone.   </td></tr>
149 <tr>
150 <td>".\Device\ARM\ARMCM33" </td><td>Cortex-M33 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M33 processor. The device name is ARMCM33 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM33.h&gt;. This device is available with and without TrustZone.   </td></tr>
151 <tr>
152 <td>".\Device\ARM\ARMCM35P" </td><td>Cortex-M35P </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M35P processor. The device name is ARMCM35P and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM35P.h&gt;. This device is available with and without TrustZone.   </td></tr>
153 <tr>
154 <td>".\Device\ARM\ARMCM55" </td><td>Cortex-M55 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M55 processor. The device name is ARMCM55 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM55.h&gt;. This device is only available with TrustZone.   </td></tr>
155 <tr>
156 <td>".\Device\ARM\ARMCM85" </td><td>Cortex-M85 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the Cortex-M85 processor. The device name is ARMCM85 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMCM85.h&gt;. This device is only available with TrustZone.     </td></tr>
157 <tr>
158 <td>".\Device\ARM\ARMSC000" </td><td>SecurCore SC000 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the SecurCore SC000 processor. The device name is ARMSC000 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMSC000.h&gt;.   </td></tr>
159 <tr>
160 <td>".\Device\ARM\ARMSC300" </td><td>SecurCore SC300 </td><td>Contains <b>Include</b> and <b>Source</b> template files configured for the SecurCore SC300 processor. The device name is ARMSC300 and the name of the <a class="el" href="device_h_pg.html">Device Header File &lt;device.h&gt;</a> is &lt;ARMSC300.h&gt;.    <br  />
161  </td></tr>
162 </table>
163 <dl class="section note"><dt>Note</dt><dd>CMSIS-Pack provides the <b>#define CMSIS_header_file</b> in <a href="../../Pack/html/pdsc_components_pg.html#RTE_Components_h"><b>RTE_Components.h</b></a> which gives you access to the <b><em>device</em>.h</b> file of a project. This allows you to generate generic software components that adjust to the device settings.</dd></dl>
164 <h1><a class="anchor" id="using_ARM_Lib_sec"></a>
165 Create generic Libraries with CMSIS</h1>
166 <p>The CMSIS Processor and Core Peripheral files allow also to create generic libraries. The <a href="../../DSP/html/index.html"><b>CMSIS-DSP</b> </a> Libraries are an example for such a generic library.</p>
167 <p>To build a generic Library set the define <b>__CMSIS_GENERIC</b> and include the relevant <b>core_&lt;cpu&gt;.h</b> CMSIS CPU &amp; Core Access header file for the processor. The define <b>__CMSIS_GENERIC</b> disables device-dependent features such as the <b>SysTick</b> timer and the <b>Interrupt System</b>. Refer to <a class="el" href="device_h_pg.html#core_config_sect">Configuration of the Processor and Core Peripherals</a> for a list of the available <b>core_&lt;cpu&gt;.h</b> header files.</p>
168 <p><b>Example:</b> </p>
169 <p>The following code section shows the usage of the <b>core_&lt;cpu&gt;.h</b> header files to build a generic library for Cortex-M0, Cortex-M3, Cortex-M4, or Cortex-M7. To select the processor, the source code uses the define <b>CORTEX_M7</b>, <b>CORTEX_M4</b>, <b>CORTEX_M3</b>, <b>CORTEX_M0</b>, or <b>CORTEX_M0PLUS</b>. One of these defines needs to be provided on the compiler command line. By using this header file, the source code can access the functions for <a class="el" href="group__Core__Register__gr.html">Core Register Access</a>, <a class="el" href="group__intrinsic__CPU__gr.html">Intrinsic Functions for CPU Instructions</a>, <a class="el" href="group__intrinsic__SIMD__gr.html">Intrinsic Functions for SIMD Instructions</a>, and <a class="el" href="group__ITM__Debug__gr.html">Debug Access</a>.</p>
170 <div class="fragment"><div class="line"><span class="preprocessor">#define __CMSIS_GENERIC              </span><span class="comment">/* disable NVIC and Systick functions */</span><span class="preprocessor"></span></div>
171 <div class="line"> </div>
172 <div class="line"><span class="preprocessor">#if defined (CORTEX_M7)</span></div>
173 <div class="line"><span class="preprocessor">  #include &quot;core_cm7.h&quot;</span></div>
174 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M4)</span></div>
175 <div class="line"><span class="preprocessor">  #include &quot;core_cm4.h&quot;</span></div>
176 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M3)</span></div>
177 <div class="line"><span class="preprocessor">  #include &quot;core_cm3.h&quot;</span></div>
178 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M0)</span></div>
179 <div class="line"><span class="preprocessor">  #include &quot;core_cm0.h&quot;</span></div>
180 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M0PLUS)</span></div>
181 <div class="line"><span class="preprocessor">  #include &quot;core_cm0plus.h&quot;</span></div>
182 <div class="line"><span class="preprocessor">#else</span></div>
183 <div class="line"><span class="preprocessor">  #error &quot;Processor not specified or unsupported.&quot;</span></div>
184 <div class="line"><span class="preprocessor">#endif</span></div>
185 </div><!-- fragment --> </div></div><!-- contents -->
186 </div><!-- PageDoc -->
187 </div><!-- doc-content -->
188 <!-- start footer part -->
189 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
190   <ul>
191     <li class="footer">
192       <script type="text/javascript">
193         <!--
194         writeFooter.call(this);
195         //-->
196       </script> 
197     </li>
198   </ul>
199 </div>
200 </body>
201 </html>