📄 x-vxsim5.html
字号:
<dl class="margin"><div class="Anchor"><a name="84943"> </a><img class="figure" border="0" src="images/x-vxsim0.gif"></div></dl></div> </p><dd><p class="Body"><a name="84944"> </a>Click OK. The TCP/IP Properties window opens. Select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Ulip Virtual Adapter</font></b> in the Adapter drop-down list. Enter an IP address of the form <i class="textVariable">nn</i>.0.0.255 (for example, 90.0.0.255). For a discussion of network addressing in general and ULIP in particular, see <a href="x-vxsim5.html#84995"><i class="title">IP Addressing</i></a>.</p><dd><p class="Body"><a name="84948"> </a>Click OK and restart the computer to cause the new settings to take effect.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84950">Configuring VxSim for Networking</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84951"> </a>As with any other BSP, adding components to VxWorks requires including them, rebuilding VxWorks, the downloading and restarting it. The easiest method for doing this is to use the project facility. However, if you have used manual methods in your project, you should continue to use those methods.</p><dd><p class="Body"><a name="84954"> </a>For a discussion of networking as it relates to VxSim, see <a href="x-vxsim5.html#84752"><i class="title">H.5 VxSim Networking Component</i></a>.</p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84956">Using the Project Tool</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84957"> </a>Use the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Create Project</font></b> facility to create a bootable VxWorks image. On the VxWorks tab in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Project Workspace</font></b> window, select the folder called <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">network components. </font></b>Right click and select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Include `network components' </font></b>from the context menu. Click <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">OK</font></b> to accept the defaults. Then rebuild and download VxWorks. </p><dd><p class="Body"><a name="84958"> </a>If you want to use multiple simulators simultaneously and you are using ULIP, you must also locate ULIP on the list in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Include Folder</font></b> and check it before clicking <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">OK</font></b>. In this case, you must also change your target server configuration from wdbpipe to wdbrpc before connecting it to the new VxWorks image. </p><dd><p class="Body"><a name="84959"> </a>If you are using PPP, be sure <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">BSD43 Compatible Sockets</font></b> is not selected in the Include Folder. </p><dd><p class="Body"><a name="84960"> </a>For more information on using the configuration tool, see the <i class="title">Tornado User's Guide: Projects</i>. </p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84961">Using Manual Techniques</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84962"> </a>For all hosts, be sure that <b class="symbol_UC">INCLUDE_NETWORK</b> is defined in <b class="file">config.h</b>. If you want to use multiple simulators simultaneously and you are using ULIP on Solaris, also add the following to <b class="file">config.h</b>:</p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="84963">#undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_NETWORK</a></b></pre></dl></dl><dd><p class="Body"><a name="84964"> </a>If you are using ULIP on Windows NT with multiple simulators, also add the following to <b class="file">config.h</b>:</p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="84965">#define WDB_COMM_END #define INCLUDE_NT_ULIP</a></b></pre></dl></dl><dd><p class="Body"><a name="84966"> </a>If you are using PPP, be sure the following is defined in <b class="file">config.h</b>:</p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="84967">#ifdef BSD43_COMPATIBLE #undef BSD43_COMPATIBLE #endif</a></b></pre></dl></dl><dd><p class="Body"><a name="84968"> </a>Then rebuild and download VxWorks. </p><dd><p class="Body"><a name="84969"> </a>You must also change your target server configuration from wdbpipe to wdbrpc.</p><dd><p class="Body"><a name="84970"> </a>For additional information on configuring BSPs using manual methods, see the <i class="title">VxWorks Networking Guide</i>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84971">Running Multiple Simulators</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84972"> </a>When you install the optional VxSim component, your system is automatically configured to run up to 16 simulators. When you start VxSim from the GUI, <b class="symbol_lc">vxsim0</b> starts. To start additional instances, use the command line or the Windows <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Start>Run</font></b> facility. The command takes the following forms (where <i class="textVariable">n</i> is the processor number):<p class="table"><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85858"> </a>UNIX:</p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85860"> </a><b class="command">vxWorks -p</b> <i class="textVariable">n</i> </p></td></tr><tr valign="top"><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85862"> </a>Windows: </p></td><td colspan=1 rowspan=1><p class="BodyLeft"><a name="85864"> </a><b class="command">vxWorks /p</b> <i class="textVariable">n</i> </p></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84975">System Mode Debugging</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84976"> </a>Including the simulator networking facility means that system mode debugging can be done without using the WDB pipe back end. SLIP, PPP, and ULIP on Windows all allow the network connection to be used for both network packets and host-target communications. However, special considerations apply to using ULIP on Solaris in this way. </p><dd><p class="Body"><a name="84977"> </a>Although it is possible to use the network connection for system mode debugging and use a back end other than the WDB pipe back end, the recommended method is to use the default, WDB pipe, even when networking is installed.</p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84978">ULIP on Solaris Without WDB Pipe Back End</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84979"> </a>To use system mode debugging with ULIP on Solaris and no WDB pipe back end, you must enable a different ULIP channel for the target agent (the part of Tornado that resides on the target) than is used by the rest of VxWorks. This allows communications with the Tornado tools to proceed independently of the VxWorks operating system. </p><dd><p class="Body"><a name="84980"> </a>Changing <b class="symbol_UC">WDB_COMM_TYPE</b> to <b class="symbol_UC">WDB_COMM_ULIP</b> enables additional ULIP channels. This can be done either manually or using the project facility (see <i class="title">Tornado User's Guide: Projects</i>).</p><dd><p class="Body"><a name="84981"> </a>With no further configuration changes, the target agent uses <b class="file">/dev/ulip14 </b>and the corresponding IP address (127.0.1.14) as its debugging channel to the Tornado host tools. (VxWorks networking calls continue to connect to whatever ULIP channel you specify with the <b class="command">-p</b> option if you start VxSim from the command line.) </p><dd><p class="Body"><a name="84982"> </a>Connect the target server to your modified VxSim using the target name <b class="file">vxsim14</b>. In system mode, the target name identifies the debugging ULIP channel. </p><dd><p class="Body"><a name="84983"> </a>The ULIP channel corresponding to the <b class="command">-p</b> option (0 by default) also remains in use for the simulated VxWorks session, even in system mode. Thus, the IP address corresponding to the <b class="command">-p</b> option is always the IP address to communicate with applications on the simulated VxWorks target, regardless of whether or not system-mode debugging is in effect. The only VxSim IP traffic that uses a different channel in system mode is between the target agent and the Tornado host tools.</p><dd><p class="Body"><a name="84984"> </a>If you wish to arrange another ULIP channel for system-mode debugging, change or override the <b class="symbol_UC">WDB_ULIP_DEV</b> definition in <i class="textVariable">installDir</i><b class="file">/target/config/all/configAll.h</b>, and use a target name to match.</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/warning.gif"></td><td><hr><div class="CalloutCell"><a name="84989"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>A single Solaris ULIP channel cannot be used for two purposes at one time. Thus, you must not use <b class="command">-p 14</b> with a VxSim that has system mode enabled on the default channel. Similarly, you can only use system mode (over the default channel) with one VxSim at a time, though you can still debug multiple VxSim processes in task mode at the same time.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84995">IP Addressing</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84996"> </a>All of the networking facilities available under VxWorks--for example, sockets, RPC, NFS--are available with VxSim. For VxSim to communicate with the outside world, it must have its own target IP address as provided through a network interface. </p><dd><p class="Body"><a name="84997"> </a>Internet addressing is handled slightly differently among the available network interfaces. For each VxSim process, there are three associated IP addresses: </p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84998"> </a>Target IP - the address of each VxSim process, internal to your host.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85000"> </a>Local IP - your host's address on the VxSim network, internal to your host.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85002"> </a>Host IP - your host's address according to the network at your site.</li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="85004"> </a>The target IP address and the local IP address communicate according to the protocol of the chosen network interface. The host IP address is not directly relevant to the VxSim network. <div class="frame"><h4 class="EntityTitle"><a name="85008"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure H-2: VxSim IP Addressing</font></a></h4><dl class="margin"><div class="Anchor"><a name="85049"> </a><img class="figure" border="0" src="images/x-vxsima1.gif"></div></dl></div></p><dd><p class="Body"><a name="85050"> </a>Addressing is according to processor number, such that when you run VxSim with processor number <i class="textVariable">n</i><i class="emphasis"> </i>(with the command <b class="command">vxWorks -p </b><i class="textVariable">n</i>), the network addresses packets as shown in <a href="x-vxsim5.html#85057">Table H-4</a>. <p class="table"><h4 class="EntityTitle"><a name="85057"><font face="Helvetica, sans-serif" size="-1" class="sans">Table H-4: VxSim Network Addressing</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="85063"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Network Interface </font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85065"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Local IP</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="85067"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Target IP</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="85069"> </a>ULIP: Solaris <br> Windows </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85071"> </a><i class="i">host IP addr</i> <br><i class="i">host IP addr</i> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85073"> </a>127.0.1.<i class="textVariable">n</i> <br>90.0.0.<i class="textVariable">n<sup><b class="FootnoteMarker">1</b></sup></i> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85078"> </a>PPP </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85080"> </a>127.0.1.254 </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85082"> </a>127.0.1.<i class="textVariable">n</i> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="85084"> </a>SLIP </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85086"> </a>192.168.2.<i class="textVariable">n</i> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="85088"> </a>192.168.1.<i class="textVariable">n </i> </div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"><p class="FootnoteNumberMarker">1: <span class="TableFootnote"><a name="85076"> </a>Note that you can use 90.n.n.n or any other number except 127.n.n.n for a target IP address on a Windows host. 127 is reserved for other purposes on Windows.</span></p></td></tr></table></p></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85089">Choosing Processor Numbers for Distinct Devices</a></i></h4></font><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="85090">ULIP (Solaris 2, Windows NT)</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85091"> </a>When you run VxSim with ULIP and specify processor number <i class="textVariable">n</i><i class="emphasis"> </i>(with the command <b class="command">vxWorks -p </b><i class="textVariable">n</i>), VxSim for Solaris attaches to <b class="file">/dev/ulip</b><i class="textVariable">n</i> and uses IP address 127.0.1.<i class="textVariable">n</i>. VxSim for Windows attaches to the IP number you specified when installing ULIP, which must not be 127.<i class="textVariable">n.n.n</i>.</p><dd><p class="Body"><a name="85092"> </a>Only one process at a time can open the same ULIP device; this is enforced in the ULIP driver. Thus, if you want multiple VxSim targets to use ULIP, you <i class="emphasis">must</i> give each of them a distinct processor number. If another VxSim process is already running with the same processor number, then the ULIP device cannot be opened (<b class="file">ulip0</b> corresponds to processor 0), and the following message is displayed during the startup of VxSim:</p><dd><p class="Body"><a name="85093"> </a>Solaris (0xd translates to <b class="symbol_UC">S_errno_EACCES</b>):</p><dl class="margin"><dd><pre class="Code2"><b><a name="85094">ulipInit failed, errno = 0xd</a></b></pre></dl><dd><p class="Body"><a name="85095"> </a>Windows NT:</p><dl class="margin">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -