📄 c-start4.html
字号:
</td><td><hr><div class="CalloutCell"><a name="92521"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>The information about NetROM in this section is a summary of NetROM documentation, with some supplementary remarks. This section is not a replacement for the NetROM documentation. In particular, refer to that documentation for full information about how to connect the NetROM to the network and to your target board. </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="94229"> </a>For information about booting a target without a network, see <a href="c-start5.html#94118"><i class="title">2.5.7 Booting a Target Without a Network</i></a>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="90856">Configuring the Target Agent for NetROM</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="90858"> </a>To configure the target agent for a NetROM communication connection, reconfigure and rebuild VxWorks with a NetROM interface for the target agent. Several configuration macros are used to describe a board's memory interface to its ROM banks. You may need to override some of them for your board. See <a href="c-builder6.html#99151"><i class="title">Configuration for NetROM Connection</i></a>.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="90479">Configuring the NetROM</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="90481"> </a>Before a target server on your host can connect to the target agent over NetROM, some hardware and software configuration is necessary. The following steps outline this process.</p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="90482"> </a>Configure the NetROM IP address from your host system.</li></ol></p><dl class="margin"><dd><div class="Indent"><a name="90483"> </a>When it powers up, the NetROM knows its own Ethernet address, but does not know its internet (IP) address. </div><br><dd><div class="Indent"><a name="90485"> </a>There are two ways of establishing an IP address for the NetROM: </div><br></dl><dl class="margin"><p class="listspace"><ul class="Bullet2" type="disc"><li><a name="90486"> </a>Connect a terminal to the NetROM serial console, and specify the IP address manually when you power up the NetROM (for Step 2). This solution is simple, but you must repeat it each time the NetROM is powered up or restarted.</li></ul></p><p class="listspace"><ul class="Bullet2" type="disc"><li><a name="90487"> </a>Configure a network server to reply to RARP or BOOTP requests from the NetROM. On power-up, the NetROM automatically broadcasts both requests. This solution is preferable, because it permits the NetROM to start up without any interaction once the configuration is working. </li></ul></p><dl class="margin"><dd><div class="Indent2"><a name="90488"> </a>Since the RARP and BOOTP requests are broadcast, any host connected to the same subnet can reply. Configure only one host to reply to NetROM requests. </div><br></dl></dl><p><ol class="List"><li value="2."><a name="90490"> </a>Prepare a NetROM startup file.</li></ol></p><dl class="margin"><dd><div class="Indent"><a name="90491"> </a>After the NetROM obtains its IP address, it loads a startup file. The pathname for this file depends on which protocol establishes the IP address:</div><br></dl><dl class="margin"><p class="listspace"><ul class="Bullet2" type="disc"><li><a name="90492"> </a>BOOTP: A startup-file name is part of the BOOTP server's reply to the BOOTP request. Record your choice of startup-file pathname in the BOOTP table. </li></ul></p><p class="listspace"><ul class="Bullet2" type="disc"><li><a name="90493"> </a>RARP: When the IP address is established by a reply to the RARP request, no other information accompanies the IP address. In this case, the NetROM derives a file name from the IP address. The file name is constructed from the numeric (dot-decimal) IP address by converting each address segment to two hexadecimal digits. For example, a NetROM at IP address 147.11.46.164 expects a setup file named <b class="file">930B2EA4 </b>(hexadecimal digits from the alphabet are written in upper case). </li></ul></p></dl><dl class="margin"><dd><div class="Indent"><a name="90494"> </a>The startup file contains NetROM commands describing the emulated ROM, the object format, path and file names to download, and so on. The following example NetROM startup file configures the Ethernet device, adds routing information, records the object-file name to download and the path to it, and establishes ROM characteristics.</div><br></dl></dl></dl><h4 class="EntityTitle"><a name="90497"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 2-1: Sample NetROM Startup File</font></a></h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="90498">begin ifconfig le0 147.11.46.164 netmask 255.255.255.0 broadcast 147.11.46.0 setenv filetype srecord setenv loadpath c:\tftpboot setenv loadfile vxWorks_rom.hex setenv romtype 27c020 setenv romcount 1 setenv wordsize 8 setenv debugpath readaddr set udpsrcmode on tgtreset end</a></b></pre></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="95249"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>The environment variable <b class="symbol_lc">debugpath</b> should be set to <b class="symbol_lc">dualport</b> (rather than to <b class="symbol_lc">readaddr</b>) if you are using the 500-series NetROM boxes.</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"><dl class="margin"><dd><div class="Indent"><a name="90499"> </a>For more information regarding NetROM boot requirements, refer to NetROM documentation. Consult your system administrator to configure a network host to reply to RARP or BOOTP requests.</div><br></dl></dl><dl class="margin"><p><ol class="List"><li value="3."><a name="92546"> </a>Connect the NetROM to your Ethernet network, and plug NetROM pods into the target-board ROM sockets.</li></ol></p></dl><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="92551"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>Do not power up either the NetROM or the target yet. Pod connections and disconnections should be made while power is off on both the NetROM and the target board.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><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="92583"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>Some board sockets are designed to support either ROM or flash PROM. On this kind of socket, a 12V potential is applied to pin 1 each time the processor accesses ROM space. This potential may damage the NetROM. In this situation, place an extra ROM socket with pin 1 removed between the NetROM pod and the target-board socket.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><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="92602"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>Take great care when you plug in NetROM pod(s). Double check the pod connections, especially pin 1 position and alignment. A pod connection error can damage either the NetROM itself, the target board, or both. The pins coming out of the NetROM's DIP emulation pods are very easy to break, and the cables are expensive to replace. It is a good idea to use a DIP extender socket, because they are much cheaper and faster to replace if a pin breaks.</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"><dl class="margin"><dd><div class="Indent"><a name="90533"> </a>NetROM pod 0 differs from other pods because it implements the dual-port RAM. This special port is used by NetROM both to send data to the board and to receive data from the board: that is, the dual port is the communication path between the NetROM and the board. </div><br></dl></dl><dl class="margin"><p><ol class="List"><li value="4."><a name="90534"> </a>Power up the NetROM (but not the target).</li></ol></p><dl class="margin"><dd><div class="Indent"><a name="90535"> </a>Once the required NetROM address and boot information is configured on a host, the NetROM can be powered up. To verify that the NetROM has obtained its IP address and loaded and executed the startup file, you can connect to a NetROM command line with a <b class="command">telnet</b> session. </div><br><dd><div class="Indent"><a name="90536"> </a>The NetROM begins a <b class="command">telnet</b> connection with the following prompt:</div><br><dl class="margin"><dd><pre class="Code3"><b><a name="90537"></b><tt class="output">NETROM TELNET NetROM></tt><b></a></b></pre></dl><dd><div class="Indent"><a name="90538"> </a>At the NetROM prompt, you can display the current configuration by entering the command <b class="command">printenv</b> to verify that the startup file executed properly.</div><br></dl><p><ol class="List"><li value="5."><a name="90539"> </a>Download test code to the NetROM.</li></ol></p><dl class="margin"><dd><div class="Indent"><a name="90541"> </a>One method is to type the <b class="command">newimage</b> command at the NetROM prompt. This command uses the TFTP protocol to download the image specified by the <b class="symbol_lc">loadfile</b> environment variable from the path specified by the <b class="symbol_lc">loadpath</b> environment variable (which is <b class="file">c:\tftpboot\vxWorks_rom.hex</b> if you use the startup script in <a href="c-start4.html#90497">Example 2-1</a>). After the NetROM configuration is stable, you can include this command in the startup file to download the image automatically. Wait to be certain the image is completely downloaded before you power up your target. This method takes about 30 seconds to transfer the image.</div><br><dd><div class="Indent"><a name="93537"> </a>A faster method is to use the <b class="file">download.exe</b> utility from AMC (see the AMC NetROM documentation).</div><br></dl><p><ol class="List"><li value="6."><a name="90547"> </a>Power up your target. </li></ol></p><dl class="margin"><dd><div class="Indent"><a name="90549"> </a>The target CPU executes the object code in the emulated ROM. Make sure the code is running correctly. For example, you might want to have it flash an LED.</div><br></dl></dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -