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

📄 c-config9.html

📁 this about vxworks operations systems
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<dd><p class="Body"><a name="86706"> </a>The rules for building <b class="file">vxWorks.st</b> create a module <b class="file">usrConfig_st.o</b>, which is the <b class="library">usrConfig.c</b> module compiled with the <b class="symbol_UC">STANDALONE</b> flag defined. The <b class="symbol_UC">STANDALONE</b> flag causes the <b class="library">usrConfig.c</b> module to be compiled with the built-in system symbol table, the target-resident shell, and associated interactive routines.</p><dd><p class="Body"><a name="86708"> </a>The <b class="symbol_UC">STANDALONE</b> flag also suppresses the initialization of the network. If you want to include network initialization, define <b class="symbol_UC">STANDALONE_NET</b> in either of the header files <i class="textVariable">installDir</i><b class="file">/target/config/</b><i class="textVariable">bspname/</i><b class="file">config.h</b> or <i class="textVariable">installDir</i><b class="file">/target/</b><b class="file">config/all/configAll.h</b>.<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></p><dd><p class="Body"><a name="86713"> </a>VxWorks is linked as described previously, except that the first pass through the loader does not specify the final load address; thus the output from this stage is still relocatable. The <b class="command">makeSymTbl</b> tool is invoked on the loader output; it constructs a data structure containing all the symbols in VxWorks. This structure is then compiled and linked with VxWorks itself to produce the final bootable VxWorks object module.</p><dd><p class="Body"><a name="86715"> </a>As before, to include your own application in the system image, add the object modules to the definition of <b class="symbol_UC">MACH_EXTRA </b>and follow the procedures discussed in the previous section. </p><dd><p class="Body"><a name="86716"> </a>Because <b class="file">vxWorks.st</b> has a built-in symbol table, there are some minor differences in how it treats VxWorks symbols, by contrast with the symbol table used through the target server during development. First, VxWorks symbol table entries cannot be deleted from the <b class="file">vxWorks.st</b> symbol table. Second, no local (<b class="keyword">static</b>) VxWorks symbols are present in <b class="file">vxWorks.st</b>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="86719">8.9.2  &nbsp;&nbsp;Creating a VxWorks System in ROM</a></i></h4></font><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="86720">General Procedures</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86722"> </a>To put VxWorks or a VxWorks-based application into ROM, you must enter the object files on the loader command line in an order that lists the module <b class="file">romInit.o</b> before <b class="file">sysALib.o</b>. Also specify the entry point option <b class="command">-e</b><b class="file">&nbsp;_romInit</b>. The <b class="routine"><i class="routine">romInit</i></b><b>(&nbsp;)</b> routine initializes the stack pointer to point directly below the text segment. It then calls <b class="routine"><i class="routine">bootInit</i></b><b>(&nbsp;)</b>, which clears memory and copies the <b class="file">vxWorks</b> text and data segments to the proper location in RAM. Control is then passed to <b class="routine"><i class="routine">usrInit</i></b><b>(&nbsp;)</b>.</p><dd><p class="Body"><a name="86728"> </a>A good example of a ROM-based VxWorks application is the VxWorks boot ROM program itself. The file <i class="textVariable">installDir</i><b class="file">/target/config/all/bootConfig.c</b> is the configuration module for the boot ROM, replacing the file <b class="library">usrConfig.c</b> provided for the default VxWorks development system. The makefiles in the target-specific directories contain directives for building the boot ROMs, including conversion to a file format suitable for downloading to a PROM programmer. Thus, you can generate the ROM image with the following <b class="command">make</b> command:</p><dl class="margin"><dd><pre class="Code2"><b><a name="86729"></b><tt class="output">% </tt><b>make bootrom.hex</a></b></pre></dl><dd><p class="Body"><a name="86730"> </a>Tornado makefiles also define a ROMable VxWorks runtime system suitable for use with Tornado tools, as the target <b class="file">vxWorks.res_rom_nosym</b>. To generate this image in a form suitable for writing ROMs, run the following command:</p><dl class="margin"><dd><pre class="Code2"><b><a name="86732"></b><tt class="output">% </tt><b>make vxWorks.res_rom_nosym.hex</a></b></pre></dl><dd><p class="Body"><a name="86734"> </a>VxWorks target makefiles also include the entry <b class="file">vxWorks.st_rom</b> for creating a ROMable version of the standalone system described in the previous section. <b class="file">vxWorks.st_rom</b> differs from <b class="file">vxWorks.st</b> in two respects: (1) <b class="file">romInit</b> code is loaded as discussed above, and (2) the portion of the system image that is not essential for booting is compressed by approximately 40 percent using the VxWorks <b class="command">compress</b> tool (see <a href="c-config9.html#86745"><i class="title">Boot ROM Compression</i></a>). </p><dd><p class="Body"><a name="86740"> </a>To build the form of this target that is suitable for writing into a ROM (most often, this form uses the Motorola S-record format), enter:</p><dl class="margin"><dd><pre class="Code2"><b><a name="86741"></b><tt class="output">% </tt><b>make vxWorks.st_rom.hex</a></b></pre></dl><dd><p class="Body"><a name="86742"> </a>When adding application modules to a ROMable system, size is again an important consideration. Keep in mind that by using the <b class="command">compress</b> tool, a configuration that normally requires a 256-KB ROM may well fit into a 128-KB ROM. Be sure that <b class="symbol_UC">ROM_SIZE</b> (in both <b class="file">config.h</b> and <b class="file">Makefile</b>) reflects the capacity of the ROMs used.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="86745">Boot ROM Compression</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86747"> </a>VxWorks boot ROMs are compressed to about 40 percent of their actual size using a binary compression algorithm, which is supplied as the tool <b class="command">compress</b>. When control is passed to the ROMs on system reset or reboot, a small (8 KB) uncompression routine, which is <i class="emphasis">not</i> itself compressed, is executed. It then uncompresses the remainder of the ROM into RAM and jumps to the start of the uncompressed image in RAM. There is a short delay during the uncompression before the VxWorks prompt appears. The uncompression time depends on CPU speed and code size; it takes about 4 seconds on an MC68030 at 25 MHz.</p><dd><p class="Body"><a name="86749"> </a>This mechanism is also available to compress a ROMable VxWorks application. The entry for <b class="file">vxWorks.st_rom</b> in the architecture-independent portion of the makefile, <i class="textVariable">installDir</i><b class="file">/target/h/make/rules.bsp</b>, demonstrates how this can be accomplished. For more information, see also the reference manual entries for <b class="library">bootInit </b>and <b class="library">compress</b>. </p><dd><p class="Body"><a name="86751"> </a></p><dd><p class="Body"><a name="79990"> </a></p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="86712"> </a> <b class="file">vxWorks.st</b> suppresses network initialization, but it includes the network.  The <b class="symbol_UC">STANDALONE</b> option defines <b class="symbol_UC">INCLUDE_STANDALONE_SYM_TBL</b> and <b class="symbol_UC">INCLUDE_NETWORK</b>, and undefines <b class="symbol_UC">INCLUDE_NET_SYM_TBL</b> and <b class="symbol_UC">INCLUDE_NET_INIT</b>.  The alternative option <b class="symbol_UC">STANDALONE_NET</b> includes <b class="symbol_UC">INCLUDE_NET_INIT</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-config8.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-tshell.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 + -