📄 c-config8.html
字号:
<dl class="margin"><dd><div class="Item"><a name="86567"> </a><b class="symbol_UC">TARGET_DIR </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86568"> </a>Name of the BSP (used for dependency lists and name of documentation reference entry). The value matches the <i class="textVariable">bspname</i> directory name.</div><br></dl></dl><dd><div class="Item"><a name="86570"> </a><b class="symbol_UC">ROM_TEXT_ADRS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86571"> </a>Address of the ROM entry point. Also defined in <b class="file">config.h</b>; the two definitions must match.</div><br></dl></dl><dd><div class="Item"><a name="86573"> </a><b class="symbol_UC">ROM_SIZE </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86574"> </a>Number of bytes available in the ROM. Also defined in <b class="file">config.h</b>; the two definitions must match.</div><br></dl></dl><dd><div class="Item"><a name="86576"> </a><b class="symbol_UC">RAM_HIGH_ADRS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86577"> </a>RAM address where the boot ROM data segment is loaded. Must be a high enough value to ensure loading VxWorks does not overwrite part of the ROM program. Also defined in <b class="file">config.h</b>; the two definitions must match. See <a href="c-config9.html#86670"><i class="title">8.9 Creating Bootable Applications</i></a> for more discussion. </div><br></dl></dl><dd><div class="Item"><a name="86582"> </a><b class="symbol_UC">RAM_LOW_ADRS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86583"> </a>Beginning address to use for the VxWorks run-time in RAM.</div><br></dl></dl><dd><div class="Item"><a name="86585"> </a><b class="symbol_UC">HEX_FLAGS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86586"> </a>Option flags for the program (such as <b class="command">hex</b>, <b class="command">coffHex</b>, or <b class="command">elfHex</b>) that converts a boot program into S-records or the equivalent.</div><br></dl></dl><dd><div class="Item"><a name="86588"> </a><b class="symbol_UC">LDFLAGS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86589"> </a>Linker options for the static link of VxWorks and boot ROMs.</div><br></dl></dl><dd><div class="Item"><a name="86591"> </a><b class="symbol_UC">ROM_LDFLAGS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86592"> </a>Additional static-link option flags specific to boot ROM images.</div><br></dl></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="86594">Variables for Customizing the Run-Time</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86596"> </a>The variables listed in this section make it easy to control what facilities are statically linked into your run-time system. You can specify values for these variables either from the <b class="command">make</b> command line, or from your own makefiles (when you take advantage of the predefined VxWorks make include files).</p></dl><dl class="margin"><dd><div class="Item"><a name="86598"> </a><b class="symbol_UC">CONFIG_ALL </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86599"> </a>Location of a directory containing the architecture-independent BSP configuration files. Set this variable if you maintain several versions of these files for different purposes. Default: <i class="textVariable">installDir</i><b class="file">/target/config/all</b>.</div><br></dl></dl><dd><div class="Item"><a name="86601"> </a><b class="symbol_UC">LIB_EXTRA </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86602"> </a>Linker options to include additional archive libraries (you must specify the complete option, including the <b class="command">-L</b> for each library). These libraries appear in the link command before the standard VxWorks libraries.</div><br></dl></dl><dd><div class="Item"><a name="86604"> </a><b class="symbol_UC">MACH_EXTRA </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86605"> </a>Names of application modules to include in the static link to produce a VxWorks run-time. See <a href="c-config9.html#86670"><i class="title">8.9 Creating Bootable Applications</i></a>.</div><br></dl></dl><dd><div class="Item"><a name="86610"> </a><b class="symbol_UC">ADDED_MODULES </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86611"> </a>Do not define a value for this variable in makefiles. This variable is reserved for adding modules to a static link from the <b class="command">make</b> command line. Its value is used in the same way as <b class="symbol_UC">MACH_EXTRA</b>, to include additional modules in the link. Reserving a separate variable for use from the command line avoids the danger of overriding any object modules that are already listed in <b class="symbol_UC">MACH_EXTRA</b>.</div><br></dl></dl><dd><div class="Item"><a name="86613"> </a><b class="symbol_UC">EXTRA_INCLUDE </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86614"> </a>Preprocessor options to define any additional header-file directories required for your application (you must specify the complete option, including the <b class="command">-I</b>).</div><br></dl></dl><dd><div class="Item"><a name="86616"> </a><b class="symbol_UC">EXTRA_DEFINE </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86617"> </a>Definitions for application-specific preprocessor constants (you must specify the complete option, including the <b class="command">-D</b>).</div><br></dl></dl><dd><div class="Item"><a name="86619"> </a><b class="symbol_UC">ADDED_CFLAGS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86620"> </a>Application-specific compiler options for C programs.</div><br></dl></dl><dd><div class="Item"><a name="86622"> </a><b class="symbol_UC">ADDED_C++FLAGS </b></div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86624"> </a>Application-specific compiler options for C++ programs.</div><br></dl></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="86626">8.8.2 Using Makefile Include Files for Application Modules</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86628"> </a>You can exploit the VxWorks makefile structure to put together your own application makefiles quickly and tersely. If you build your application directly in a BSP directory (or in a copy of one), you can use the <b class="file">Makefile</b> in that BSP, by specifying variable definitions (<a href="c-config8.html#86594"><i class="title">Variables for Customizing the Run-Time</i></a>) that include the components of your application.</p><dd><p class="Body"><a name="86638"> </a>You can also take advantage of the Tornado makefile structure if you develop application modules in separate directories. <a href="c-config8.html#86658">Example 8-2</a> illustrates the general scheme: include the makefile headers that specify variables, and list the object modules you want built as dependencies of a target. This simple scheme is usually sufficient, because the Tornado makefile variables are carefully designed to fit into the default rules that <b class="command">make</b> knows about.<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/note.gif"></td><td><hr><div class="CalloutCell"><a name="87151"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>The target name <b class="keyword">exe</b> is the Tornado convention for a default make target. You may either use that target name (as in <a href="c-config8.html#86658">Example 8-2</a>), or define a different <b class="keyword">default</b> rule in your makefiles. However, there must always be an <b class="keyword">exe</b> target in makefiles based on the Tornado makefile headers (even if the associated rules do nothing).</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><h4 class="EntityTitle"><a name="86658"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 8-2: Skeleton Makefile for Application Modules</font></a></h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="89723"># Makefile - makefile for ... # # Copyright ... # # DESCRIPTION # This file specifies how to build ... # ## It is often convenient to override the following with "make CPU=..." CPU = <i class="textVariable">cputype</i> TOOL = gnu include $(WIND_BASE)/target/h/make/defs.bsp include $(WIND_BASE)/target/h/make/make.$(CPU)$(TOOL) include $(WIND_BASE)/target/h/make/defs.$(WIND_HOST_TYPE) ## Only redefine make definitions below this point, or your definitions ## will be overwritten by the makefile stubs above. exe : <i class="textVariable">myApp</i>.o</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="89724">8.8.3 Makefile for SIO Drivers</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86660"> </a>The directory <i class="textVariable">installDir</i><b class="file">/target/src/drv/sio/</b> contains source and templates for serial drivers that support both polled and asynchronous communications. The makefile for drivers in this directory is named <b class="file">Makefile.sio</b>. Because this is not one of the names <b class="command">make</b> can find automatically, you must specify the makefile with the <b class="command">-f</b> option when you build a driver in this directory.</p><dd><p class="Body"><a name="86661"> </a>For example, to build the driver <b class="file">cd2400Sio.c</b> and install it in the VxWorks archives, execute the following commands in this directory:</p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="86662">Windows </a></i></h5></font><dl class="margin"><dd><pre class="Code"><b><a name="86663"></b><tt class="output">C:\tornado\target\src\drv\sio> </tt><b>make -f Makefile.sio CPU=<i class="textVariable">cputype</i> cd2400Sio.o </b><tt class="output">C:\tornado\target\src\drv\sio> </tt><b>make -f Makefile.sio CPU=<i class="textVariable">cputype</i> default</a></b></pre></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="86665">UNIX </a></i></h5></font><dl class="margin"><dd><pre class="Code"><b><a name="86667"></b><tt class="output">% </tt><b>make -f Makefile.sio CPU=<i class="textVariable">cputype</i> cd2400Sio.o default </a></b></pre></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1: <span class="Footnote"><a name="86644"> </a>However, if you are working with C++, it may be also convenient to copy the <b class="keyword">.cpp.out</b> rule from <i class="textVariable">installDir</i><b class="file">/target/h/make/rules.bsp</b> into your application's <b class="file">Makefile</b>.</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="c-config.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-config7.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-config9.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 + -