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

📄 c-config4.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<td colspan=1 rowspan=1><div class="CellBody"><a name="85273"> </a>i386,i486, Pentium, <br>PentiumPro&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85275"> </a><b class="symbol_UC">I80386</b>, <b class="symbol_UC">I80486</b>, <b class="symbol_UC">PENTIUM</b><sup><b class="FootnoteMarker">4</b></sup> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85277"> </a>MIPS&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85279"> </a><b class="symbol_UC">R3000</b>, <b class="symbol_UC">R4000</b>, <b class="symbol_UC">R4650</b>&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85281"> </a>PowerPC &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85283"> </a><b class="symbol_UC">PPC403</b>, <b class="symbol_UC">PPC603</b>, <b class="symbol_UC">PPC604</b>, <b class="symbol_UC">PPC860</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85285"> </a>ARM &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85287"> </a><b class="symbol_UC">ARM7TDMI</b>, <b class="symbol_UC">ARM7TDMI_T</b>, <b class="symbol_UC">ARMSA110</b>, <b class="symbol_UC">ARM710A</b>, <b class="symbol_UC">ARM810 </b>&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85289"> </a>Simulators &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85291"> </a><b class="command">SIMSPARCSOLARIS</b>, <b class="command">SIMHPPA</b>, <b class="command">SIMNT</b> &nbsp;</div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"><p class="FootnoteNumberMarker">1:&nbsp;<span class="TableFootnote"><a name="85262"> </a><b class="symbol_UC">MC68020</b> is the appropriate value for both the MC68020 and the MC68030 CPUs.</span></p><p class="FootnoteNumberMarker">2:&nbsp;<span class="TableFootnote"><a name="89519"> </a><b class="symbol_UC">MC68LC040</b> is the appropriate value for both the MC68LC040 and the MC68EC040.</span></p><p class="FootnoteNumberMarker">3:&nbsp;<span class="TableFootnote"><a name="89522"> </a><b class="symbol_UC">SPARC</b> is the appropriate value for both SPARC and SPARClite CPUs.</span></p><p class="FootnoteNumberMarker">4:&nbsp;<span class="TableFootnote"><a name="89525"> </a><b class="symbol_UC">PENTIUM</b> is the appropriate value for both Pentium and PentiumPro CPUs. </span></p></td></tr></table></p></p><dd><p class="Body"><a name="85293"> </a>With makefiles, the <b class="symbol_UC">CPU</b> definition can be added to the definition of the flags passed to the compiler (usually <b class="symbol_UC">CFLAGS</b>).</p><dd><p class="Body"><a name="85295"> </a>In the source code, the file <b class="file">vxWorks.h</b> must be included before any other files with dependencies on the <b class="symbol_UC">CPU</b> flag.</p><dd><p class="Body"><a name="85296"> </a>As well as specifying the <b class="symbol_UC">CPU</b> value, you must usually run the compiler with one or more option flags to generate object code optimally for the particular architecture variant. These option flags usually begin with <b class="command">-m</b>; see <a href="c-config4.html#85302"><i class="title">Compiling C Modules</i></a>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85302">Compiling C Modules</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85304"> </a>The following is an example command to compile an application module for a VxWorks MC68020 system:</p><dl class="margin"><dd><pre class="Code2"><b><a name="85305"></b><tt class="output">% </tt><b>cc68k -fno-builtin -I %WIND_BASE%\target\h -nostdinc -O \ -c -DCPU=MC68020 applic.c</a></b></pre></dl><dd><p class="Body"><a name="85309"> </a>This compiles the module <b class="file">applic.c</b> into an object file <b class="file">applic.o</b>. <a href="c-config4.html#85314">Table&nbsp;8-5</a> shows a similar example compiler invocation for each CPU architecture family.<p class="table"><h4 class="EntityTitle"><a name="85314"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 8-5:&nbsp;&nbsp;Compiler Invocation by Architecture Family</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85318"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Architecture</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85320"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Example Invocation</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85322"> </a>MC680<i class="textVariable">x</i>0 &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85324"> </a><b class="command">cc68k -fno-builtin -I $(WIND_BASE)/target/h -nostdinc -O -c\ <br>-m68040 -DCPU=MC68040 applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85326"> </a>SPARC &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85328"> </a><b class="command">ccsparc -fno-builtin -I $(WIND_BASE)/target/h -nostdinc -O2 -c \ <br>-DCPU=SPARC applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85330"> </a>SPARClite &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85332"> </a><b class="command">ccsparc -fno-builtin -I $(WIND_BASE)/target/h -nostdinc -O2 -c \ <br>-msparclite -DCPU=SPARC applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85334"> </a>i960 &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85339"> </a>See your i960 toolkit documentation and <a href="x-960.html#84369"><i class="title">C.&nbsp;Intel i960</i></a>. &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85341"> </a>i386/i486 &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85343"> </a><b class="command">cc386 -fno-builtin -I $(WIND_BASE)/target/h -nostdinc -O -c \ <br>-fno-defer-pop -mno-486 -DCPU=I80386 applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85345"> </a>MIPS &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85347"> </a><b class="command">ccmips -fno-builtin -I $(WIND_BASE)/target/h -nostdinc -O2 -c \ <br>-mcpu=r4000 -mips3 -G&nbsp;0 -DCPU=R4000 applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85349"> </a>PowerPC &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85351"> </a><b class="command">ccppc -O2 -mcpu=603 -I$WIND_BASE/target/h -fno-builtin \ <br>-fno-for-scope -nostdinc -DCPU=PPC603 -D_GNU_TOOL -c applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85353"> </a>ARM &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85355"> </a><b class="command">ccarm -DCPU=ARM7TDMI -mcpu=arm7tdmi -mno-sched-prolog \ <br>-fno-builtin -O2 -nostdinc -I $WIND_BASE/target/h -c applic.c</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85357"> </a>Simulator &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85359"> </a><b class="command">ccsimso -DCPU=SIMSPARCSOLARIS -ansi -nostdinc -g \ <br>-fno-builtin -fvolatile -DRW_MULTI_THREAD -D_REENTRANT \ <br>-O2 -I. -I /wind/target/h -c applic.c</b> &nbsp;</div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="85364"> </a>The following list gives summary descriptions of the compiler flags in <a href="c-config4.html#85314">Table&nbsp;8-5</a>. For more information, see the <i class="title">GNU ToolKit User's Guide</i>, or the architecture appendices.</p></dl><dl class="margin"><dd><div class="Item"><a name="85365"> </a><b class="command">-c </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85367"> </a>Compile only; do not link for execution under the host. The output is an unlinked object module with the suffix ".o", in this case <b class="file">applic.o</b>.</div><br></dl></dl><dd><div class="Item"><a name="85368"> </a><b class="command">-</b><b class="symbol_UC">DCPU</b><b class="command">=</b><i class="textVariable">arch </i></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85370"> </a><b class="command"></b>Define the CPU type. </div><br></dl></dl><dd><div class="Item"><a name="85371"> </a><b class="command">-</b><b class="symbol_UC">DVX_IGNORE_GNU_LIBS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85373"> </a><b class="command"></b>Define the constant used by the i960 configuration to suppress the use of the GNU libraries (<b class="command">cc960</b> only).</div><br></dl></dl><dd><div class="Item"><a name="85374"> </a><b class="command">-</b><b class="symbol_UC">D_GNU_TOOL </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85376"> </a><b class="command"></b>Required; defines the compilation toolkit used to compile VxWorks or applications (<b class="command">ccppc</b> only).</div><br></dl></dl><dd><div class="Item"><a name="85377"> </a><b class="command">-fno-builtin </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85379"> </a><b class="command"></b>Use library calls even for common library subroutines.</div><br></dl></dl><dd><div class="Item"><a name="85380"> </a><b class="command">-fno-defer-pop </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85382"> </a><b class="command"></b>Always pop the arguments to each function call as soon as that function returns.</div><br></dl></dl><dd><div class="Item"><a name="85384"> </a><b class="symbol_lc">-fno-for-scope</b> </div><dl class="margin"><dl class="margin">

⌨️ 快捷键说明

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