📄 x-arm2.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title> ARM </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="x-arm.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-arm1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-arm3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="84381">G.2 Building Applications</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84382"> </a>The Tornado 2.0 project facility is correctly preconfigured for building WRS BSPs. However, if you choose not to use the project facility or if you need to customize your build, you may need the information in the following sections. This includes a configuration constant, an environment variable, and compiler options that together specify the information the GNU toolkit requires to compile correctly for ARM/Thumb targets. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84384">Defining the CPU Type</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84385"> </a>Setting the preprocessor variable <b class="symbol_UC">CPU</b> ensures that VxWorks and your applications build with the appropriate architecture-specific features enabled. Define this variable to one of the following values, to match the processor you are using: <p class="table"><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86159"> </a><b class="symbol_UC">ARM7TDMI </b></p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86161"> </a>ARM-7TDMI (ARM state) </p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86163"> </a><b class="symbol_UC">ARM7TDMI_T</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86165"> </a>ARM-7TDMI (Thumb state) </p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86167"> </a><b class="symbol_UC">ARMSA110</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86169"> </a>StrongARM-110 or StrongARM-1100</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86171"> </a><b class="symbol_UC">ARM710A</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86173"> </a>ARM-710A </p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86175"> </a><b class="symbol_UC">ARM810</b> </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="86177"> </a>ARM-810 </p></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="84407"> </a>For example, to define <b class="symbol_UC">CPU</b> for an ARM-7TDMI on the compiler command line, specify the following command-line option when you invoke the compiler:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84408">-DCPU=ARM7TDMI</a></b></pre></dl><dd><p class="Body"><a name="84409"> </a>To provide the same information in a header or source file instead, include the following line in the file:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84410">#define CPU ARM7TDMI</a></b></pre></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84411">Configuring the GNU ToolKit Environment</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84412"> </a>Tornado includes the GNU compiler and associated tools. No change is required to the execution path, because the compilation chain is installed in the same <b class="file">bin</b> directory as the other Tornado executables. For more information, see <i class="title">Tornado Getting Started</i>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84414">Compiling C and C++ Modules</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84415"> </a>The following is an example of a compiler command line for ARM cross-development. The file to be compiled in this example has a base name of <b class="file">applic</b>.</p><dl class="margin"><dd><pre class="Code2"><b><a name="84416"></b><tt class="output">% </tt><b>ccarm -DCPU=ARM7TDMI -mcpu=arm7tdmi -mno-sched-prolog \ -I $WIND_BASE/target/h -fno-builtin -O2 -nostdinc -c applic.<i class="textVariable">language_id</i></a></b></pre></dl><dd><p class="Body"><a name="84420"> </a>The options shown in the example have the following meanings:<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></p></dl><dl class="margin"><dd><div class="Item"><a name="84421"> </a><b class="symbol_lc">ccarm</b> </div><dl class="margin"><dd><div class="Indent"><a name="84422"> </a>Required; use <b class="symbol_lc">ccarm</b> for GNU C and C++ support.</div><br></dl><dd><div class="Item"><a name="84423"> </a><b class="symbol_UC">-DCPU=ARM7TDMI</b> </div><dl class="margin"><dd><div class="Indent"><a name="84427"> </a>Required; defines the CPU type. See the table on page <a href="x-arm2.html#84384">508</a>. </div><br></dl><dd><div class="Item"><a name="84428"> </a><b class="symbol_lc">-mcpu=arm7tdmi</b> </div><dl class="margin"><dd><div class="Indent"><a name="84429"> </a>Required for ARM; specifies the instruction set. Use the following:<p class="table"><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="84432"> </a><b class="symbol_lc">-mcpu=arm7tdmi </b></p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="84434"> </a>for the ARM-7TDMI</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="84436"> </a><b class="symbol_lc">-mcpu=arm710 </b></p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="84438"> </a>for the ARM-710A</p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="84440"> </a><b class="symbol_lc">-mcpu=arm810 </b></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -