02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2<br />

Setup and Startup<br />

Escape character is ‘^]’<br />

NETROM TELNET<br />

NetROM><br />

2<br />

At the NetROM prompt, you can display the current configuration by entering the<br />

command printenv to verify that the startup file executed properly.<br />

Step 5:<br />

Download test code to the NetROM.<br />

One method is to type the newimage command at the NetROM prompt. This<br />

command uses the TFTP protocol to download the image specified by the loadfile<br />

environment variable from the path specified by the loadpath environment<br />

variable (which is /tftpboot/vxWorks_rom.hex if you use the startup script in<br />

Example 2-1). After the NetROM configuration is stable, you can include this<br />

command in the startup file to download the image automatically. Wait to be<br />

certain the image is completely downloaded before you power up your target. This<br />

method takes about 30 seconds to transfer the image.<br />

A faster method is to use two host utilities from AMC: rompack packs a ROM<br />

image into a compact file (with the default name outfile.bin); download ships the<br />

packed file to the NetROM. This method takes only about five seconds to transfer<br />

a new image to the target. This UNIX shell script shown in uses these utilities to<br />

send an image to the NetROM whose IP address is recorded in the script variable<br />

ip:<br />

#! /bin/sh<br />

if [ $# != 1 ]; then<br />

echo "Usage: $0 "<br />

exit 1<br />

fi<br />

file=$1<br />

ip=t46-154<br />

if [ -r "$file" ]; then<br />

echo "Downloading $file to the NetROM at $ip."<br />

rompack -c 1 -r 27c020 -x $file 0 0<br />

download outfile.bin $ip<br />

else<br />

echo "$0: \"$file\" not found"<br />

exit 1<br />

fi<br />

echo Done.<br />

exit 0<br />

The rompack option flags specify how to pack the image within the emulator pods.<br />

The -c 1 option specifies a ROM count of one, which means that the image goes in<br />

a single ROM socket. The -r 27c020 option specifies the type of ROM. The two<br />

41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!