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

📄 c-config3.html

📁 this about vxworks operations systems
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<dd><p class="Body"><a name="84601"> </a>The inclusion or exclusion of <b class="symbol_UC">INCLUDE_IO_SYSTEM</b> also affects whether the console devices are created, and whether standard in, standard out, and standard error are set; see the next two sections for more information.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84603">Creation of the Console Devices</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84604"> </a>If the driver for the on-board serial ports is included (<b class="symbol_UC">INCLUDE_TTY_DEV</b>), it is installed in the I/O system by calling the driver's initialization routine, typically <b class="routine"><i class="routine">ttyDrv</i></b><b>(&nbsp;)</b>. The actual devices are then created and named by calling the driver's device-creation routine, typically <b class="routine"><i class="routine">ttyDevCreate</i></b><b>(&nbsp;)</b>. The arguments to this routine includes the device name, a serial I/O channel descriptor (from the BSP), and input and output buffer sizes.</p><dd><p class="Body"><a name="84608"> </a>The macro <b class="symbol_UC">NUM_TTY</b> specifies the number of <i class="acronym_lc">tty</i> ports (default is 2), <b class="symbol_UC">CONSOLE_TTY</b> specifies which port is the console (default is 0), and <b class="symbol_UC">CONSOLE_BAUD_RATE</b> specifies the bps rate (default is 9600). These macros are specified in <b class="file">configAll.h</b>, but can be overridden in <b class="file">config.h</b> for boards with a nonstandard number of ports.</p><dd><p class="Body"><a name="84611"> </a>PCs can use an alternative console with keyboard input and VGA output; see your PC workstation documentation for details.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84614">Setting of Standard In, Standard Out, and Standard Error</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84615"> </a>The system-wide standard in, standard out, and standard error assignments are established by opening the console device and calling <b class="routine"><i class="routine">ioGlobalStdSet</i></b><b>(&nbsp;)</b>. These assignments are used throughout VxWorks as the default devices for communicating with the application developer. To make the console device an interactive terminal, call <b class="routine"><i class="routine">ioctl</i></b><b>(&nbsp;)</b> to set the device options to <b class="symbol_UC">OPT_TERMINAL</b>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84619">Installation of Exception Handling and Logging</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84621"> </a>Initialization of the VxWorks exception handling facilities (supplied by the module <b class="library">excLib</b>) and logging facilities (supplied by <b class="library">logLib</b>) takes place early in the execution of the root task. This facilitates detection of program errors in the root task itself or in the initialization of the various facilities.</p><dd><p class="Body"><a name="84624"> </a>The exception handling facilities are initialized by calling <b class="routine"><i class="routine">excInit</i></b><b>(&nbsp;)</b> when <b class="symbol_UC">INCLUDE_EXC_HANDLING</b> and <b class="symbol_UC">INCLUDE_EXC_TASK</b> are defined. The <b class="routine"><i class="routine">excInit</i></b><b>(&nbsp;)</b> routine spawns the exception support task, <b class="routine"><i class="routine">excTask</i></b><b>(&nbsp;)</b>. Following this initialization, program errors causing hardware exceptions are safely trapped and reported, and hardware interrupts to uninitialized vectors are reported and dismissed. The VxWorks signal facility, used for task-specific exception handling, is initialized by calling <b class="routine"><i class="routine">sigInit</i></b><b>(&nbsp;)</b> when <b class="symbol_UC">INCLUDE_SIGNALS</b> is defined.</p><dd><p class="Body"><a name="84631"> </a>The logging facilities are initialized by calling <b class="routine"><i class="routine">logInit</i></b><b>(&nbsp;)</b> when <b class="symbol_UC">INCLUDE_LOGGING</b> is defined. The arguments specify the file descriptor of the device to which logging messages are to be written, and the number of log message buffers to allocate. The logging initialization also includes spawning the logging task, <b class="routine"><i class="routine">logTask</i></b><b>(&nbsp;)</b>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84634">Initialization of the Pipe Driver</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84638"> </a>If named pipes are desired, define <b class="symbol_UC">INCLUDE_PIPE</b> in <b class="file">configAll.h</b> so that <b class="routine"><i class="routine">pipeDrv</i></b><b>(&nbsp;)</b> is called automatically to initialize the pipe driver. Tasks can then use pipes to communicate with each other through the standard I/O interface. Pipes must be created with <b class="routine"><i class="routine">pipeDevCreate</i></b><b>(&nbsp;)</b>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84642">Initialization of Standard I/O</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84644"> </a>VxWorks includes an optional <i class="term">standard I/O</i> package when <b class="symbol_UC">INCLUDE_STDIO</b> is defined.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84646">Creation of File System Devices and Initialization of Device Drivers</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84647"> </a>Many VxWorks configurations include at least one disk device or RAM disk with a dosFs, rt11Fs, or rawFs file system. First, a disk driver is installed by calling the driver's initialization routine. Next, the driver's device-creation routine defines a device. This call returns a pointer to a <b class="symbol_UC">BLK_DEV</b> structure that describes the device.</p><dd><p class="Body"><a name="84652"> </a>The new device can then be initialized and named by calling the file system's device-initialization routine--<b class="routine"><i class="routine">dosFsDevInit</i></b><b>(&nbsp;)</b>, <b class="routine"><i class="routine">rt11FsDevInit</i></b><b>(&nbsp;)</b>, or <b class="routine"><i class="routine">rawFsDevInit</i></b><b>(&nbsp;)</b>--when the respective constants <b class="symbol_UC">INCLUDE_DOSFS</b>, <b class="symbol_UC">INCLUDE_RT11FS</b>, and <b class="symbol_UC">INCLUDE_RAWFS</b> are defined. (Before a device can be initialized, the file system module must already be initialized with <b class="routine"><i class="routine">dosFsInit</i></b><b>(&nbsp;)</b>, <b class="routine"><i class="routine">rt11FsInit</i></b><b>(&nbsp;)</b>, or <b class="routine"><i class="routine">rawFsInit</i></b><b>(&nbsp;)</b>.) The arguments to the file system device-initialization routines depend on the particular file system, but typically include the device name, a pointer to the <b class="symbol_UC">BLK_DEV</b> structure created by the driver's device-creation routine, and possibly some file-system-specific configuration parameters.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84663">Initialization of Floating-Point Support</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84665"> </a>Support for floating-point <i class="emphasis">I/O</i> is initialized by calling the routine <b class="routine"><i class="routine">floatInit</i></b><b>(&nbsp;)</b> when <b class="symbol_UC">INCLUDE_FLOATING_POINT</b> is defined in <b class="file">configAll.h</b>. Support for floating-point <i class="emphasis">coprocessors</i> is initialized by calling <b class="routine"><i class="routine">mathHardInit</i></b><b>(&nbsp;)</b><b> </b>when <b class="symbol_UC">INCLUDE_HW_FP</b> is defined. Support for software floating-point <i class="emphasis">emulation</i> is initialized by calling <b class="routine"><i class="routine">mathSoftInit</i></b><b>(&nbsp;)</b><b> </b>when <b class="symbol_UC">INCLUDE_SW_FP</b> is defined. See the appropriate architecture appendix for details on your processor's floating-point support.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84672">Inclusion of Performance Monitoring Tools</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84673"> </a>VxWorks has two built-in performance monitoring tools. A task activity summary is provided by <b class="library">spyLib</b>, and a subroutine execution timer is provided by <b class="library">timexLib</b>. These facilities are included by defining the macros <b class="symbol_UC">INCLUDE_SPY</b> and <b class="symbol_UC">INCLUDE_TIMEX</b>, respectively, in <b class="file">configAll.h</b>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84677">Initialization of the Network</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84678"> </a>Before the network can be used, it must be initialized with the routine <b class="routine"><i class="routine">usrNetInit</i></b><b>(&nbsp;)</b>, which is called by <b class="routine"><i class="routine">usrRoot</i></b><b>(&nbsp;)</b> when the constant <b class="symbol_UC">INCLUDE_NET_INIT</b> is defined in one of the configuration header files. (The source for <b class="routine"><i class="routine">usrNetInit</i></b><b>(&nbsp;)</b> is in <i class="textVariable">installDir</i><b class="file">/target/src/config/usrNetwork.c</b>.) The routine <b class="routine"><i class="routine">usrNetInit</i></b><b>(&nbsp;)</b> takes a configuration string as an argument. This configuration string is usually the "boot line" that is specified to the VxWorks boot ROMs to boot the system (see <i class="title">Tornado Getting Started</i>). Based on this string, <b class="routine"><i class="routine">usrNetInit</i></b><b>(&nbsp;)</b> performs the following:</p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84683"> </a>Initializes network subsystem by calling the routine <b class="routine"><i class="routine">netLibInit</i></b><b>(&nbsp;)</b>.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84684"> </a>Attaches and configures appropriate network drivers.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84685"> </a>Adds gateway routes.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84686"> </a>Initializes the remote file access driver <b class="library">netDrv</b>, and adds a remote file access device.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84687"> </a>Initializes the remote login facilities.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84688"> </a>Optionally initializes the Remote Procedure Calls (RPC) facility.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84689"> </a>Optionally initializes the Network File System (NFS) facility. </li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="84690"> </a>As noted previously, the inclusion of some of these network facilities is controlled by definitions in <b class="file">configAll.h</b>; see <a href="c-config5.html#89131">Table&nbsp;8-6</a> for a list of these constants. The network initialization steps are described in the <i class="title">VxWorks Network Programmer's Guide</i>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84697">Initialization of Optional Products and Other Facilities</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84699"> </a>Shared memory objects are provided with the optional product VxMP. Before shared memory objects can be used, they must be initialized with the routine <b class="routine"><i class="routine">usrSmObjInit</i></b><b>(&nbsp;)</b> (in<b class="file"> </b><i class="textVariable">installDir</i><b class="file">/target/src/config/usrSmObj.c</b>), which is called from <b class="routine"><i class="routine">usrRoot</i></b><b>(&nbsp;)</b> if <b class="symbol_UC">INCLUDE_SM_OBJ</b> is defined. </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/caution.gif"></td><td><hr><div class="CalloutCell"><a name="87428"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">CAUTION:  </font></b></a>The shared memory objects library requires information from fields in the VxWorks boot line. The functions are contained in the <b class="file">usrNetwork.c</b> file. If no network services are included, <b class="file">usrNetwork.c</b> is not included and the shared memory initialization fails. The project facility calculates all dependencies but if you are using manual configuration, either add <b class="symbol_UC">INCLUDE_NETWORK</b> to <b class="file">configAll.h</b> or extract the bootline cracking routines from <b class="file">usrNetwork.c</b> and include them elsewhere.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><dl class="margin"><dd><p class="Body"><a name="84705"> </a>Basic MMU support is provided if <b class="symbol_UC">INCLUDE_MMU_BASIC</b> is defined. Text protection, vector table protection, and a virtual memory interface are provided with the optional product VxVMI, if <b class="symbol_UC">INCLUDE_MMU_FULL</b> is defined. The MMU is initialized by the routine <b class="routine"><i class="routine">usrMmuInit</i></b><b>(&nbsp;)</b>, located in <i class="textVariable">installDir</i><b class="file">/target/src/config/usrMmuInit.c</b>. If the macros <b class="symbol_UC">INCLUDE_PROTECT_TEXT</b> and <b class="symbol_UC">INCLUDE_PROTECT_VEC_TABLE</b> are also defined, text protection and vector table protection are initialized.</p><dd><p class="Body"><a name="84712"> </a>The GNU C++ compiler is shipped with Tornado. To initialize C++ support for the GNU compiler, define either <b class="symbol_UC">INCLUDE_CPLUS</b> or <b class="symbol_UC">INCLUDE_CPLUS_MIN</b>. To include one or more of the Wind Foundation Class libraries, define the appropriate <b class="symbol_UC">INCLUDE_CPLUS_</b><i class="textVariable">library</i> macros (listed in <a href="c-config5.html#89131">Table&nbsp;8-6</a>).<sup><a href="#foot"><b class="FootnoteMarker">2</b></a></sup></p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84727">Initialization of WindView</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84729"> </a>Kernel instrumentation is provided with the optional product WindView. It is initialized in <b class="routine"><i class="routine">usrRoot</i></b><b>(&nbsp;)</b> when <b class="symbol_UC">INCLUDE_WINDVIEW</b> is defined in <b class="file">configAll.h</b>. Other WindView configuration constants control particular initialization steps; see the <i class="title">WindView User's Guide: Configuring WindView</i>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84731">Initialization of the Target Agent</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84732"> </a>If <b class="symbol_UC">INCLUDE_WDB</b> is defined, <b class="routine"><i class="routine">wdbConfig</i></b><b>(&nbsp;)</b> in <i class="textVariable">installDir</i><b class="file">/target/src/config/usrWdb.c</b> is called. This routine initializes the agent's communication interface, then starts the agent. For information on configuring the agent and the agent's initialization sequence, see <i class="title">Tornado Getting Started</i>. </p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84734">Execution of a Startup Script</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84735"> </a>The <b class="routine"><i class="routine">usrRoot</i></b><b>(&nbsp;)</b> routine executes a user-supplied startup script if the target-resident shell is configured into VxWorks, <b class="symbol_UC">INCLUDE_STARTUP_SCRIPT</b> is defined, and the script's file name is specified at boot time with the startup script parameter (see <i class="title">Tornado Getting Started</i>). If the parameter is missing, no startup script is executed.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84742">The System Clock Routine: <b class="routine"><i class="routine">usrClock</i></b><b>(&nbsp;)</b> </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84743"> </a>Finally, the system clock ISR <b class="routine"><i class="routine">usrClock</i></b><b>(&nbsp;)</b><b> </b>is attached to the system clock timer interrupt by the <b class="routine"><i class="routine">usrRoot</i></b><b>(&nbsp;)</b> task described <a href="c-config3.html#84564"><i class="title">The Initial Task: usrRoot(&nbsp;)</i></a>. The <b class="routine"><i class="routine">usrClock</i></b><b>(&nbsp;)</b> routine calls the kernel clock tick routine <b class="routine"><i class="routine">tickAnnounce</i></b><b>(&nbsp;)</b>, which performs OS bookkeeping. You can add application-specific processing to this routine.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84748">Initialization Summary</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84752"> </a><a href="c-config3.html#84763">Table&nbsp;8-1</a> shows a summary of the entire VxWorks initialization sequence for typical configurations. For a similar summary applicable to ROM-based VxWorks systems, see <a href="c-config6.html#86232"><i class="title">Overall Initialization for ROM-Based VxWorks</i></a>. <p class="table"><h4 class="EntityTitle"><a name="84763"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 8-1:&nbsp;&nbsp;VxWorks Run-time System Initialization Sequence&nbsp;</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="84769"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Routine</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84771"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Activity</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84773"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">File</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="84776"> </a><b class="routine"><i class="routine">sysInit</i></b><b>(&nbsp;)</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84778"> </a>(a) lock out interrupts&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84780"> </a><b class="file">sysALib.s</b> &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84782"> </a>&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84784"> </a>(b) invalidate caches, if any&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84786"> </a>&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84788"> </a>&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84790"> </a>(c) initialize system interrupt tables with default <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stubs (i960 only)&nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84792"> </a>&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1>

⌨️ 快捷键说明

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