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">
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 Device Templates</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&dn=expat.txt MIT */
28 $(document).ready(function() { init_search(); });
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>
39 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
41 <table cellspacing="0" cellpadding="0">
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  <span id="projectnumber"><script type="text/javascript">
49 writeHeader.call(this);
50 writeVersionDropdown.call(this, "CMSIS-Core (Cortex-M)");
55 <div id="projectbrief">CMSIS-Core support for Cortex-M processor-based devices</div>
57 <td> <div id="MSearchBox" class="MSearchBoxInactive">
59 <span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </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>
69 <!--END !PROJECT_NAME-->
74 <!-- end header part -->
75 <div id="CMSISnav" class="tabs1">
77 <script type="text/javascript">
78 writeComponentTabs.call(this);
82 <script type="text/javascript">
83 writeSubComponentTabs.call(this);
85 <!-- Generated by Doxygen 1.9.6 -->
86 <script type="text/javascript">
87 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
88 var searchBox = new SearchBox("searchBox", "search/",'.html');
92 <div id="side-nav" class="ui-resizable side-nav-resizable">
94 <div id="nav-tree-contents">
95 <div id="nav-sync" class="sync"></div>
98 <div id="splitbar" style="-moz-user-select:none;"
99 class="ui-resizable-handle">
102 <script type="text/javascript">
103 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
104 $(document).ready(function(){initNavTree('templates_pg.html',''); initResizable(); });
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)">
115 <!-- iframe showing the search results (closed by default) -->
116 <div id="MSearchResultsWindow">
117 <div id="MSearchResults">
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>
129 <div><div class="header">
130 <div class="headertitle"><div class="title">CMSIS-Core Device Templates </div></div>
132 <div class="contents">
133 <div class="textblock"><p>Arm supplies CMSIS-Core device template files for the all supported Cortex-M processors and various compiler vendors. Refer to the list of <a class="el" href="index.html#tested_tools_sec">Tested and Verified Toolchains</a> for compliance.</p>
134 <p>These CMSIS-Core device template files include the following:</p><ul>
135 <li>Register names of the Core Peripherals and names of the Core Exception Vectors.</li>
136 <li>Functions to access core peripherals, special CPU instructions and SIMD instructions (for Cortex-M4 and Cortex-M7)</li>
137 <li>Generic startup code and system configuration code.</li>
139 <p>The detailed file structure of the CMSIS-Core device templates is shown in the following picture.</p>
141 <img src="CMSIS_CORE_Files.png" alt=""/>
142 <div class="caption">
143 CMSIS-Core File Structure</div></div>
144 <h1><a class="anchor" id="CMSIS_Processor_files"></a>
145 CMSIS-Core Processor Files</h1>
146 <p>The CMSIS-Core processor files provided by Arm are in the directory .\CMSIS\Core\Include. These header files define all processor specific attributes do not need any modifications. The <b>core_<cpu>.h</b> defines the core peripherals and provides helper functions that access the core registers. One file is available for each supported Cortex-M processor:</p>
147 <table class="markdownTable">
148 <tr class="markdownTableHead">
149 <th class="markdownTableHeadLeft">Header File </th><th class="markdownTableHeadLeft">Processor </th></tr>
150 <tr class="markdownTableRowOdd">
151 <td class="markdownTableBodyLeft">core_cm0.h </td><td class="markdownTableBodyLeft">for the Cortex-M0 processor </td></tr>
152 <tr class="markdownTableRowEven">
153 <td class="markdownTableBodyLeft">core_cm0plus.h </td><td class="markdownTableBodyLeft">for the Cortex-M0+ processor </td></tr>
154 <tr class="markdownTableRowOdd">
155 <td class="markdownTableBodyLeft">core_cm3.h </td><td class="markdownTableBodyLeft">for the Cortex-M3 processor </td></tr>
156 <tr class="markdownTableRowEven">
157 <td class="markdownTableBodyLeft">core_cm4.h </td><td class="markdownTableBodyLeft">for the Cortex-M4 processor </td></tr>
158 <tr class="markdownTableRowOdd">
159 <td class="markdownTableBodyLeft">core_cm7.h </td><td class="markdownTableBodyLeft">for the Cortex-M7 processor </td></tr>
161 <p>core_cm23.h | for the Cortex-M23 processor core_cm33.h | for the Cortex-M33 processor core_cm35p.h | for the Cortex-M35P processor core_cm55.h | for the Cortex-M55 processor core_cm85.h | for the Cortex-M85 processor core_starmc1.h | for the STAR-MC1 processor core_sc000.h | for the SecurCore SC000 processor core_sc300.h | for the SecurCore SC300 processor core_armv8mbl.h | for the Armv8-M Baseline processor core_armv8mml.h | for the Armv8-M Mainline processor core_armv81mml.h | for the Armv8.1-M Mainline processor </p>
162 <h1><a class="anchor" id="device_examples"></a>
164 <p>The CMSIS Software Pack defines several devices that are based on the various processors. The device related CMSIS-Core files are in the directory .\Device\ARM and include CMSIS-Core processor file explained before. The following sample devices are defined in the CMSIS-Pack description file <b>ARM.CMSIS.pdsc</b>:</p>
165 <table class="markdownTable">
166 <tr class="markdownTableHead">
167 <th class="markdownTableHeadLeft">Family </th><th class="markdownTableHeadLeft">Device </th><th class="markdownTableHeadLeft">Description </th></tr>
168 <tr class="markdownTableRowOdd">
169 <td class="markdownTableBodyLeft">ARM Cortex-M0 </td><td class="markdownTableBodyLeft">ARMCM0 </td><td class="markdownTableBodyLeft">Cortex-M0 based device </td></tr>
170 <tr class="markdownTableRowEven">
171 <td class="markdownTableBodyLeft">ARM Cortex-M0 plus </td><td class="markdownTableBodyLeft">ARMCM0P </td><td class="markdownTableBodyLeft">Cortex-M0+ based device </td></tr>
172 <tr class="markdownTableRowOdd">
173 <td class="markdownTableBodyLeft">ARM Cortex-M3 </td><td class="markdownTableBodyLeft">ARMCM3 </td><td class="markdownTableBodyLeft">Cortex-M3 based device </td></tr>
174 <tr class="markdownTableRowEven">
175 <td class="markdownTableBodyLeft">ARM Cortex-M4 </td><td class="markdownTableBodyLeft">ARMCM4 </td><td class="markdownTableBodyLeft">Cortex-M4 based device without floating-point hardware </td></tr>
176 <tr class="markdownTableRowOdd">
177 <td class="markdownTableBodyLeft">ARM Cortex-M4 </td><td class="markdownTableBodyLeft">ARMCM4_FP </td><td class="markdownTableBodyLeft">Cortex-M4 based device with floating-point hardware </td></tr>
178 <tr class="markdownTableRowEven">
179 <td class="markdownTableBodyLeft">ARM Cortex-M7 </td><td class="markdownTableBodyLeft">ARMCM7 </td><td class="markdownTableBodyLeft">Cortex-M4 based device without floating-point hardware </td></tr>
180 <tr class="markdownTableRowOdd">
181 <td class="markdownTableBodyLeft">ARM Cortex-M7 </td><td class="markdownTableBodyLeft">ARMCM7_FP </td><td class="markdownTableBodyLeft">Cortex-M7 based device with single precision floating-point unit (FPU) </td></tr>
182 <tr class="markdownTableRowEven">
183 <td class="markdownTableBodyLeft">ARM Cortex-M7 </td><td class="markdownTableBodyLeft">ARMCM7_DP </td><td class="markdownTableBodyLeft">Cortex-M7 based device with double precision floating-point unit </td></tr>
184 <tr class="markdownTableRowOdd">
185 <td class="markdownTableBodyLeft">ARM Cortex-M7 </td><td class="markdownTableBodyLeft">ARMCM7 </td><td class="markdownTableBodyLeft">Cortex-M7 based device without floating-point hardware </td></tr>
187 <p>ARM Cortex-M23 | ARMCM23 | Cortex-M23 based device without TrustZone ARM Cortex-M23 | ARMCM23_TZ | Cortex-M23 based device with TrustZone ARM Cortex-M33 | ARMCM33 | Cortex-M33 based device without TrustZone, SIMD, FPU ARM Cortex-M33 | ARMCM33_TZ | Cortex-M33 based device with TrustZone, no SIMD, no FPU ARM Cortex-M33 | ARMCM33_DSP_FP | Cortex-M33 based device with SIMD, FPU, no TrustZone ARM Cortex-M33 | ARMCM33_DSP_FP_TZ | Cortex-M33 based device with TrustZone, SIMD, FPU ARM Cortex-M35P | ARMCM35P | Cortex-M35P based device without TrustZone, SIMD, FPU ARM Cortex-M35P | ARMCM35P_TZ | Cortex-M35P based device with TrustZone, no SIMD, no FPU ARM Cortex-M35P | ARMCM35P_DSP_FP | Cortex-M35P based device with SIMD, FPU, no TrustZone ARM Cortex-M35P | ARMCM35P_DSP_FP_TZ | Cortex-M35P based device with TrustZone, SIMD, FPU ARM Cortex-M55 | ARMCM55 | Cortex-M55 based device with TrustZone, SIMD, double precision FPU, and floating-point MVE ARM Cortex-M85 | ARMCM85 | Cortex-M85 based device with TrustZone, PACBTI, SIMD, double precision FPU, and floating-point MVE ARM SC000 | ARM SC000 | SC000 based device ARM SC300 | ARM SC300 | SC300 based device ARMv8-M Baseline | ARMv8MBL | Armv8-M Baseline based device with TrustZone ARMv8-M Mainline | ARMv8MML | Armv8-M Mainline based device with TrustZone ARMv8-M Mainline | ARMv8MML_DP | Armv8-M Mainline based device with TrustZone and double precision FPU ARMv8-M Mainline | ARMv8MML_SP | Armv8-M Mainline based device with TrustZone and single precision FPU ARMv8-M Mainline | ARMv8MML_DSP | Armv8-M Mainline based device with TrustZone and SIMD ARMv8-M Mainline | ARMv8MML_DSP_DP | Armv8-M Mainline based device with TrustZone, SIMD, and double precision FPU ARMv8-M Mainline | ARMv8MML_DSP_SP | Armv8-M Mainline based device with TrustZone, SIMD, and single precision FPU ARMv8.1-M Mainline | ARMv81MML_DSP_DP_MVE_FP | Armv8.1-M Mainline based device with TrustZone, SIMD, double precision FPU, and floating-point MVE </p>
188 <h1><a class="anchor" id="template_files_sec"></a>
190 <p>To simplify the creation of CMSIS-Core device files, the following template files are provided that should be extended by the silicon vendor to reflect the actual device and device peripherals. Silicon vendors add to these template files the following information:</p><ul>
191 <li><b>Device Peripheral Access Layer</b> that provides definitions for device-specific peripherals.</li>
192 <li><b>Access Functions for Peripherals</b> (optional) that provides additional helper functions to access device-specific peripherals.</li>
193 <li><b>Interrupt vectors</b> in the startup file that are device specific.</li>
195 <table class="cmtable">
197 <th>Template File </th><th>Description </th></tr>
199 <td>.\Device\_Template_Vendor\Vendor\Device\Source\ARM\startup_Device_ac5_noSct.s </td><td>Startup file template for Arm Compiler V5. No linker description file necessary.<br />
200 <b>Deprecated</b> </td></tr>
202 <td>.\Device\_Template_Vendor\Vendor\Device\Source\ARM\startup_Device_ac5.s </td><td>Startup file template for Arm Compiler V5. Use of linker description file is <b>necessary</b>.<br />
203 <b>Deprecated</b> </td></tr>
205 <td>.\Device\_Template_Vendor\Vendor\Device\Source\ARM\startup_Device_ac6.S </td><td>Preprocessed startup file template for Arm Compiler V6. Use of linker description file is <b>necessary</b>.<br />
206 <b>Deprecated</b> </td></tr>
208 <td>.\Device\_Template_Vendor\Vendor\Device\Source\ARM\Device_ac5.sct </td><td>Linker description file for Arm Compiler V5.<br />
209 <b>Deprecated</b> </td></tr>
211 <td>.\Device\_Template_Vendor\Vendor\Device\Source\ARM\Device_ac6.sct </td><td>Linker description file for Arm Compiler V6. </td></tr>
213 <td>.\Device\_Template_Vendor\Vendor\Device\Source\GCC\startup_Device.S </td><td>Preprocessed startup file template for GNU GCC Arm Embedded Compiler. Use of linker description file is <b>necessary</b>.<.<br />
214 <b>Deprecated</b> </td></tr>
216 <td>.\Device\_Template_Vendor\Vendor\Device\Source\GCC\gcc_arm.ld </td><td>Linker description file for GNU GCC Arm Embedded Compiler. </td></tr>
218 <td>.\Device\_Template_Vendor\Vendor\Device\Source\IAR\startup_Device.s </td><td>Startup file template for IAR C/C++ Compiler. </td></tr>
220 <td>.\Device\_Template_Vendor\Vendor\Device\Source\startup_Device.c </td><td>Generic startup_Device.c file for device startup implemented in C. Use of linker description file is necessary. </td></tr>
222 <td>.\Device\_Template_Vendor\Vendor\Device\Source\system_Device.c </td><td>Generic system_Device.c file for system configuration (i.e. processor clock and memory bus system). </td></tr>
224 <td>.\Device\_Template_Vendor\Vendor\Device\Include\Device.h </td><td>Generic device header file. Needs to be extended with the device-specific peripheral registers. Optionally functions that access the peripherals can be part of that file. </td></tr>
226 <td>.\Device\_Template_Vendor\Vendor\Device\Include\system_Device.h </td><td>Generic system device configuration include file. </td></tr>
228 <p><b>Adapt Template Files to a Device</b></p>
229 <p>The following steps describe how to adopt the template files to a specific device or device family. Copy the complete all files in the template directory and replace:</p><ul>
230 <li>directory name 'Vendor' with the abbreviation for the device vendor e.g.: NXP.</li>
231 <li>directory name 'Device' with the specific device name e.g.: LPC17xx.</li>
232 <li>in the file names 'Device' with the specific device name e.g.: LPC17xx.</li>
234 <p>Each template file contains comments that start with <b>ToDo:</b> that describe a required modification. The template files contain place holders:</p>
235 <table class="cmtable">
237 <th>Placeholder </th><th>Replaced with </th></tr>
239 <td><Device> </td><td>the specific device name or device family name; i.e. LPC17xx. </td></tr>
241 <td><DeviceInterrupt> </td><td>a specific interrupt name of the device; i.e. TIM1 for Timer 1. </td></tr>
243 <td><DeviceAbbreviation> </td><td>short name or abbreviation of the device family; i.e. LPC. </td></tr>
245 <td>Cortex-M# </td><td>the specific Cortex-M processor name; i.e. Cortex-M3. </td></tr>
247 <p>The device configuration of the template files is described in detail on the following pages:</p><ul>
248 <li><a class="el" href="startup_c_pg.html">Startup File startup_<device>.c</a></li>
249 <li><a class="el" href="startup_s_pg.html">Startup File startup_<device>.s (deprecated)</a> (deprecated)</li>
250 <li><a class="el" href="linker_sct_pg.html">Scatter-Loading description file <device>_ac<5|6>.sct</a></li>
251 <li><a class="el" href="system_c_pg.html">System Configuration Files system_<device>.c and system_<device>.h</a></li>
252 <li><a class="el" href="device_h_pg.html">Device Header File <device.h></a> </li>
253 <li><a class="el" href="partition_h_pg.html">TrustZone setup: partition_<device>.h</a></li>
254 <li><a class="el" href="partition_h_pg.html#partition_gen_h_pg">Region/ISR setup: partition_gen.h</a> </li>
256 </div></div><!-- contents -->
257 </div><!-- PageDoc -->
258 </div><!-- doc-content -->
259 <!-- start footer part -->
260 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
263 <script type="text/javascript">
265 writeFooter.call(this);