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">
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);
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); });
27 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
29 <table cellspacing="0" cellpadding="0">
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  <span id="projectnumber">Version 5.0.0 - Beta</span>
37 <div id="projectbrief">CMSIS-CORE support for Cortex-M processor-based devices</div>
43 <!-- end header part -->
44 <div id="CMSISnav" class="tabs1">
46 <script type="text/javascript">
48 writeComponentTabs.call(this);
53 <!-- Generated by Doxygen 1.8.6 -->
54 <script type="text/javascript">
55 var searchBox = new SearchBox("searchBox", "search",false,'Search');
57 <div id="navrow1" class="tabs">
59 <li><a href="index.html"><span>Main Page</span></a></li>
60 <li class="current"><a href="pages.html"><span>Usage and Description</span></a></li>
61 <li><a href="modules.html"><span>Reference</span></a></li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
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>
81 <div id="side-nav" class="ui-resizable side-nav-resizable">
83 <div id="nav-tree-contents">
84 <div id="nav-sync" class="sync"></div>
87 <div id="splitbar" style="-moz-user-select:none;"
88 class="ui-resizable-handle">
91 <script type="text/javascript">
92 $(document).ready(function(){initNavTree('using_ARM_pg.html','');});
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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Pages</a></div>
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">
110 <div class="headertitle">
111 <div class="title">Using CMSIS with generic ARM Processors </div> </div>
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">
117 <th>Folder </th><th>Processor </th><th>Description </th></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 <device.h></a> is <ARMCM0.h>. </td></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 <device.h></a> is <ARMCM0plus.h>. </td></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 <device.h></a> is <ARMCM3.h>. </td></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 <device.h></a> is <ARMCM4.h>. </td></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 <device.h></a> is <ARMCM7.h>. </td></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 <device.h></a> is <ARMSC000.h>. </td></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 <device.h></a> is <ARMSC300.h>. </td></tr>
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_<cpu>.h</b> CMSIS CPU & 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_<cpu>.h</b> header files.</p>
137 <p><b>Example:</b> </p>
138 <p>The following code section shows the usage of the <b>core_<cpu>.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 "core_cm7.h"</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 "core_cm4.h"</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 "core_cm3.h"</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 "core_cm0.h"</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 "core_cm0plus.h"</span></div>
151 <div class="line"><span class="preprocessor">#else</span></div>
152 <div class="line"><span class="preprocessor"></span><span class="preprocessor"> #error "Processor not specified or unsupported."</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! -->
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.
162 <a href="http://www.doxygen.org/index.html">
163 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6