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): Compiler Control</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&dn=expat.txt MIT */
24 $(document).ready(function() { init_search(); });
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>
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
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  <span id="projectnumber"><script type="text/javascript">
46 writeHeader.call(this);
47 writeVersionDropdown.call(this, "CMSIS-Core (Cortex-M)");
52 <div id="projectbrief">CMSIS-Core support for Cortex-M processor-based devices</div>
54 <td> <div id="MSearchBox" class="MSearchBoxInactive">
56 <span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </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>
66 <!--END !PROJECT_NAME-->
71 <!-- end header part -->
72 <div id="CMSISnav" class="tabs1">
74 <script type="text/javascript">
75 writeComponentTabs.call(this);
79 <script type="text/javascript">
80 writeSubComponentTabs.call(this);
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
91 <div id="nav-tree-contents">
92 <div id="nav-sync" class="sync"></div>
95 <div id="splitbar" style="-moz-user-select:none;"
96 class="ui-resizable-handle">
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('group__compiler__conntrol__gr.html',''); initResizable(); });
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)">
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
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>
127 <div class="summary">
128 <a href="#define-members">Macros</a> </div>
129 <div class="headertitle"><div class="title">Compiler Control</div></div>
131 <div class="contents">
133 <p>Compiler agnostic #define symbols for generic C/C++ source code.
134 <a href="#details">More...</a></p>
135 <table class="memberdecls">
136 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
137 Macros</h2></td></tr>
138 <tr class="memitem:gadc1a82527532aabbfa7d8eface645fb5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gadc1a82527532aabbfa7d8eface645fb5">__ALIAS</a></td></tr>
139 <tr class="memdesc:gadc1a82527532aabbfa7d8eface645fb5"><td class="mdescLeft"> </td><td class="mdescRight">Creates a symbol as alias to another symbol. <br /></td></tr>
140 <tr class="separator:gadc1a82527532aabbfa7d8eface645fb5"><td class="memSeparator" colspan="2"> </td></tr>
141 <tr class="memitem:ga0c58caa5a273e2c21924509a45f8b849"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga0c58caa5a273e2c21924509a45f8b849">__ALIGNED</a></td></tr>
142 <tr class="memdesc:ga0c58caa5a273e2c21924509a45f8b849"><td class="mdescLeft"> </td><td class="mdescRight">Minimum alignment for a variable. <br /></td></tr>
143 <tr class="separator:ga0c58caa5a273e2c21924509a45f8b849"><td class="memSeparator" colspan="2"> </td></tr>
144 <tr class="memitem:ga8be4ebde5d4dd91b161d206545ce59aa"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga8be4ebde5d4dd91b161d206545ce59aa">__ARM_ARCH_6M__</a></td></tr>
145 <tr class="memdesc:ga8be4ebde5d4dd91b161d206545ce59aa"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv6-M architecture. <br /></td></tr>
146 <tr class="separator:ga8be4ebde5d4dd91b161d206545ce59aa"><td class="memSeparator" colspan="2"> </td></tr>
147 <tr class="memitem:ga43ab3e79ec5ecb615f1f2f6e83e7d48a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga43ab3e79ec5ecb615f1f2f6e83e7d48a">__ARM_ARCH_7EM__</a></td></tr>
148 <tr class="memdesc:ga43ab3e79ec5ecb615f1f2f6e83e7d48a"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv7-M architecture with FPU. <br /></td></tr>
149 <tr class="separator:ga43ab3e79ec5ecb615f1f2f6e83e7d48a"><td class="memSeparator" colspan="2"> </td></tr>
150 <tr class="memitem:ga43e1af8bedda108dfc4f8584e6b278a2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga43e1af8bedda108dfc4f8584e6b278a2">__ARM_ARCH_7M__</a></td></tr>
151 <tr class="memdesc:ga43e1af8bedda108dfc4f8584e6b278a2"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv7-M architecture. <br /></td></tr>
152 <tr class="separator:ga43e1af8bedda108dfc4f8584e6b278a2"><td class="memSeparator" colspan="2"> </td></tr>
153 <tr class="memitem:gae70abf09c1cc96697391c15337f25767"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gae70abf09c1cc96697391c15337f25767">__ARM_ARCH_8_1M_MAIN__</a></td></tr>
154 <tr class="memdesc:gae70abf09c1cc96697391c15337f25767"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv8.1-M architecture. <br /></td></tr>
155 <tr class="separator:gae70abf09c1cc96697391c15337f25767"><td class="memSeparator" colspan="2"> </td></tr>
156 <tr class="memitem:gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a">__ARM_ARCH_8M_BASE__</a></td></tr>
157 <tr class="memdesc:gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv8-M Baseline architecture. <br /></td></tr>
158 <tr class="separator:gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"><td class="memSeparator" colspan="2"> </td></tr>
159 <tr class="memitem:gad424c7143edd08c982dddad0ff65f4cd"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gad424c7143edd08c982dddad0ff65f4cd">__ARM_ARCH_8M_MAIN__</a></td></tr>
160 <tr class="memdesc:gad424c7143edd08c982dddad0ff65f4cd"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv8-M Mainline architecture. <br /></td></tr>
161 <tr class="separator:gad424c7143edd08c982dddad0ff65f4cd"><td class="memSeparator" colspan="2"> </td></tr>
162 <tr class="memitem:ga1378040bcf22428955c6e3ce9c2053cd"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga1378040bcf22428955c6e3ce9c2053cd">__ASM</a></td></tr>
163 <tr class="memdesc:ga1378040bcf22428955c6e3ce9c2053cd"><td class="mdescLeft"> </td><td class="mdescRight">Pass information from the compiler to the assembler. <br /></td></tr>
164 <tr class="separator:ga1378040bcf22428955c6e3ce9c2053cd"><td class="memSeparator" colspan="2"> </td></tr>
165 <tr class="memitem:ga6f053389e2958b5a239a54d4e4047bf5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga6f053389e2958b5a239a54d4e4047bf5">__COMPILER_BARRIER</a></td></tr>
166 <tr class="memdesc:ga6f053389e2958b5a239a54d4e4047bf5"><td class="mdescLeft"> </td><td class="mdescRight">Barrier to prevent compiler from reordering instructions. <br /></td></tr>
167 <tr class="separator:ga6f053389e2958b5a239a54d4e4047bf5"><td class="memSeparator" colspan="2"> </td></tr>
168 <tr class="memitem:ga1002e751427b1189f92787d4e4eef965"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga1002e751427b1189f92787d4e4eef965">__INITIAL_SP</a></td></tr>
169 <tr class="memdesc:ga1002e751427b1189f92787d4e4eef965"><td class="mdescLeft"> </td><td class="mdescRight">Compiler/linker symbol specifying the location of the main stack (MSP). <br /></td></tr>
170 <tr class="separator:ga1002e751427b1189f92787d4e4eef965"><td class="memSeparator" colspan="2"> </td></tr>
171 <tr class="memitem:gade2d8d7118f8ff49547f60aa0c3382bb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gade2d8d7118f8ff49547f60aa0c3382bb">__INLINE</a></td></tr>
172 <tr class="memdesc:gade2d8d7118f8ff49547f60aa0c3382bb"><td class="mdescLeft"> </td><td class="mdescRight">Recommend that function should be inlined by the compiler. <br /></td></tr>
173 <tr class="separator:gade2d8d7118f8ff49547f60aa0c3382bb"><td class="memSeparator" colspan="2"> </td></tr>
174 <tr class="memitem:ga541e3bdeb73ef92c9a18ea2f7082bf5d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga541e3bdeb73ef92c9a18ea2f7082bf5d">__NO_INIT</a></td></tr>
175 <tr class="memdesc:ga541e3bdeb73ef92c9a18ea2f7082bf5d"><td class="mdescLeft"> </td><td class="mdescRight">Specifies a section name for a variable to simplify variable placement into a non-initialized memory. <br /></td></tr>
176 <tr class="separator:ga541e3bdeb73ef92c9a18ea2f7082bf5d"><td class="memSeparator" colspan="2"> </td></tr>
177 <tr class="memitem:ga153a4a31b276a9758959580538720a51"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga153a4a31b276a9758959580538720a51">__NO_RETURN</a></td></tr>
178 <tr class="memdesc:ga153a4a31b276a9758959580538720a51"><td class="mdescLeft"> </td><td class="mdescRight">Inform the compiler that a function does not return. <br /></td></tr>
179 <tr class="separator:ga153a4a31b276a9758959580538720a51"><td class="memSeparator" colspan="2"> </td></tr>
180 <tr class="memitem:gabe8996d3d985ee1529475443cc635bf1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gabe8996d3d985ee1529475443cc635bf1">__PACKED</a></td></tr>
181 <tr class="memdesc:gabe8996d3d985ee1529475443cc635bf1"><td class="mdescLeft"> </td><td class="mdescRight">Request smallest possible alignment. <br /></td></tr>
182 <tr class="separator:gabe8996d3d985ee1529475443cc635bf1"><td class="memSeparator" colspan="2"> </td></tr>
183 <tr class="memitem:ga4dbb70fab85207c27b581ecb6532b314"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga4dbb70fab85207c27b581ecb6532b314">__PACKED_STRUCT</a></td></tr>
184 <tr class="memdesc:ga4dbb70fab85207c27b581ecb6532b314"><td class="mdescLeft"> </td><td class="mdescRight">Request smallest possible alignment for a structure. <br /></td></tr>
185 <tr class="separator:ga4dbb70fab85207c27b581ecb6532b314"><td class="memSeparator" colspan="2"> </td></tr>
186 <tr class="memitem:ga72db8b026c5e100254080fefabd9fd88"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga72db8b026c5e100254080fefabd9fd88">__PROGRAM_START</a></td></tr>
187 <tr class="memdesc:ga72db8b026c5e100254080fefabd9fd88"><td class="mdescLeft"> </td><td class="mdescRight">Entry function into the user application or library startup. <br /></td></tr>
188 <tr class="separator:ga72db8b026c5e100254080fefabd9fd88"><td class="memSeparator" colspan="2"> </td></tr>
189 <tr class="memitem:ga378ac21329d33f561f90265eef89f564"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga378ac21329d33f561f90265eef89f564">__RESTRICT</a></td></tr>
190 <tr class="memdesc:ga378ac21329d33f561f90265eef89f564"><td class="mdescLeft"> </td><td class="mdescRight">restrict pointer qualifier to enable additional optimizations. <br /></td></tr>
191 <tr class="separator:ga378ac21329d33f561f90265eef89f564"><td class="memSeparator" colspan="2"> </td></tr>
192 <tr class="memitem:ga84b0bad4aa39632d3faea46aa1e102a8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga84b0bad4aa39632d3faea46aa1e102a8">__STACK_LIMIT</a></td></tr>
193 <tr class="memdesc:ga84b0bad4aa39632d3faea46aa1e102a8"><td class="mdescLeft"> </td><td class="mdescRight">Compiler/linker symbol specifying the limit of the main stack (MSP). <br /></td></tr>
194 <tr class="separator:ga84b0bad4aa39632d3faea46aa1e102a8"><td class="memSeparator" colspan="2"> </td></tr>
195 <tr class="memitem:gab904513442afdf77d4f8c74f23cbb040"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gab904513442afdf77d4f8c74f23cbb040">__STATIC_FORCEINLINE</a></td></tr>
196 <tr class="memdesc:gab904513442afdf77d4f8c74f23cbb040"><td class="mdescLeft"> </td><td class="mdescRight">Define a static function that should be always inlined by the compiler. <br /></td></tr>
197 <tr class="separator:gab904513442afdf77d4f8c74f23cbb040"><td class="memSeparator" colspan="2"> </td></tr>
198 <tr class="memitem:gaba87361bfad2ae52cfe2f40c1a1dbf9c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a></td></tr>
199 <tr class="memdesc:gaba87361bfad2ae52cfe2f40c1a1dbf9c"><td class="mdescLeft"> </td><td class="mdescRight">Define a static function that may be inlined by the compiler. <br /></td></tr>
200 <tr class="separator:gaba87361bfad2ae52cfe2f40c1a1dbf9c"><td class="memSeparator" colspan="2"> </td></tr>
201 <tr class="memitem:gabe8693a7200e573101551d49a1772fb9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gabe8693a7200e573101551d49a1772fb9">__UNALIGNED_UINT16_READ</a></td></tr>
202 <tr class="memdesc:gabe8693a7200e573101551d49a1772fb9"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned read of a uint16_t variable. <br /></td></tr>
203 <tr class="separator:gabe8693a7200e573101551d49a1772fb9"><td class="memSeparator" colspan="2"> </td></tr>
204 <tr class="memitem:gadb9cd73446f7e11e92383cd327a23407"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gadb9cd73446f7e11e92383cd327a23407">__UNALIGNED_UINT16_WRITE</a></td></tr>
205 <tr class="memdesc:gadb9cd73446f7e11e92383cd327a23407"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned write of a uint16_t variable. <br /></td></tr>
206 <tr class="separator:gadb9cd73446f7e11e92383cd327a23407"><td class="memSeparator" colspan="2"> </td></tr>
207 <tr class="memitem:ga254322c344d954c9f829719a50a88e87"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga254322c344d954c9f829719a50a88e87">__UNALIGNED_UINT32_READ</a></td></tr>
208 <tr class="memdesc:ga254322c344d954c9f829719a50a88e87"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned read of a uint32_t variable. <br /></td></tr>
209 <tr class="separator:ga254322c344d954c9f829719a50a88e87"><td class="memSeparator" colspan="2"> </td></tr>
210 <tr class="memitem:gabb2180285c417aa9120a360c51f64b4b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gabb2180285c417aa9120a360c51f64b4b">__UNALIGNED_UINT32_WRITE</a></td></tr>
211 <tr class="memdesc:gabb2180285c417aa9120a360c51f64b4b"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned write of a uint32_t variable. <br /></td></tr>
212 <tr class="separator:gabb2180285c417aa9120a360c51f64b4b"><td class="memSeparator" colspan="2"> </td></tr>
213 <tr class="memitem:ga3e40e4c553fc11588f7a4c2a19e789e0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a></td></tr>
214 <tr class="memdesc:ga3e40e4c553fc11588f7a4c2a19e789e0"><td class="mdescLeft"> </td><td class="mdescRight">Inform that a variable shall be retained in executable image. <br /></td></tr>
215 <tr class="separator:ga3e40e4c553fc11588f7a4c2a19e789e0"><td class="memSeparator" colspan="2"> </td></tr>
216 <tr class="memitem:gab94ebeb20055f1848d7b707d3c7cfc5d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gab94ebeb20055f1848d7b707d3c7cfc5d">__VECTOR_TABLE</a></td></tr>
217 <tr class="memdesc:gab94ebeb20055f1848d7b707d3c7cfc5d"><td class="mdescLeft"> </td><td class="mdescRight">Symbol name used for the (static) interrupt vector table. <br /></td></tr>
218 <tr class="separator:gab94ebeb20055f1848d7b707d3c7cfc5d"><td class="memSeparator" colspan="2"> </td></tr>
219 <tr class="memitem:ga4f65c96effa79fbd610fea43ee7d745b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga4f65c96effa79fbd610fea43ee7d745b">__VECTOR_TABLE_ATTRIBUTE</a></td></tr>
220 <tr class="memdesc:ga4f65c96effa79fbd610fea43ee7d745b"><td class="mdescLeft"> </td><td class="mdescRight">Additional decl specs to be used when defining the (static) interrupt vector table. <br /></td></tr>
221 <tr class="separator:ga4f65c96effa79fbd610fea43ee7d745b"><td class="memSeparator" colspan="2"> </td></tr>
222 <tr class="memitem:gac607bf387b29162be6a9b77fc7999539"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#gac607bf387b29162be6a9b77fc7999539">__WEAK</a></td></tr>
223 <tr class="memdesc:gac607bf387b29162be6a9b77fc7999539"><td class="mdescLeft"> </td><td class="mdescRight">Export a function or variable weakly to allow overwrites. <br /></td></tr>
224 <tr class="separator:gac607bf387b29162be6a9b77fc7999539"><td class="memSeparator" colspan="2"> </td></tr>
226 <a name="details" id="details"></a><h2 class="groupheader">Description</h2>
227 <p>Compiler agnostic #define symbols for generic C/C++ source code. </p>
228 <p>The CMSIS-Core provides the header file <b>cmsis_compiler.h</b> with consistent #define symbols for generate C or C++ source files that should be compiler agnostic. Each CMSIS compliant compiler should support the functionality described in this section.</p>
229 <p>The header file <b>cmsis_compiler.h</b> is also included by each <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> so that these definitions are available. </p>
230 <h2 class="groupheader">Macro Definition Documentation</h2>
231 <a id="gadc1a82527532aabbfa7d8eface645fb5" name="gadc1a82527532aabbfa7d8eface645fb5"></a>
232 <h2 class="memtitle"><span class="permalink"><a href="#gadc1a82527532aabbfa7d8eface645fb5">◆ </a></span>__ALIAS</h2>
234 <div class="memitem">
235 <div class="memproto">
236 <table class="memname">
238 <td class="memname">#define __ALIAS</td>
241 </div><div class="memdoc">
243 <p>Creates a symbol as alias to another symbol. </p>
244 <p><b>Code Example:</b> The example declares the function Interrupt0_Handler. By default it is just an alias pointing to Default_Handler. In combination with __WEAK modifier this allows giving the function definition at a later point if required.</p>
245 <div class="fragment"><div class="line"><span class="keywordtype">void</span> Interrupt0_Handler (<span class="keywordtype">void</span>) <a class="code hl_define" href="group__compiler__conntrol__gr.html#gac607bf387b29162be6a9b77fc7999539">__WEAK</a> <a class="code hl_define" href="group__compiler__conntrol__gr.html#gadc1a82527532aabbfa7d8eface645fb5">__ALIAS</a>(<span class="stringliteral">"Default_Handler"</span>);</div>
246 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gac607bf387b29162be6a9b77fc7999539"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gac607bf387b29162be6a9b77fc7999539">__WEAK</a></div><div class="ttdeci">#define __WEAK</div><div class="ttdoc">Export a function or variable weakly to allow overwrites.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:253</div></div>
247 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gadc1a82527532aabbfa7d8eface645fb5"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gadc1a82527532aabbfa7d8eface645fb5">__ALIAS</a></div><div class="ttdeci">#define __ALIAS</div><div class="ttdoc">Creates a symbol as alias to another symbol.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:450</div></div>
248 </div><!-- fragment -->
251 <a id="ga0c58caa5a273e2c21924509a45f8b849" name="ga0c58caa5a273e2c21924509a45f8b849"></a>
252 <h2 class="memtitle"><span class="permalink"><a href="#ga0c58caa5a273e2c21924509a45f8b849">◆ </a></span>__ALIGNED</h2>
254 <div class="memitem">
255 <div class="memproto">
256 <table class="memname">
258 <td class="memname">#define __ALIGNED</td>
261 </div><div class="memdoc">
263 <p>Minimum alignment for a variable. </p>
264 <p>Specifies a minimum alignment for a variable or structure field, measured in bytes.</p>
265 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">uint32_t stack_space[0x100] <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga0c58caa5a273e2c21924509a45f8b849">__ALIGNED</a>(8); <span class="comment">// 8-byte alignment required</span></div>
266 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga0c58caa5a273e2c21924509a45f8b849"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga0c58caa5a273e2c21924509a45f8b849">__ALIGNED</a></div><div class="ttdeci">#define __ALIGNED</div><div class="ttdoc">Minimum alignment for a variable.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:389</div></div>
267 </div><!-- fragment -->
270 <a id="ga8be4ebde5d4dd91b161d206545ce59aa" name="ga8be4ebde5d4dd91b161d206545ce59aa"></a>
271 <h2 class="memtitle"><span class="permalink"><a href="#ga8be4ebde5d4dd91b161d206545ce59aa">◆ </a></span>__ARM_ARCH_6M__</h2>
273 <div class="memitem">
274 <div class="memproto">
275 <table class="memname">
277 <td class="memname">#define __ARM_ARCH_6M__</td>
280 </div><div class="memdoc">
282 <p>Set to 1 when generating code for Armv6-M architecture. </p>
283 <p>The <b>#define <b>ARM_ARCH_6M</b></b> is set to 1 when generating code for the Armv6-M architecture. This architecture is for example used by the Cortex-M0, Cortex-M0+, and Cortex-M1 processor. </p>
287 <a id="ga43ab3e79ec5ecb615f1f2f6e83e7d48a" name="ga43ab3e79ec5ecb615f1f2f6e83e7d48a"></a>
288 <h2 class="memtitle"><span class="permalink"><a href="#ga43ab3e79ec5ecb615f1f2f6e83e7d48a">◆ </a></span>__ARM_ARCH_7EM__</h2>
290 <div class="memitem">
291 <div class="memproto">
292 <table class="memname">
294 <td class="memname">#define __ARM_ARCH_7EM__</td>
297 </div><div class="memdoc">
299 <p>Set to 1 when generating code for Armv7-M architecture with FPU. </p>
300 <p>The <b>#define <b>ARM_ARCH_7EM</b></b> is set to 1 when generating code for the Armv7-M architecture with floating point extension. This architecture is for example implemented by the Cortex-M4 processor with FPU. </p>
304 <a id="ga43e1af8bedda108dfc4f8584e6b278a2" name="ga43e1af8bedda108dfc4f8584e6b278a2"></a>
305 <h2 class="memtitle"><span class="permalink"><a href="#ga43e1af8bedda108dfc4f8584e6b278a2">◆ </a></span>__ARM_ARCH_7M__</h2>
307 <div class="memitem">
308 <div class="memproto">
309 <table class="memname">
311 <td class="memname">#define __ARM_ARCH_7M__</td>
314 </div><div class="memdoc">
316 <p>Set to 1 when generating code for Armv7-M architecture. </p>
317 <p>The <b>#define <b>ARM_ARCH_7M</b></b> is set to 1 when generating code for the Armv7-M architecture. This architecture is for example used by the Cortex-M3 processor. </p>
321 <a id="gae70abf09c1cc96697391c15337f25767" name="gae70abf09c1cc96697391c15337f25767"></a>
322 <h2 class="memtitle"><span class="permalink"><a href="#gae70abf09c1cc96697391c15337f25767">◆ </a></span>__ARM_ARCH_8_1M_MAIN__</h2>
324 <div class="memitem">
325 <div class="memproto">
326 <table class="memname">
328 <td class="memname">#define __ARM_ARCH_8_1M_MAIN__</td>
331 </div><div class="memdoc">
333 <p>Set to 1 when generating code for Armv8.1-M architecture. </p>
334 <p>The <b>#define <b>ARM_ARCH_8_1M_MAIN</b></b> is set to 1 when generating code for the Armv8.1-M architecture. This architecture is for example implemented by the Cortex-M55 processor. </p>
338 <a id="gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a" name="gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"></a>
339 <h2 class="memtitle"><span class="permalink"><a href="#gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a">◆ </a></span>__ARM_ARCH_8M_BASE__</h2>
341 <div class="memitem">
342 <div class="memproto">
343 <table class="memname">
345 <td class="memname">#define __ARM_ARCH_8M_BASE__</td>
348 </div><div class="memdoc">
350 <p>Set to 1 when generating code for Armv8-M Baseline architecture. </p>
351 <p>The <b>#define <b>ARM_ARCH_8M_BASE</b></b> is set to 1 when generating code for the Armv8-M architecture baseline variant. This architecture is for example implemented by the Cortex-M23 processor. </p>
355 <a id="gad424c7143edd08c982dddad0ff65f4cd" name="gad424c7143edd08c982dddad0ff65f4cd"></a>
356 <h2 class="memtitle"><span class="permalink"><a href="#gad424c7143edd08c982dddad0ff65f4cd">◆ </a></span>__ARM_ARCH_8M_MAIN__</h2>
358 <div class="memitem">
359 <div class="memproto">
360 <table class="memname">
362 <td class="memname">#define __ARM_ARCH_8M_MAIN__</td>
365 </div><div class="memdoc">
367 <p>Set to 1 when generating code for Armv8-M Mainline architecture. </p>
368 <p>The <b>#define <b>ARM_ARCH_8M_MAIN</b></b> is set to 1 when generating code for the Armv8-M architecture mainline variant. This architecture is for example implemented by the Cortex-M33 processor. </p>
372 <a id="ga1378040bcf22428955c6e3ce9c2053cd" name="ga1378040bcf22428955c6e3ce9c2053cd"></a>
373 <h2 class="memtitle"><span class="permalink"><a href="#ga1378040bcf22428955c6e3ce9c2053cd">◆ </a></span>__ASM</h2>
375 <div class="memitem">
376 <div class="memproto">
377 <table class="memname">
379 <td class="memname">#define __ASM</td>
382 </div><div class="memdoc">
384 <p>Pass information from the compiler to the assembler. </p>
385 <p>The <b>__ASM</b> keyword can declare or define an embedded assembly function or incorporate inline assembly into a function (shown in the code example below).</p>
386 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="comment">// Reverse bit order of value</span></div>
387 <div class="line"> </div>
388 <div class="line">__attribute__( ( always_inline ) ) <a class="code hl_define" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a> uint32_t <a class="code hl_function" href="group__intrinsic__CPU__gr.html#gad6f9f297f6b91a995ee199fbc796b863">__RBIT</a>(uint32_t value)</div>
389 <div class="line">{</div>
390 <div class="line"> uint32_t result;</div>
391 <div class="line"> </div>
392 <div class="line"> <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga1378040bcf22428955c6e3ce9c2053cd">__ASM</a> <span class="keyword">volatile</span> (<span class="stringliteral">"rbit %0, %1"</span> : <span class="stringliteral">"=r"</span> (result) : <span class="stringliteral">"r"</span> (value) );</div>
393 <div class="line"> <span class="keywordflow">return</span>(result);</div>
394 <div class="line">}</div>
395 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga1378040bcf22428955c6e3ce9c2053cd"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga1378040bcf22428955c6e3ce9c2053cd">__ASM</a></div><div class="ttdeci">#define __ASM</div><div class="ttdoc">Pass information from the compiler to the assembler.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:95</div></div>
396 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gaba87361bfad2ae52cfe2f40c1a1dbf9c"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a></div><div class="ttdeci">#define __STATIC_INLINE</div><div class="ttdoc">Define a static function that may be inlined by the compiler.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:141</div></div>
397 <div class="ttc" id="agroup__intrinsic__CPU__gr_html_gad6f9f297f6b91a995ee199fbc796b863"><div class="ttname"><a href="group__intrinsic__CPU__gr.html#gad6f9f297f6b91a995ee199fbc796b863">__RBIT</a></div><div class="ttdeci">uint32_t __RBIT(uint32_t value)</div><div class="ttdoc">Reverse bit order of value.</div></div>
398 </div><!-- fragment -->
401 <a id="ga6f053389e2958b5a239a54d4e4047bf5" name="ga6f053389e2958b5a239a54d4e4047bf5"></a>
402 <h2 class="memtitle"><span class="permalink"><a href="#ga6f053389e2958b5a239a54d4e4047bf5">◆ </a></span>__COMPILER_BARRIER</h2>
404 <div class="memitem">
405 <div class="memproto">
406 <table class="memname">
408 <td class="memname">#define __COMPILER_BARRIER</td>
411 </div><div class="memdoc">
413 <p>Barrier to prevent compiler from reordering instructions. </p>
414 <p>This barrier limits the compilers reordering optimizations. It prevents the compiler from swapping instructions resulting from code before and after the barrier.</p>
415 <p><b>Code Example:</b> The assignments in the example are independent. Hence the compiler could choose a different order of execution, e.g. for a better pipeline utilization. Using the barrier in between prevents this type of reordering.</p>
416 <div class="fragment"><div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div>
417 <div class="line"> var1 = 1;</div>
418 <div class="line"> __COMPILE_BARRIER();</div>
419 <div class="line"> var2 = var3 + 1;</div>
420 <div class="line">}</div>
421 </div><!-- fragment -->
424 <a id="ga1002e751427b1189f92787d4e4eef965" name="ga1002e751427b1189f92787d4e4eef965"></a>
425 <h2 class="memtitle"><span class="permalink"><a href="#ga1002e751427b1189f92787d4e4eef965">◆ </a></span>__INITIAL_SP</h2>
427 <div class="memitem">
428 <div class="memproto">
429 <table class="memname">
431 <td class="memname">#define __INITIAL_SP</td>
434 </div><div class="memdoc">
436 <p>Compiler/linker symbol specifying the location of the main stack (MSP). </p>
437 <p>The address of the specified symbol is used to initialize the main stack pointer (MSP) during low level init. This is compiler/linker specific. CMSIS specifies common default for supported compilers.</p>
438 <dl class="section note"><dt>Note</dt><dd>This define is only intended to be used by the <a class="el" href="startup_c_pg.html">Startup File startup_<Device>.c</a>. </dd></dl>
442 <a id="gade2d8d7118f8ff49547f60aa0c3382bb" name="gade2d8d7118f8ff49547f60aa0c3382bb"></a>
443 <h2 class="memtitle"><span class="permalink"><a href="#gade2d8d7118f8ff49547f60aa0c3382bb">◆ </a></span>__INLINE</h2>
445 <div class="memitem">
446 <div class="memproto">
447 <table class="memname">
449 <td class="memname">#define __INLINE</td>
452 </div><div class="memdoc">
454 <p>Recommend that function should be inlined by the compiler. </p>
455 <p>Inline functions offer a trade-off between code size and performance. By default, the compiler decides during optimization whether to inline code or not. The <b>__INLINE</b> attribute gives the compiler an hint to inline this function. Still, the compiler may decide not to inline the function. As the function is global an callable function is also generated.</p>
456 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="keyword">const</span> uint32_t led_mask[] = {1U << 4, 1U << 5, 1U << 6, 1U << 7};</div>
457 <div class="line"> </div>
458 <div class="line"><span class="comment">/*------------------------------------------------------------------------------</span></div>
459 <div class="line"><span class="comment"> Switch on LEDs</span></div>
460 <div class="line"><span class="comment"> *------------------------------------------------------------------------------*/</span></div>
461 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#gade2d8d7118f8ff49547f60aa0c3382bb">__INLINE</a> <span class="keyword">static</span> <span class="keywordtype">void</span> LED_On (uint32_t led) {</div>
462 <div class="line"> </div>
463 <div class="line"> PTD->PCOR = led_mask[led];</div>
464 <div class="line">}</div>
465 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gade2d8d7118f8ff49547f60aa0c3382bb"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gade2d8d7118f8ff49547f60aa0c3382bb">__INLINE</a></div><div class="ttdeci">#define __INLINE</div><div class="ttdoc">Recommend that function should be inlined by the compiler.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:120</div></div>
466 </div><!-- fragment -->
469 <a id="ga541e3bdeb73ef92c9a18ea2f7082bf5d" name="ga541e3bdeb73ef92c9a18ea2f7082bf5d"></a>
470 <h2 class="memtitle"><span class="permalink"><a href="#ga541e3bdeb73ef92c9a18ea2f7082bf5d">◆ </a></span>__NO_INIT</h2>
472 <div class="memitem">
473 <div class="memproto">
474 <table class="memname">
476 <td class="memname">#define __NO_INIT</td>
479 </div><div class="memdoc">
481 <p>Specifies a section name for a variable to simplify variable placement into a non-initialized memory. </p>
482 <p>Specifies a section name (e.g, .bss.noinit or .noinit) for a variable that can be used by a linker-script to position that variable into a non-initialized memory.</p>
483 <p><b>Code Example:</b> The EventBuffer in the example must not be copy- or zero-initialized. By adding __NO_INIT at variable declaration/definition, and with appropriate linker-script, this variable is positioned into a non-initialized memory.</p>
484 <div class="fragment"><div class="line"><span class="keyword">static</span> EventRecord_t EventBuffer[EVENT_RECORD_COUNT] <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga541e3bdeb73ef92c9a18ea2f7082bf5d">__NO_INIT</a> <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga0c58caa5a273e2c21924509a45f8b849">__ALIGNED</a>(16);</div>
485 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga541e3bdeb73ef92c9a18ea2f7082bf5d"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga541e3bdeb73ef92c9a18ea2f7082bf5d">__NO_INIT</a></div><div class="ttdeci">#define __NO_INIT</div><div class="ttdoc">Specifies a section name for a variable to simplify variable placement into a non-initialized memory.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:433</div></div>
486 </div><!-- fragment -->
489 <a id="ga153a4a31b276a9758959580538720a51" name="ga153a4a31b276a9758959580538720a51"></a>
490 <h2 class="memtitle"><span class="permalink"><a href="#ga153a4a31b276a9758959580538720a51">◆ </a></span>__NO_RETURN</h2>
492 <div class="memitem">
493 <div class="memproto">
494 <table class="memname">
496 <td class="memname">#define __NO_RETURN</td>
499 </div><div class="memdoc">
501 <p>Inform the compiler that a function does not return. </p>
502 <p>Informs the compiler that the function does not return. The compiler can then perform optimizations by removing code that is never reached.</p>
503 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="comment">// OS idle demon (running when no other thread is ready to run).</span></div>
504 <div class="line"> </div>
505 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#ga153a4a31b276a9758959580538720a51">__NO_RETURN</a> <span class="keywordtype">void</span> os_idle_demon (<span class="keywordtype">void</span>);</div>
506 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga153a4a31b276a9758959580538720a51"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga153a4a31b276a9758959580538720a51">__NO_RETURN</a></div><div class="ttdeci">#define __NO_RETURN</div><div class="ttdoc">Inform the compiler that a function does not return.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:182</div></div>
507 </div><!-- fragment -->
510 <a id="gabe8996d3d985ee1529475443cc635bf1" name="gabe8996d3d985ee1529475443cc635bf1"></a>
511 <h2 class="memtitle"><span class="permalink"><a href="#gabe8996d3d985ee1529475443cc635bf1">◆ </a></span>__PACKED</h2>
513 <div class="memitem">
514 <div class="memproto">
515 <table class="memname">
517 <td class="memname">#define __PACKED</td>
520 </div><div class="memdoc">
522 <p>Request smallest possible alignment. </p>
523 <p>Specifies that a type must have the smallest possible alignment.</p>
524 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="keyword">struct </span>foo {</div>
525 <div class="line"> uint8_t u8;</div>
526 <div class="line"> uint32_t u32[2] <a class="code hl_define" href="group__compiler__conntrol__gr.html#gabe8996d3d985ee1529475443cc635bf1">__PACKED</a>;</div>
527 <div class="line">};</div>
528 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gabe8996d3d985ee1529475443cc635bf1"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gabe8996d3d985ee1529475443cc635bf1">__PACKED</a></div><div class="ttdeci">#define __PACKED</div><div class="ttdoc">Request smallest possible alignment.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:271</div></div>
529 </div><!-- fragment -->
532 <a id="ga4dbb70fab85207c27b581ecb6532b314" name="ga4dbb70fab85207c27b581ecb6532b314"></a>
533 <h2 class="memtitle"><span class="permalink"><a href="#ga4dbb70fab85207c27b581ecb6532b314">◆ </a></span>__PACKED_STRUCT</h2>
535 <div class="memitem">
536 <div class="memproto">
537 <table class="memname">
539 <td class="memname">#define __PACKED_STRUCT</td>
542 </div><div class="memdoc">
544 <p>Request smallest possible alignment for a structure. </p>
545 <p>Specifies that a structure must have the smallest possible alignment.</p>
546 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#ga4dbb70fab85207c27b581ecb6532b314">__PACKED_STRUCT</a> foo {</div>
547 <div class="line"> uint8_t u8;</div>
548 <div class="line"> uint32_t u32;</div>
549 <div class="line"> uint16_t u16;</div>
550 <div class="line">};</div>
551 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga4dbb70fab85207c27b581ecb6532b314"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga4dbb70fab85207c27b581ecb6532b314">__PACKED_STRUCT</a></div><div class="ttdeci">#define __PACKED_STRUCT</div><div class="ttdoc">Request smallest possible alignment for a structure.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:290</div></div>
552 </div><!-- fragment -->
555 <a id="ga72db8b026c5e100254080fefabd9fd88" name="ga72db8b026c5e100254080fefabd9fd88"></a>
556 <h2 class="memtitle"><span class="permalink"><a href="#ga72db8b026c5e100254080fefabd9fd88">◆ </a></span>__PROGRAM_START</h2>
558 <div class="memitem">
559 <div class="memproto">
560 <table class="memname">
562 <td class="memname">#define __PROGRAM_START</td>
565 </div><div class="memdoc">
567 <p>Entry function into the user application or library startup. </p>
568 <p>Gives the function to be jumped into right after low level initialization, i.e. SystemInit. This is compiler and library specific. CMSIS specifies common default for supported compilers.</p>
569 <dl class="section note"><dt>Note</dt><dd>This define is only intended to be used by the <a class="el" href="startup_c_pg.html">Startup File startup_<Device>.c</a>.</dd></dl>
570 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Reset_Handler(<span class="keywordtype">void</span>)</div>
571 <div class="line">{</div>
572 <div class="line"> <a class="code hl_function" href="group__system__init__gr.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit</a>(); <span class="comment">/* CMSIS System Initialization */</span></div>
573 <div class="line"> <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga72db8b026c5e100254080fefabd9fd88">__PROGRAM_START</a>(); <span class="comment">/* Enter PreMain (C library entry point) */</span></div>
574 <div class="line">}</div>
575 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga72db8b026c5e100254080fefabd9fd88"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga72db8b026c5e100254080fefabd9fd88">__PROGRAM_START</a></div><div class="ttdeci">#define __PROGRAM_START</div><div class="ttdoc">Entry function into the user application or library startup.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:472</div></div>
576 <div class="ttc" id="agroup__system__init__gr_html_ga93f514700ccf00d08dbdcff7f1224eb2"><div class="ttname"><a href="group__system__init__gr.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit</a></div><div class="ttdeci">void SystemInit(void)</div><div class="ttdoc">Function to Initialize the system.</div></div>
577 </div><!-- fragment -->
580 <a id="ga378ac21329d33f561f90265eef89f564" name="ga378ac21329d33f561f90265eef89f564"></a>
581 <h2 class="memtitle"><span class="permalink"><a href="#ga378ac21329d33f561f90265eef89f564">◆ </a></span>__RESTRICT</h2>
583 <div class="memitem">
584 <div class="memproto">
585 <table class="memname">
587 <td class="memname">#define __RESTRICT</td>
590 </div><div class="memdoc">
592 <p>restrict pointer qualifier to enable additional optimizations. </p>
593 <p>The __RESTRICT keyword corresponds to the <b>restrict</b> pointer qualifier that has been introduced in C99. __RESTRICT is a hint to the compiler that enables additional optimizations. It specifies that for the lifetime of the pointer, only the pointer itself or a value directly derived from it (such as pointer + 1) is used to access the object. The compiler may therefore ignore potential pointer aliasing effects and perform additional optimizations.</p>
594 <dl class="section note"><dt>Note</dt><dd>For compilers that do not support the restrict keyword, __RESTRICT is defined as an empty macro and a warning is issued.</dd></dl>
595 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a> <span class="keywordtype">void</span> <a class="code hl_function" href="group__mpu__functions.html#gac1a949403bf84eecaf407003fb553ae7">ARM_MPU_OrderedMemcpy</a> (<span class="keyword">volatile</span> uint32_t* dst, <span class="keyword">const</span> uint32_t* <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga378ac21329d33f561f90265eef89f564">__RESTRICT</a> src, uint32_t len)</div>
596 <div class="line">{</div>
597 <div class="line"> uint32_t i;</div>
598 <div class="line"> <span class="keywordflow">for</span> (i = 0U; i < len; ++i)</div>
599 <div class="line"> {</div>
600 <div class="line"> dst[i] = src[i]; <span class="comment">// Since src is restrict, the compiler can assume that dst and src are not overlapping may load multiple values at a time</span></div>
601 <div class="line"> }</div>
602 <div class="line">}</div>
603 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga378ac21329d33f561f90265eef89f564"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga378ac21329d33f561f90265eef89f564">__RESTRICT</a></div><div class="ttdeci">#define __RESTRICT</div><div class="ttdoc">restrict pointer qualifier to enable additional optimizations.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:210</div></div>
604 <div class="ttc" id="agroup__mpu__functions_html_gac1a949403bf84eecaf407003fb553ae7"><div class="ttname"><a href="group__mpu__functions.html#gac1a949403bf84eecaf407003fb553ae7">ARM_MPU_OrderedMemcpy</a></div><div class="ttdeci">__STATIC_INLINE void ARM_MPU_OrderedMemcpy(volatile uint32_t *dst, const uint32_t *__RESTRICT src, uint32_t len)</div></div>
605 </div><!-- fragment -->
608 <a id="ga84b0bad4aa39632d3faea46aa1e102a8" name="ga84b0bad4aa39632d3faea46aa1e102a8"></a>
609 <h2 class="memtitle"><span class="permalink"><a href="#ga84b0bad4aa39632d3faea46aa1e102a8">◆ </a></span>__STACK_LIMIT</h2>
611 <div class="memitem">
612 <div class="memproto">
613 <table class="memname">
615 <td class="memname">#define __STACK_LIMIT</td>
618 </div><div class="memdoc">
620 <p>Compiler/linker symbol specifying the limit of the main stack (MSP). </p>
621 <p>The address of the specified symbol is used to initialize the main stack pointer limit (MSPLIM on Armv8-M) during low level init. This is compiler/linker specific. CMSIS specifies common default for supported compilers.</p>
622 <dl class="section note"><dt>Note</dt><dd>This define is only intended to be used by the <a class="el" href="startup_c_pg.html">Startup File startup_<Device>.c</a>.</dd></dl>
623 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> Reset_Handler(<span class="keywordtype">void</span>)</div>
624 <div class="line">{</div>
625 <div class="line"> <a class="code hl_function" href="group__Core__Register__gr.html#ga6809a07c5cb7410e361f3fba57f72172">__set_MSPLIM</a>((uint32_t)(&<a class="code hl_define" href="group__compiler__conntrol__gr.html#ga84b0bad4aa39632d3faea46aa1e102a8">__STACK_LIMIT</a>));</div>
626 <div class="line"> <span class="comment">// :</span></div>
627 <div class="line"> <span class="comment">// :</span></div>
628 <div class="line">}</div>
629 <div class="ttc" id="agroup__Core__Register__gr_html_ga6809a07c5cb7410e361f3fba57f72172"><div class="ttname"><a href="group__Core__Register__gr.html#ga6809a07c5cb7410e361f3fba57f72172">__set_MSPLIM</a></div><div class="ttdeci">__set_MSPLIM(uint32_t MainStackPtrLimit)</div><div class="ttdoc">Set Main Stack Pointer Limit Devices without Armv8-M Main Extensions (i.e. Cortex-M23) lack the non-s...</div></div>
630 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga84b0bad4aa39632d3faea46aa1e102a8"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga84b0bad4aa39632d3faea46aa1e102a8">__STACK_LIMIT</a></div><div class="ttdeci">#define __STACK_LIMIT</div><div class="ttdoc">Compiler/linker symbol specifying the limit of the main stack (MSP).</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:507</div></div>
631 </div><!-- fragment -->
634 <a id="gab904513442afdf77d4f8c74f23cbb040" name="gab904513442afdf77d4f8c74f23cbb040"></a>
635 <h2 class="memtitle"><span class="permalink"><a href="#gab904513442afdf77d4f8c74f23cbb040">◆ </a></span>__STATIC_FORCEINLINE</h2>
637 <div class="memitem">
638 <div class="memproto">
639 <table class="memname">
641 <td class="memname">#define __STATIC_FORCEINLINE</td>
644 </div><div class="memdoc">
646 <p>Define a static function that should be always inlined by the compiler. </p>
647 <p>Defines a static function that should be always inlined by the compiler.</p>
648 <dl class="section note"><dt>Note</dt><dd>For compilers that do not allow to force function inlining, the macro maps to <a class="el" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a>.</dd></dl>
649 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">\\ Get Interrupt Vector</div>
650 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#gab904513442afdf77d4f8c74f23cbb040">__STATIC_FORCEINLINE</a> uint32_t <a class="code hl_function" href="group__NVIC__gr.html#gaebee9cad6724a5bac1857f0f1fb6d6af">NVIC_GetVector</a>(<a class="code hl_enumeration" href="group__NVIC__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a> IRQn)</div>
651 <div class="line">{</div>
652 <div class="line"> uint32_t *vectors = (uint32_t *) ((uintptr_t) SCB->VTOR);</div>
653 <div class="line"> <span class="keywordflow">return</span> vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];</div>
654 <div class="line">}</div>
655 <div class="ttc" id="agroup__NVIC__gr_html_ga7e1129cd8a196f4284d41db3e82ad5c8"><div class="ttname"><a href="group__NVIC__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a></div><div class="ttdeci">IRQn_Type</div><div class="ttdoc">Definition of IRQn numbers.</div><div class="ttdef"><b>Definition:</b> ref_nvic.txt:385</div></div>
656 <div class="ttc" id="agroup__NVIC__gr_html_gaebee9cad6724a5bac1857f0f1fb6d6af"><div class="ttname"><a href="group__NVIC__gr.html#gaebee9cad6724a5bac1857f0f1fb6d6af">NVIC_GetVector</a></div><div class="ttdeci">uint32_t NVIC_GetVector(IRQn_Type IRQn)</div><div class="ttdoc">Read Interrupt Vector [not for Cortex-M0, SC000].</div></div>
657 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gab904513442afdf77d4f8c74f23cbb040"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gab904513442afdf77d4f8c74f23cbb040">__STATIC_FORCEINLINE</a></div><div class="ttdeci">#define __STATIC_FORCEINLINE</div><div class="ttdoc">Define a static function that should be always inlined by the compiler.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:164</div></div>
658 </div><!-- fragment -->
661 <a id="gaba87361bfad2ae52cfe2f40c1a1dbf9c" name="gaba87361bfad2ae52cfe2f40c1a1dbf9c"></a>
662 <h2 class="memtitle"><span class="permalink"><a href="#gaba87361bfad2ae52cfe2f40c1a1dbf9c">◆ </a></span>__STATIC_INLINE</h2>
664 <div class="memitem">
665 <div class="memproto">
666 <table class="memname">
668 <td class="memname">#define __STATIC_INLINE</td>
671 </div><div class="memdoc">
673 <p>Define a static function that may be inlined by the compiler. </p>
674 <p>Defines a static function that may be inlined by the compiler. If the compiler generates inline code for all calls to this functions, no additional function implementation is generated which may further optimize space.</p>
675 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">\\ Get Interrupt Vector</div>
676 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a> uint32_t <a class="code hl_function" href="group__NVIC__gr.html#gaebee9cad6724a5bac1857f0f1fb6d6af">NVIC_GetVector</a>(<a class="code hl_enumeration" href="group__NVIC__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a> IRQn)</div>
677 <div class="line">{</div>
678 <div class="line"> uint32_t *vectors = (uint32_t *) ((uintptr_t) SCB->VTOR);</div>
679 <div class="line"> <span class="keywordflow">return</span> vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];</div>
680 <div class="line">}</div>
681 </div><!-- fragment -->
684 <a id="gabe8693a7200e573101551d49a1772fb9" name="gabe8693a7200e573101551d49a1772fb9"></a>
685 <h2 class="memtitle"><span class="permalink"><a href="#gabe8693a7200e573101551d49a1772fb9">◆ </a></span>__UNALIGNED_UINT16_READ</h2>
687 <div class="memitem">
688 <div class="memproto">
689 <table class="memname">
691 <td class="memname">#define __UNALIGNED_UINT16_READ</td>
694 </div><div class="memdoc">
696 <p>Pointer for unaligned read of a uint16_t variable. </p>
697 <p>Defines a pointer to a uint16_t from an address that does not need to be aligned. This can then be used in read operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm processor core and compiler settings.</p>
698 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">uint16_t val16;</div>
699 <div class="line"> </div>
700 <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div>
701 <div class="line"> val16 = <a class="code hl_define" href="group__compiler__conntrol__gr.html#gabe8693a7200e573101551d49a1772fb9">__UNALIGNED_UINT16_READ</a>(ptr);</div>
702 <div class="line">}</div>
703 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gabe8693a7200e573101551d49a1772fb9"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gabe8693a7200e573101551d49a1772fb9">__UNALIGNED_UINT16_READ</a></div><div class="ttdeci">#define __UNALIGNED_UINT16_READ</div><div class="ttdoc">Pointer for unaligned read of a uint16_t variable.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:311</div></div>
704 </div><!-- fragment -->
707 <a id="gadb9cd73446f7e11e92383cd327a23407" name="gadb9cd73446f7e11e92383cd327a23407"></a>
708 <h2 class="memtitle"><span class="permalink"><a href="#gadb9cd73446f7e11e92383cd327a23407">◆ </a></span>__UNALIGNED_UINT16_WRITE</h2>
710 <div class="memitem">
711 <div class="memproto">
712 <table class="memname">
714 <td class="memname">#define __UNALIGNED_UINT16_WRITE</td>
717 </div><div class="memdoc">
719 <p>Pointer for unaligned write of a uint16_t variable. </p>
720 <p>Defines a pointer to a uint16_t from an address that does not need to be aligned. This can then be used in write operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm processor core and compiler settings.</p>
721 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">uint16_t val16 = 0U;</div>
722 <div class="line"> </div>
723 <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div>
724 <div class="line"> <a class="code hl_define" href="group__compiler__conntrol__gr.html#gadb9cd73446f7e11e92383cd327a23407">__UNALIGNED_UINT16_WRITE</a>(ptr, val16);</div>
725 <div class="line">}</div>
726 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gadb9cd73446f7e11e92383cd327a23407"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gadb9cd73446f7e11e92383cd327a23407">__UNALIGNED_UINT16_WRITE</a></div><div class="ttdeci">#define __UNALIGNED_UINT16_WRITE</div><div class="ttdoc">Pointer for unaligned write of a uint16_t variable.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:332</div></div>
727 </div><!-- fragment -->
730 <a id="ga254322c344d954c9f829719a50a88e87" name="ga254322c344d954c9f829719a50a88e87"></a>
731 <h2 class="memtitle"><span class="permalink"><a href="#ga254322c344d954c9f829719a50a88e87">◆ </a></span>__UNALIGNED_UINT32_READ</h2>
733 <div class="memitem">
734 <div class="memproto">
735 <table class="memname">
737 <td class="memname">#define __UNALIGNED_UINT32_READ</td>
740 </div><div class="memdoc">
742 <p>Pointer for unaligned read of a uint32_t variable. </p>
743 <p>Defines a pointer to a uint32_t from an address that does not need to be aligned. This can then be used in read operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm processor core and compiler settings.</p>
744 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">uint32_t val32;</div>
745 <div class="line"> </div>
746 <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div>
747 <div class="line"> val32 = <a class="code hl_define" href="group__compiler__conntrol__gr.html#ga254322c344d954c9f829719a50a88e87">__UNALIGNED_UINT32_READ</a>(ptr);</div>
748 <div class="line">}</div>
749 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga254322c344d954c9f829719a50a88e87"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga254322c344d954c9f829719a50a88e87">__UNALIGNED_UINT32_READ</a></div><div class="ttdeci">#define __UNALIGNED_UINT32_READ</div><div class="ttdoc">Pointer for unaligned read of a uint32_t variable.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:353</div></div>
750 </div><!-- fragment -->
753 <a id="gabb2180285c417aa9120a360c51f64b4b" name="gabb2180285c417aa9120a360c51f64b4b"></a>
754 <h2 class="memtitle"><span class="permalink"><a href="#gabb2180285c417aa9120a360c51f64b4b">◆ </a></span>__UNALIGNED_UINT32_WRITE</h2>
756 <div class="memitem">
757 <div class="memproto">
758 <table class="memname">
760 <td class="memname">#define __UNALIGNED_UINT32_WRITE</td>
763 </div><div class="memdoc">
765 <p>Pointer for unaligned write of a uint32_t variable. </p>
766 <p>Defines a pointer to a uint32_t from an address that does not need to be aligned. This can then be used in write operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm processor core and compiler settings.</p>
767 <p><b>Code Example:</b> </p><div class="fragment"><div class="line">uint32_t val32 = 0U;</div>
768 <div class="line"> </div>
769 <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div>
770 <div class="line"> <a class="code hl_define" href="group__compiler__conntrol__gr.html#gabb2180285c417aa9120a360c51f64b4b">__UNALIGNED_UINT32_WRITE</a>(ptr, val32);</div>
771 <div class="line">}</div>
772 <div class="ttc" id="agroup__compiler__conntrol__gr_html_gabb2180285c417aa9120a360c51f64b4b"><div class="ttname"><a href="group__compiler__conntrol__gr.html#gabb2180285c417aa9120a360c51f64b4b">__UNALIGNED_UINT32_WRITE</a></div><div class="ttdeci">#define __UNALIGNED_UINT32_WRITE</div><div class="ttdoc">Pointer for unaligned write of a uint32_t variable.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:374</div></div>
773 </div><!-- fragment -->
776 <a id="ga3e40e4c553fc11588f7a4c2a19e789e0" name="ga3e40e4c553fc11588f7a4c2a19e789e0"></a>
777 <h2 class="memtitle"><span class="permalink"><a href="#ga3e40e4c553fc11588f7a4c2a19e789e0">◆ </a></span>__USED</h2>
779 <div class="memitem">
780 <div class="memproto">
781 <table class="memname">
783 <td class="memname">#define __USED</td>
786 </div><div class="memdoc">
788 <p>Inform that a variable shall be retained in executable image. </p>
789 <p>Definitions tagged with <b>__USED</b> in the source code should be not removed by the linker when detected as unused.</p>
790 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><span class="comment">/* Export following variables for debugging */</span></div>
791 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> CMSIS_RTOS_API_Version = osCMSIS;</div>
792 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> CMSIS_RTOS_RTX_Version = osCMSIS_RTX;</div>
793 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> os_clockrate = OS_TICK;</div>
794 <div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> os_timernum = 0;</div>
795 <div class="ttc" id="agroup__compiler__conntrol__gr_html_ga3e40e4c553fc11588f7a4c2a19e789e0"><div class="ttname"><a href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a></div><div class="ttdeci">#define __USED</div><div class="ttdoc">Inform that a variable shall be retained in executable image.</div><div class="ttdef"><b>Definition:</b> ref_compiler_ctrl.txt:229</div></div>
796 </div><!-- fragment -->
799 <a id="gab94ebeb20055f1848d7b707d3c7cfc5d" name="gab94ebeb20055f1848d7b707d3c7cfc5d"></a>
800 <h2 class="memtitle"><span class="permalink"><a href="#gab94ebeb20055f1848d7b707d3c7cfc5d">◆ </a></span>__VECTOR_TABLE</h2>
802 <div class="memitem">
803 <div class="memproto">
804 <table class="memname">
806 <td class="memname">#define __VECTOR_TABLE</td>
809 </div><div class="memdoc">
811 <p>Symbol name used for the (static) interrupt vector table. </p>
812 <p>The given name is used for defining the static (compiler time) interrupt vector table. The name must comply with any compiler/linker conventions, e.g. if used for vector table relocation or debugger awareness. CMSIS specifies common default for supported compilers.</p>
813 <dl class="section note"><dt>Note</dt><dd>This define is only intended to be used by the <a class="el" href="startup_c_pg.html">Startup File startup_<Device>.c</a>. </dd></dl>
817 <a id="ga4f65c96effa79fbd610fea43ee7d745b" name="ga4f65c96effa79fbd610fea43ee7d745b"></a>
818 <h2 class="memtitle"><span class="permalink"><a href="#ga4f65c96effa79fbd610fea43ee7d745b">◆ </a></span>__VECTOR_TABLE_ATTRIBUTE</h2>
820 <div class="memitem">
821 <div class="memproto">
822 <table class="memname">
824 <td class="memname">#define __VECTOR_TABLE_ATTRIBUTE</td>
827 </div><div class="memdoc">
829 <p>Additional decl specs to be used when defining the (static) interrupt vector table. </p>
830 <p>The given decl specs are used for defining the static (compiler time) interrupt vector table, e.g. to mark the table as used and force it into a specific linker section. CMSIS specifies common default for supported compilers.</p>
831 <dl class="section note"><dt>Note</dt><dd>This define is only intended to be used by the <a class="el" href="startup_c_pg.html">Startup File startup_<Device>.c</a>. </dd></dl>
835 <a id="gac607bf387b29162be6a9b77fc7999539" name="gac607bf387b29162be6a9b77fc7999539"></a>
836 <h2 class="memtitle"><span class="permalink"><a href="#gac607bf387b29162be6a9b77fc7999539">◆ </a></span>__WEAK</h2>
838 <div class="memitem">
839 <div class="memproto">
840 <table class="memname">
842 <td class="memname">#define __WEAK</td>
845 </div><div class="memdoc">
847 <p>Export a function or variable weakly to allow overwrites. </p>
848 <p>Functions defined with <b>__WEAK</b> export their symbols weakly. A weakly defined function behaves like a normally defined function unless a non-weakly defined function of the same name is linked into the same image. If both a non-weakly defined function and a weakly defined function exist in the same image then all calls to the function resolve to call the non-weak function.</p>
849 <p>Functions declared with <b>__WEAK</b> and then defined without <b>__WEAK</b> behave as non-weak functions.</p>
850 <p><b>Code Example:</b> </p><div class="fragment"><div class="line"><a class="code hl_define" href="group__compiler__conntrol__gr.html#gac607bf387b29162be6a9b77fc7999539">__WEAK</a> <span class="keywordtype">void</span> <a class="code hl_function" href="group__system__init__gr.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit</a>(<span class="keywordtype">void</span>)</div>
851 <div class="line">{</div>
852 <div class="line"> SystemCoreSetup();</div>
853 <div class="line"> SystemCoreClockSetup();</div>
854 <div class="line">}</div>
855 </div><!-- fragment -->
858 </div><!-- contents -->
859 </div><!-- doc-content -->
860 <!-- start footer part -->
861 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
864 <script type="text/javascript">
866 writeFooter.call(this);