⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x-ix862.html

📁 vxworks相关论文
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    Intel x86   </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-ix86.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-ix861.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-ix863.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="84383">D.2  &nbsp;&nbsp;Building Applications</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84384"> </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 x86 targets.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84386">Defining the CPU Type</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84387"> </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 either <b class="symbol_UC">I80386</b>, <b class="symbol_UC">I80486</b>, or <b class="symbol_UC">PENTIUM</b> to match the processor you are using.</p><dd><p class="Body"><a name="84388"> </a>For example, to define <b class="symbol_UC">CPU</b> for an i386 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="84389">-DCPU=I80386</a></b></pre></dl><dd><p class="Body"><a name="84390"> </a>To provide the same information in a header or source file, include the following line in the file:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84391">#define CPU I80386</a></b></pre></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84393">Configuring the GNU ToolKit Environment</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84394"> </a>Tornado includes the GNU compiler and associated tools. Tornado is configured to use these tools by default. 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. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84396">Compiling C and C++ Modules</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84397"> </a>The following is an example of a compiler command line for Intel x86 cross-development. The file to be compiled in this example has the base name of <b class="file">applic</b>.</p><dl class="margin"><dd><pre class="Code2"><b><a name="84398"></b><tt class="output">% </tt><b>cc386<i class="textVariable"> </i>-DCPU=I80386 -I $WIND_BASE/target/h -fno-builtin -0 \ -mno-486 -fno-defer-pop -nostdinc -c applic.<i class="textVariable">lang_id</i></a></b></pre></dl><dd><p class="Body"><a name="84402"> </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="84404"> </a><b class="command">cc386</b> </div><dl class="margin"><dd><div class="Indent"><a name="84405"> </a>Required; use <b class="command">cc386</b> for all supported x86 processors.</div><br></dl><dd><div class="Item"><a name="84407"> </a><b class="symbol_UC">-DCPU=I80386</b> </div><dl class="margin"><dd><div class="Indent"><a name="84408"> </a>Required; defines the CPU type for the i386. If you are using another CPU type, specify the appropriate value (see <a href="x-ix862.html#84386"><i class="title">Defining the CPU Type</i></a>). </div><br></dl><dd><div class="Item"><a name="84410"> </a><b class="command">-I</b> <b class="symbol_UC">$WIND_BASE</b><b class="file">/target/h</b> </div><dl class="margin"><dd><div class="Indent"><a name="84411"> </a>Required; includes VxWorks header files. (Additional <b class="command">-I</b> flags may be included to specify other header files.)</div><br></dl><dd><div class="Item"><a name="84413"> </a><b class="command">-fno-builtin</b> </div><dl class="margin"><dd><div class="Indent"><a name="84414"> </a>Required; uses library calls even for common library routines.</div><br></dl><dd><div class="Item"><a name="84416"> </a><b class="command">-O</b> </div><dl class="margin"><dd><div class="Indent"><a name="84417"> </a>Optional; performs standard optimizations. Note that optimization is not supported for the Pentium.</div><br></dl><dd><div class="Item"><a name="84419"> </a><b class="command">-mno-486</b> </div><dl class="margin"><dd><div class="Indent"><a name="84420"> </a>Required for the i386; generates optimized code for the i386. For the i486, the compiler automatically generates optimized code; no additional flags are required.</div><br></dl><dd><div class="Item"><a name="84422"> </a><b class="command">-fno-defer-pop</b> </div><dl class="margin"><dd><div class="Indent"><a name="84423"> </a>Required; pops the arguments to each subroutine call as soon as that subroutine returns.</div><br></dl><dd><div class="Item"><a name="84425"> </a><b class="command">-nostdinc</b> </div><dl class="margin"><dd><div class="Indent"><a name="84426"> </a>Required; searches only the directory(ies) specified with the <b class="command">-I </b>flag (see above) and the current directory for header files. Does not search host-system include files.</div><br></dl><dd><div class="Item"><a name="84428"> </a><b class="command">-fvolatile</b> </div><dl class="margin"><dd><div class="Indent"><a name="84429"> </a>Optional; considers all memory references through pointers to be volatile.</div><br></dl><dd><div class="Item"><a name="84431"> </a><b class="command">-c</b> </div><dl class="margin"><dd><div class="Indent"><a name="84432"> </a>Required; specifies that the module is to be compiled only, and not linked for execution under the host.</div><br></dl><dd><div class="Item"><a name="84434"> </a><b class="file">applic.</b><i class="textVariable">lang_id</i> </div><dl class="margin"><dd><div class="Indent"><a name="84435"> </a>Required; the file(s) to compile. For C compilation, specify a suffix of <b class="file">.c</b>. For C++ compilation, specify a suffix of <b class="file">.cpp</b>. The output is an unlinked object module in <b class="file">a.out</b> format with the suffix <b class="file">.o</b>; for the example, the output is <b class="file">applic.o</b>.</div><br><dd><div class="Indent"><a name="84436"> </a>During C++ compilation, the compiled object module (<b class="file">applic.o</b>) is <i class="term">munched</i>. Munching is the process of scanning an object module for non-local static objects, and generating data structures that VxWorks run-time support can use to call the objects' constructors and destructors. For details, see the <i class="title">VxWorks Programmer's Guide: C++ Development</i>.<b></b></div><br></dl></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="84401"> </a>For more information on these and other compiler options, see the <i class="title">GNU ToolKit User's Guide</i>. WRS supports compiler options used in building WRS software; a list of these options is included in the <i class="title">Guide</i>. Other options are not supported, although they are available with the tools as shipped.</span><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-ix86.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-ix861.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-ix863.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -