2.7   Connecting a Tornado Target Server

To make a VxWorks target ready for use with the Tornado development tools, you must start a target-server daemon for that target on one of your development hosts. One way to accomplish that is from the Tornado launcher; for that approach, see 3.5 Managing Target Servers.

You may also want to start a server from the UNIX command line, so that your target is ready to use as soon as you enter the launcher. To start a target server this way, run the command tgtsvr in the background. You must specify the network name of your target (see Establishing the VxWorks System Name and Address) as an argument.

The following example starts a server for the target phobos using the default communications back end:

% tgtsvr -V vxsim0 & 
% tgtsvr.ex (vxsim0@seine): Mon Nov 30 14:09:46 1998 
    Connecting to target agent... succeeded. 
    Attaching C++ interface... succeeded. 
    Attaching elf OMF reader for SIMSPARCSOLARIS CPU family... succeeded.

The -V (verbose) option shown above is not strictly necessary, but it is very useful for troubleshooting. With this option, tgtsvr produces informative messages if it cannot connect to the target.

For example, if you make an error in specifying the target name, tgtsvr exits when it cannot find that target. Without the -V option, tgtsvr exits silently. With the -V option, tgtsvr produces the following message for an unknown target:

% tgtsvr -V vxsim0 & 
% tgtsvr.ex (vxsim0@seine): Mon Nov 30 14:09:46 1998 
    Error: Target vxsim0 unknown. Attach failed. 
    Error: Backend initialization routine failed. 
Problem during backend initialization.

There are a number of other tgtsvr command-line options to control the behavior of your target server. The most notable options are the following:

-B
Chooses alternative methods of communicating with the target. See 2.5 Host-Target Communication Configuration to use other back ends.

-c
Override the path to the VxWorks image on the host system.

For information on these and other command-line options, see the tgtsvr reference documentation (either online, or in C. Tornado Tools Reference). The easiest way to select and manage these options is with the Tornado launcher.