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.

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

As a further debugging aid, you can also configure the serial-mode target agent to<br />

echo all characters it receives over the serial line. This is not the default<br />

configuration, because as a side effect it stops the boot process until a target server<br />

is attached. If you need this configuration in order to set up your host serial port,<br />

edit wind/target/src/config/usrWdb.c. Look for the following lines:<br />

#ifdef INCLUDE_WDB_TTY_TEST<br />

/* test in polled mode if the kernel hasn't started */<br />

if (taskIdCurrent == 0)<br />

wdbSioTest (pSioChan, SIO_MODE_POLL, 0);<br />

else<br />

wdbSioTest (pSioChan, SIO_MODE_INT, 0);<br />

#endif /* INCLUDE_WDB_TTY_TEST */<br />

In both calls to wdbSioTest( ), change the last argument from 0 to 0300.<br />

With this configuration, attach any terminal emulator on the host to the tty port<br />

connected to the target to verify the serial connection. When the serial-line settings<br />

are correct, whatever you type to the target is echoed as you type it.<br />

! WARNING: Because this configuration change also prevents the target from<br />

completing its boot process until a target server attaches to the target, it is best to<br />

change the wdbSioTest( )third argument back to the default 0 value as soon as you<br />

verify that the serial line is set up correctly.<br />

Starting the Target Server<br />

After successfully testing the serial connection, you can connect the target server<br />

to the agent by following these steps:<br />

1. Close the serial port that you opened for testing (if you do not close the port,<br />

then it will be busy when the target server tries to use it).<br />

2. Start the target server with the serial back end to connect to the agent. Use the<br />

tgtsvr -B option to specify the back end, and also specify the line speed to<br />

match the speed configured into your target:<br />

% tgtsvr -V targetname -B wdbserial -bps 38400 &<br />

You can also use the <strong>Tornado</strong> GUI to configure and start a target server (see<br />

3.5 Managing Target Servers, p.72).<br />

36

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

Saved successfully!

Ooh no, something went wrong!