| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <title>Compiler Control</title> |
| <title>CMSIS-Core (Cortex-M): Compiler Control</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <link href="cmsis.css" rel="stylesheet" type="text/css" /> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <script type="text/javascript" src="printComponentTabs.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| $(window).load(resizeHeight); |
| </script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| </script> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 46px;"> |
| <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">CMSIS-Core (Cortex-M) |
|  <span id="projectnumber">Version 5.3.0</span> |
| </div> |
| <div id="projectbrief">CMSIS-Core support for Cortex-M processor-based devices</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <div id="CMSISnav" class="tabs1"> |
| <ul class="tablist"> |
| <script type="text/javascript"> |
| <!-- |
| writeComponentTabs.call(this); |
| //--> |
| </script> |
| </ul> |
| </div> |
| <!-- Generated by Doxygen 1.8.6 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="pages.html"><span>Usage and Description</span></a></li> |
| <li><a href="modules.html"><span>Reference</span></a></li> |
| <li> |
| <div id="MSearchBox" class="MSearchBoxInactive"> |
| <span class="left"> |
| <img id="MSearchSelect" src="search/mag_sel.png" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| alt=""/> |
| <input type="text" id="MSearchField" value="Search" accesskey="S" |
| onfocus="searchBox.OnSearchFieldFocus(true)" |
| onblur="searchBox.OnSearchFieldFocus(false)" |
| onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| </span><span class="right"> |
| <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| </span> |
| </div> |
| </li> |
| </ul> |
| </div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| $(document).ready(function(){initNavTree('group__compiler__conntrol__gr.html','');}); |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| <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> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div class="header"> |
| <div class="summary"> |
| <a href="#define-members">Macros</a> </div> |
| <div class="headertitle"> |
| <div class="title">Compiler Control</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>Compiler agnostic #define symbols for generic C/C++ source code. |
| <a href="#details">More...</a></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| Macros</h2></td></tr> |
| <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> |
| <tr class="memdesc:ga8be4ebde5d4dd91b161d206545ce59aa"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv6-M (Cortex-M0, Cortex-M1) <a href="#ga8be4ebde5d4dd91b161d206545ce59aa">More...</a><br/></td></tr> |
| <tr class="separator:ga8be4ebde5d4dd91b161d206545ce59aa"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga43e1af8bedda108dfc4f8584e6b278a2"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv7-M (Cortex-M3) <a href="#ga43e1af8bedda108dfc4f8584e6b278a2">More...</a><br/></td></tr> |
| <tr class="separator:ga43e1af8bedda108dfc4f8584e6b278a2"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga43ab3e79ec5ecb615f1f2f6e83e7d48a"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv7-M (Cortex-M4) with FPU. <a href="#ga43ab3e79ec5ecb615f1f2f6e83e7d48a">More...</a><br/></td></tr> |
| <tr class="separator:ga43ab3e79ec5ecb615f1f2f6e83e7d48a"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv8-M Baseline. <a href="#gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a">More...</a><br/></td></tr> |
| <tr class="separator:gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gad424c7143edd08c982dddad0ff65f4cd"><td class="mdescLeft"> </td><td class="mdescRight">Set to 1 when generating code for Armv8-M Mainline. <a href="#gad424c7143edd08c982dddad0ff65f4cd">More...</a><br/></td></tr> |
| <tr class="separator:gad424c7143edd08c982dddad0ff65f4cd"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga1378040bcf22428955c6e3ce9c2053cd"><td class="mdescLeft"> </td><td class="mdescRight">Pass information from the compiler to the assembler. <a href="#ga1378040bcf22428955c6e3ce9c2053cd">More...</a><br/></td></tr> |
| <tr class="separator:ga1378040bcf22428955c6e3ce9c2053cd"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gade2d8d7118f8ff49547f60aa0c3382bb"><td class="mdescLeft"> </td><td class="mdescRight">Recommend that function should be inlined by the compiler. <a href="#gade2d8d7118f8ff49547f60aa0c3382bb">More...</a><br/></td></tr> |
| <tr class="separator:gade2d8d7118f8ff49547f60aa0c3382bb"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gaba87361bfad2ae52cfe2f40c1a1dbf9c"><td class="mdescLeft"> </td><td class="mdescRight">Define a static function that may be inlined by the compiler. <a href="#gaba87361bfad2ae52cfe2f40c1a1dbf9c">More...</a><br/></td></tr> |
| <tr class="separator:gaba87361bfad2ae52cfe2f40c1a1dbf9c"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gab904513442afdf77d4f8c74f23cbb040"><td class="mdescLeft"> </td><td class="mdescRight">Define a static function that should be always inlined by the compiler. <a href="#gab904513442afdf77d4f8c74f23cbb040">More...</a><br/></td></tr> |
| <tr class="separator:gab904513442afdf77d4f8c74f23cbb040"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga153a4a31b276a9758959580538720a51"><td class="mdescLeft"> </td><td class="mdescRight">Inform the compiler that a function does not return. <a href="#ga153a4a31b276a9758959580538720a51">More...</a><br/></td></tr> |
| <tr class="separator:ga153a4a31b276a9758959580538720a51"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga378ac21329d33f561f90265eef89f564"><td class="mdescLeft"> </td><td class="mdescRight">restrict pointer qualifier to enable additional optimizations. <a href="#ga378ac21329d33f561f90265eef89f564">More...</a><br/></td></tr> |
| <tr class="separator:ga378ac21329d33f561f90265eef89f564"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga3e40e4c553fc11588f7a4c2a19e789e0"><td class="mdescLeft"> </td><td class="mdescRight">Inform that a variable shall be retained in executable image. <a href="#ga3e40e4c553fc11588f7a4c2a19e789e0">More...</a><br/></td></tr> |
| <tr class="separator:ga3e40e4c553fc11588f7a4c2a19e789e0"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gac607bf387b29162be6a9b77fc7999539"><td class="mdescLeft"> </td><td class="mdescRight">Export a function or variable weakly to allow overwrites. <a href="#gac607bf387b29162be6a9b77fc7999539">More...</a><br/></td></tr> |
| <tr class="separator:gac607bf387b29162be6a9b77fc7999539"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gabe8996d3d985ee1529475443cc635bf1"><td class="mdescLeft"> </td><td class="mdescRight">Request smallest possible alignment. <a href="#gabe8996d3d985ee1529475443cc635bf1">More...</a><br/></td></tr> |
| <tr class="separator:gabe8996d3d985ee1529475443cc635bf1"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga4dbb70fab85207c27b581ecb6532b314"><td class="mdescLeft"> </td><td class="mdescRight">Request smallest possible alignment for a structure. <a href="#ga4dbb70fab85207c27b581ecb6532b314">More...</a><br/></td></tr> |
| <tr class="separator:ga4dbb70fab85207c27b581ecb6532b314"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ga27fd2ec6767ca1ab66d36b5cc0103268"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__compiler__conntrol__gr.html#ga27fd2ec6767ca1ab66d36b5cc0103268">__UNALIGNED_UINT32</a></td></tr> |
| <tr class="memdesc:ga27fd2ec6767ca1ab66d36b5cc0103268"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned access of a uint32_t variable. <a href="#ga27fd2ec6767ca1ab66d36b5cc0103268">More...</a><br/></td></tr> |
| <tr class="separator:ga27fd2ec6767ca1ab66d36b5cc0103268"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gabe8693a7200e573101551d49a1772fb9"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned read of a uint16_t variable. <a href="#gabe8693a7200e573101551d49a1772fb9">More...</a><br/></td></tr> |
| <tr class="separator:gabe8693a7200e573101551d49a1772fb9"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gadb9cd73446f7e11e92383cd327a23407"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned write of a uint16_t variable. <a href="#gadb9cd73446f7e11e92383cd327a23407">More...</a><br/></td></tr> |
| <tr class="separator:gadb9cd73446f7e11e92383cd327a23407"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga254322c344d954c9f829719a50a88e87"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned read of a uint32_t variable. <a href="#ga254322c344d954c9f829719a50a88e87">More...</a><br/></td></tr> |
| <tr class="separator:ga254322c344d954c9f829719a50a88e87"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gabb2180285c417aa9120a360c51f64b4b"><td class="mdescLeft"> </td><td class="mdescRight">Pointer for unaligned write of a uint32_t variable. <a href="#gabb2180285c417aa9120a360c51f64b4b">More...</a><br/></td></tr> |
| <tr class="separator:gabb2180285c417aa9120a360c51f64b4b"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga0c58caa5a273e2c21924509a45f8b849"><td class="mdescLeft"> </td><td class="mdescRight">Minimum alignment for a variable. <a href="#ga0c58caa5a273e2c21924509a45f8b849">More...</a><br/></td></tr> |
| <tr class="separator:ga0c58caa5a273e2c21924509a45f8b849"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga6f053389e2958b5a239a54d4e4047bf5"><td class="mdescLeft"> </td><td class="mdescRight">Barrier to prevent compiler from reordering instructions. <a href="#ga6f053389e2958b5a239a54d4e4047bf5">More...</a><br/></td></tr> |
| <tr class="separator:ga6f053389e2958b5a239a54d4e4047bf5"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga72db8b026c5e100254080fefabd9fd88"><td class="mdescLeft"> </td><td class="mdescRight">Entry function into the user application or library startup. <a href="#ga72db8b026c5e100254080fefabd9fd88">More...</a><br/></td></tr> |
| <tr class="separator:ga72db8b026c5e100254080fefabd9fd88"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga1002e751427b1189f92787d4e4eef965"><td class="mdescLeft"> </td><td class="mdescRight">Compiler/linker symbol specifiying the location of the main stack (MSP). <a href="#ga1002e751427b1189f92787d4e4eef965">More...</a><br/></td></tr> |
| <tr class="separator:ga1002e751427b1189f92787d4e4eef965"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga84b0bad4aa39632d3faea46aa1e102a8"><td class="mdescLeft"> </td><td class="mdescRight">Compiler/linker symbol specifiying the limit of the main stack (MSP). <a href="#ga84b0bad4aa39632d3faea46aa1e102a8">More...</a><br/></td></tr> |
| <tr class="separator:ga84b0bad4aa39632d3faea46aa1e102a8"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:gab94ebeb20055f1848d7b707d3c7cfc5d"><td class="mdescLeft"> </td><td class="mdescRight">Symbol name used for the (static) interrupt vector table. <a href="#gab94ebeb20055f1848d7b707d3c7cfc5d">More...</a><br/></td></tr> |
| <tr class="separator:gab94ebeb20055f1848d7b707d3c7cfc5d"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <tr class="memdesc:ga4f65c96effa79fbd610fea43ee7d745b"><td class="mdescLeft"> </td><td class="mdescRight">Additional decl specs to be used when defining the (static) interrupt vector table. <a href="#ga4f65c96effa79fbd610fea43ee7d745b">More...</a><br/></td></tr> |
| <tr class="separator:ga4f65c96effa79fbd610fea43ee7d745b"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Description</h2> |
| <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> |
| <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> |
| <h2 class="groupheader">Macro Definition Documentation</h2> |
| <a class="anchor" id="ga0c58caa5a273e2c21924509a45f8b849"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ALIGNED</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Specifies a minimum alignment for a variable or structure field, measured in bytes.</p> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">uint32_t stack_space[0x100] <a class="code" href="group__compiler__conntrol__gr.html#ga0c58caa5a273e2c21924509a45f8b849">__ALIGNED</a>(8); <span class="comment">// 8-byte alignment required</span></div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga8be4ebde5d4dd91b161d206545ce59aa"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ARM_ARCH_6M__</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ga43ab3e79ec5ecb615f1f2f6e83e7d48a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ARM_ARCH_7EM__</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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 used by the Cortex-M4 processor with FPU </p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ga43e1af8bedda108dfc4f8584e6b278a2"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ARM_ARCH_7M__</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| |
| </div> |
| </div> |
| <a class="anchor" id="gab3f1284f4cdc6c5e5c9c9d4b8ec29b2a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ARM_ARCH_8M_BASE__</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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. </p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="gad424c7143edd08c982dddad0ff65f4cd"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ARM_ARCH_8M_MAIN__</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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. </p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ga1378040bcf22428955c6e3ce9c2053cd"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __ASM</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line"><span class="comment">// Reverse bit order of value</span></div> |
| <div class="line"> </div> |
| <div class="line">__attribute__( ( always_inline ) ) <a class="code" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a> uint32_t <a class="code" href="group__intrinsic__CPU__gr.html#gad6f9f297f6b91a995ee199fbc796b863">__RBIT</a>(uint32_t value)</div> |
| <div class="line">{</div> |
| <div class="line"> uint32_t result;</div> |
| <div class="line"> </div> |
| <div class="line"> <a class="code" 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> |
| <div class="line"> <span class="keywordflow">return</span>(result);</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga6f053389e2958b5a239a54d4e4047bf5"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __COMPILER_BARRIER</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>This barrier limits the compilers reordering optimizations. It prevents the compiler from swapping instructions resulting from code before and after the barrier.</p> |
| <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> |
| <div class="fragment"><div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div> |
| <div class="line"> var1 = 1;</div> |
| <div class="line"> __COMPILE_BARRIER();</div> |
| <div class="line"> var2 = var3 + 1;</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga1002e751427b1189f92787d4e4eef965"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __INITIAL_SP</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| |
| </div> |
| </div> |
| <a class="anchor" id="gade2d8d7118f8ff49547f60aa0c3382bb"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __INLINE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| <div class="line"> </div> |
| <div class="line"><span class="comment">/*------------------------------------------------------------------------------</span></div> |
| <div class="line"><span class="comment"> Switch on LEDs</span></div> |
| <div class="line"><span class="comment"> *------------------------------------------------------------------------------*/</span></div> |
| <div class="line"><a class="code" 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> |
| <div class="line"> </div> |
| <div class="line"> PTD->PCOR = led_mask[led];</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga153a4a31b276a9758959580538720a51"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __NO_RETURN</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Informs the compiler that the function does not return. The compiler can then perform optimizations by removing code that is never reached.</p> |
| <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> |
| <div class="line"> </div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#ga153a4a31b276a9758959580538720a51">__NO_RETURN</a> <span class="keywordtype">void</span> os_idle_demon (<span class="keywordtype">void</span>);</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gabe8996d3d985ee1529475443cc635bf1"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __PACKED</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Specifies that a type must have the smallest possible alignment.</p> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line"><span class="keyword">struct </span>foo {</div> |
| <div class="line"> uint8_t u8;</div> |
| <div class="line"> uint32_t u32[2] <a class="code" href="group__compiler__conntrol__gr.html#gabe8996d3d985ee1529475443cc635bf1">__PACKED</a>;</div> |
| <div class="line">};</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga4dbb70fab85207c27b581ecb6532b314"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __PACKED_STRUCT</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Specifies that a structure must have the smallest possible alignment.</p> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line"><a class="code" href="group__compiler__conntrol__gr.html#ga4dbb70fab85207c27b581ecb6532b314">__PACKED_STRUCT</a> foo {</div> |
| <div class="line"> uint8_t u8;</div> |
| <div class="line"> uint32_t u32;</div> |
| <div class="line"> uint16_t u16;</div> |
| <div class="line">};</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga72db8b026c5e100254080fefabd9fd88"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __PROGRAM_START</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| <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> |
| <div class="line">{</div> |
| <div class="line"> <a class="code" href="group__system__init__gr.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit</a>(); <span class="comment">/* CMSIS System Initialization */</span></div> |
| <div class="line"> <a class="code" href="group__compiler__conntrol__gr.html#ga72db8b026c5e100254080fefabd9fd88">__PROGRAM_START</a>(); <span class="comment">/* Enter PreMain (C library entry point) */</span></div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga378ac21329d33f561f90265eef89f564"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __RESTRICT</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line"><a class="code" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a> <span class="keywordtype">void</span> <a class="code" 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" href="group__compiler__conntrol__gr.html#ga378ac21329d33f561f90265eef89f564">__RESTRICT</a> src, uint32_t len)</div> |
| <div class="line">{</div> |
| <div class="line"> uint32_t i;</div> |
| <div class="line"> <span class="keywordflow">for</span> (i = 0U; i < len; ++i) </div> |
| <div class="line"> {</div> |
| <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> |
| <div class="line"> }</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga84b0bad4aa39632d3faea46aa1e102a8"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __STACK_LIMIT</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| <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> |
| <div class="line">{</div> |
| <div class="line"> <a class="code" href="group__Core__Register__gr.html#ga6809a07c5cb7410e361f3fba57f72172">__set_MSPLIM</a>((uint32_t)(&<a class="code" href="group__compiler__conntrol__gr.html#ga84b0bad4aa39632d3faea46aa1e102a8">__STACK_LIMIT</a>));</div> |
| <div class="line"> <span class="comment">// :</span></div> |
| <div class="line"> <span class="comment">// :</span></div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gab904513442afdf77d4f8c74f23cbb040"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __STATIC_FORCEINLINE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Defines a static function that should be always inlined by the compiler.</p> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">\\ Get Interrupt Vector</div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#gab904513442afdf77d4f8c74f23cbb040">__STATIC_FORCEINLINE</a> uint32_t <a class="code" href="group__NVIC__gr.html#gaebee9cad6724a5bac1857f0f1fb6d6af">NVIC_GetVector</a>(<a class="code" href="group__NVIC__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a> IRQn)</div> |
| <div class="line">{</div> |
| <div class="line"> uint32_t *vectors = (uint32_t *)SCB->VTOR;</div> |
| <div class="line"> <span class="keywordflow">return</span> vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gaba87361bfad2ae52cfe2f40c1a1dbf9c"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __STATIC_INLINE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">\\ Get Interrupt Vector</div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#gaba87361bfad2ae52cfe2f40c1a1dbf9c">__STATIC_INLINE</a> uint32_t <a class="code" href="group__NVIC__gr.html#gaebee9cad6724a5bac1857f0f1fb6d6af">NVIC_GetVector</a>(<a class="code" href="group__NVIC__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a> IRQn)</div> |
| <div class="line">{</div> |
| <div class="line"> uint32_t *vectors = (uint32_t *)SCB->VTOR;</div> |
| <div class="line"> <span class="keywordflow">return</span> vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET];</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gabe8693a7200e573101551d49a1772fb9"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __UNALIGNED_UINT16_READ</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">uint16_t val16;</div> |
| <div class="line"> </div> |
| <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div> |
| <div class="line"> val16 = <a class="code" href="group__compiler__conntrol__gr.html#gabe8693a7200e573101551d49a1772fb9">__UNALIGNED_UINT16_READ</a>(ptr);</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gadb9cd73446f7e11e92383cd327a23407"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __UNALIGNED_UINT16_WRITE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">uint16_t val16 = 0U;</div> |
| <div class="line"> </div> |
| <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div> |
| <div class="line"> <a class="code" href="group__compiler__conntrol__gr.html#gadb9cd73446f7e11e92383cd327a23407">__UNALIGNED_UINT16_WRITE</a>(ptr, val16);</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga27fd2ec6767ca1ab66d36b5cc0103268"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __UNALIGNED_UINT32</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Do not use this macro. It has been superseded by <a class="el" href="group__compiler__conntrol__gr.html#ga254322c344d954c9f829719a50a88e87">__UNALIGNED_UINT32_READ</a>, <a class="el" href="group__compiler__conntrol__gr.html#gabb2180285c417aa9120a360c51f64b4b">__UNALIGNED_UINT32_WRITE</a> and will be removed in the future.</dd></dl> |
| <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/write operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying Arm processor core and compiler settings.</p> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">uint32_t val32;</div> |
| <div class="line"> </div> |
| <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div> |
| <div class="line"> <a class="code" href="group__compiler__conntrol__gr.html#ga27fd2ec6767ca1ab66d36b5cc0103268">__UNALIGNED_UINT32</a>(ptr) = val32;</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga254322c344d954c9f829719a50a88e87"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __UNALIGNED_UINT32_READ</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">uint32_t val32;</div> |
| <div class="line"> </div> |
| <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div> |
| <div class="line"> val32 = <a class="code" href="group__compiler__conntrol__gr.html#ga254322c344d954c9f829719a50a88e87">__UNALIGNED_UINT32_READ</a>(ptr);</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gabb2180285c417aa9120a360c51f64b4b"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __UNALIGNED_UINT32_WRITE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line">uint32_t val32 = 0U;</div> |
| <div class="line"> </div> |
| <div class="line"><span class="keywordtype">void</span> test (uint8_t *ptr) {</div> |
| <div class="line"> <a class="code" href="group__compiler__conntrol__gr.html#gabb2180285c417aa9120a360c51f64b4b">__UNALIGNED_UINT32_WRITE</a>(ptr, val32);</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="ga3e40e4c553fc11588f7a4c2a19e789e0"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __USED</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Definitions tagged with <b>__USED</b> in the source code should be not removed by the linker when detected as unused.</p> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line"><span class="comment">/* Export following variables for debugging */</span></div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> CMSIS_RTOS_API_Version = osCMSIS;</div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> CMSIS_RTOS_RTX_Version = osCMSIS_RTX;</div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> os_clockrate = OS_TICK;</div> |
| <div class="line"><a class="code" href="group__compiler__conntrol__gr.html#ga3e40e4c553fc11588f7a4c2a19e789e0">__USED</a> uint32_t <span class="keyword">const</span> os_timernum = 0;</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="gab94ebeb20055f1848d7b707d3c7cfc5d"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __VECTOR_TABLE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ga4f65c96effa79fbd610fea43ee7d745b"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __VECTOR_TABLE_ATTRIBUTE</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <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> |
| |
| </div> |
| </div> |
| <a class="anchor" id="gac607bf387b29162be6a9b77fc7999539"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __WEAK</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <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> |
| <p>Functions declared with <b>__WEAK</b> and then defined without <b>__WEAK</b> behave as non-weak functions.</p> |
| <p><b>Code Example:</b> </p> |
| <div class="fragment"><div class="line"><a class="code" href="group__compiler__conntrol__gr.html#gac607bf387b29162be6a9b77fc7999539">__WEAK</a> <span class="keywordtype">void</span> <a class="code" href="group__system__init__gr.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit</a>(<span class="keywordtype">void</span>)</div> |
| <div class="line">{</div> |
| <div class="line"> SystemCoreSetup();</div> |
| <div class="line"> SystemCoreClockSetup(); </div> |
| <div class="line">}</div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="footer">Generated on Wed Jul 10 2019 15:20:25 for CMSIS-Core (Cortex-M) Version 5.3.0 by Arm Ltd. All rights reserved. |
| <!-- |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 |
| --> |
| </li> |
| </ul> |
| </div> |
| </body> |
| </html> |