]> begriffs open source - cmsis/blob - CMSIS/Documentation/Core/html/using_ARM_pg.html
adding documentation for section 'Core'
[cmsis] / CMSIS / Documentation / Core / html / using_ARM_pg.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Using CMSIS with generic ARM Processors</title>
7 <title>CMSIS-CORE: Using CMSIS with generic ARM Processors</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="cmsis.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="printComponentTabs.js"></script>
13 <link href="navtree.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="resize.js"></script>
15 <script type="text/javascript" src="navtree.js"></script>
16 <script type="text/javascript">
17   $(document).ready(initResizable);
18   $(window).load(resizeHeight);
19 </script>
20 <link href="search/search.css" rel="stylesheet" type="text/css"/>
21 <script type="text/javascript" src="search/search.js"></script>
22 <script type="text/javascript">
23   $(document).ready(function() { searchBox.OnSelectItem(0); });
24 </script>
25 </head>
26 <body>
27 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
28 <div id="titlearea">
29 <table cellspacing="0" cellpadding="0">
30  <tbody>
31  <tr style="height: 46px;">
32   <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
33   <td style="padding-left: 0.5em;">
34    <div id="projectname">CMSIS-CORE
35    &#160;<span id="projectnumber">Version 5.0.0 - Beta</span>
36    </div>
37    <div id="projectbrief">CMSIS-CORE support for Cortex-M processor-based devices</div>
38   </td>
39  </tr>
40  </tbody>
41 </table>
42 </div>
43 <!-- end header part -->
44 <div id="CMSISnav" class="tabs1">
45     <ul class="tablist">
46       <script type="text/javascript">
47                 <!--
48                 writeComponentTabs.call(this);
49                 //-->
50       </script>
51           </ul>
52 </div>
53 <!-- Generated by Doxygen 1.8.6 -->
54 <script type="text/javascript">
55 var searchBox = new SearchBox("searchBox", "search",false,'Search');
56 </script>
57   <div id="navrow1" class="tabs">
58     <ul class="tablist">
59       <li><a href="index.html"><span>Main&#160;Page</span></a></li>
60       <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
61       <li><a href="modules.html"><span>Reference</span></a></li>
62       <li>
63         <div id="MSearchBox" class="MSearchBoxInactive">
64         <span class="left">
65           <img id="MSearchSelect" src="search/mag_sel.png"
66                onmouseover="return searchBox.OnSearchSelectShow()"
67                onmouseout="return searchBox.OnSearchSelectHide()"
68                alt=""/>
69           <input type="text" id="MSearchField" value="Search" accesskey="S"
70                onfocus="searchBox.OnSearchFieldFocus(true)" 
71                onblur="searchBox.OnSearchFieldFocus(false)" 
72                onkeyup="searchBox.OnSearchFieldChange(event)"/>
73           </span><span class="right">
74             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75           </span>
76         </div>
77       </li>
78     </ul>
79   </div>
80 </div><!-- top -->
81 <div id="side-nav" class="ui-resizable side-nav-resizable">
82   <div id="nav-tree">
83     <div id="nav-tree-contents">
84       <div id="nav-sync" class="sync"></div>
85     </div>
86   </div>
87   <div id="splitbar" style="-moz-user-select:none;" 
88        class="ui-resizable-handle">
89   </div>
90 </div>
91 <script type="text/javascript">
92 $(document).ready(function(){initNavTree('using_ARM_pg.html','');});
93 </script>
94 <div id="doc-content">
95 <!-- window showing the filter options -->
96 <div id="MSearchSelectWindow"
97      onmouseover="return searchBox.OnSearchSelectShow()"
98      onmouseout="return searchBox.OnSearchSelectHide()"
99      onkeydown="return searchBox.OnSearchSelectKey(event)">
100 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>
101
102 <!-- iframe showing the search results (closed by default) -->
103 <div id="MSearchResultsWindow">
104 <iframe src="javascript:void(0)" frameborder="0" 
105         name="MSearchResults" id="MSearchResults">
106 </iframe>
107 </div>
108
109 <div class="header">
110   <div class="headertitle">
111 <div class="title">Using CMSIS with generic ARM Processors </div>  </div>
112 </div><!--header-->
113 <div class="contents">
114 <div class="textblock"><p>ARM provides CMSIS-CORE 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>
115 <table  class="cmtable">
116 <tr>
117 <th>Folder </th><th>Processor </th><th>Description  </th></tr>
118 <tr>
119 <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>
120 <tr>
121 <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>
122 <tr>
123 <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>
124 <tr>
125 <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>
126 <tr>
127 <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>
128 <tr>
129 <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>
130 <tr>
131 <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;.   </td></tr>
132 </table>
133 <h1><a class="anchor" id="using_ARM_Lib_sec"></a>
134 Create generic Libraries with CMSIS</h1>
135 <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>
136 <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>
137 <p><b>Example:</b> </p>
138 <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>. 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 [only Cortex-M4 and Cortex-M7]</a>, and <a class="el" href="group__ITM__Debug__gr.html">Debug Access</a>.</p>
139 <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>
140 <div class="line"><span class="preprocessor"></span></div>
141 <div class="line"><span class="preprocessor">#if defined (CORTEX_M7)</span></div>
142 <div class="line"><span class="preprocessor"></span><span class="preprocessor">  #include &quot;core_cm7.h&quot;</span></div>
143 <div class="line"><span class="preprocessor">#if defined (CORTEX_M4)</span></div>
144 <div class="line"><span class="preprocessor"></span><span class="preprocessor">  #include &quot;core_cm4.h&quot;</span></div>
145 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M3)</span></div>
146 <div class="line"><span class="preprocessor"></span><span class="preprocessor">  #include &quot;core_cm3.h&quot;</span></div>
147 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M0)</span></div>
148 <div class="line"><span class="preprocessor"></span><span class="preprocessor">  #include &quot;core_cm0.h&quot;</span></div>
149 <div class="line"><span class="preprocessor">#elif defined (CORTEX_M0PLUS)</span></div>
150 <div class="line"><span class="preprocessor"></span><span class="preprocessor">  #include &quot;core_cm0plus.h&quot;</span></div>
151 <div class="line"><span class="preprocessor">#else</span></div>
152 <div class="line"><span class="preprocessor"></span><span class="preprocessor">  #error &quot;Processor not specified or unsupported.&quot;</span></div>
153 <div class="line"><span class="preprocessor">#endif</span></div>
154 </div><!-- fragment --> </div></div><!-- contents -->
155 </div><!-- doc-content -->
156 <!-- start footer part -->
157 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
158   <ul>
159     <li class="navelem"><a class="el" href="using_pg.html">Using CMSIS in Embedded Applications</a></li>
160     <li class="footer">Generated on Tue Sep 13 2016 16:45:26 for CMSIS-CORE by ARM Ltd. All rights reserved.
161         <!--
162     <a href="http://www.doxygen.org/index.html">
163     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 
164         -->
165         </li>
166   </ul>
167 </div>
168 </body>
169 </html>