A Tornado target server runs on the host and manages communications between Tornado host tools (such as the shell, debugger, and browser), and the target system itself (Figure 8-1). A target server includes the host-resident target symbol table, and an object-module loader that inserts application modules into a running target system.
The target server communicates with the target system through the target agent, which runs on the target system either as a VxWorks task or externally from VxWorks. In order to communicate with the target agent, the target server uses a communication back end configured for the same communication protocol and transport layer as the target agent.
A target server must be configured for a target and started before host tools can interact with the target. It must be configured with a communications back end that supports the communication protocol and transport layer used by the target agent, or it will not work. When a target server is started, it identifies the target agent by the network name of a target board on which the target agent is running.
A target server need not be on the same host as the Tornado tools, as long as the tools have network access to the host where the target server is running.
Target servers are registered with, and made accessible to users by, the service formally known as the Tornado target registry (also frequently referred to as the Tornado registry, or simply the registry). For information about the registry, see 2.2 Setting Up the Host; and the wtxregd reference documentation in . .
|
|
NOTE:
This chapter describes various ways to configure, start, and manage target servers using the Tornado GUI. For detailed information about the operation of the target server, and its command options, see the tgtsvr reference material in . .
|
||||||||||||||||||
Before configuring and starting a new target, make sure that the host and target are connected properly (see 2.3 Setting Up the Default Target Hardware).
A target server must be configured and started before any tool (such as the debugger) can communicate with a target system. There are two ways to configure and start a server:
|
|
|||||||||||||||||||
The Configure Target Servers dialog box is a GUI tool for configuring and starting a target server. To display the box, select Tools>Target Server>Configure.
When you press the New button, Tornado displays the dialog box with default options.(Figure 8-2).
If you are using the default wdbrpc back end (for IP and serial connections) you only need to enter the following information:
Tornado supplies a default for the Description field, but descriptive configuration names are more useful, particularly if you plan to use more than one target-server configuration. You can configure a target server so that the configuration name appears as a menu option Target Server in the Tools menu with the Add description to menu checkbox.
The fields and lists displayed in the property panel section of the box change based on the selection you make from the Change Property drop-down list. These options are discussed later in this section.
Each time you specify a configuration option, the Command Line box displays the corresponding tgtsvr command and its parameters. The text in the box cannot be edited, but you can use the Other Options field to add options that are not exposed through the GUI (see Miscellaneous).
You can also use the Command Line box display to copy the text to a batch file in order to launch a target server automatically with this configuration. You may also find it helpful to copy the text to the command line and explore various options in conjunction with the tgtsvr reference documentation (see Tornado API Reference: Tornado Tools Reference).
To start a target server and save your server configuration, click the Launch button, which also saves the configuration. To save the configuration without starting a server, click OK instead. The name used for the configuration is in the Description field.
To discard all changes since you opened the Configure Target Servers dialog box, click Cancel.
The following controls are used to manage saved configurations and to create new ones:
|
|
WARNING:
The target server must be configured with the same communication back end as the one used by the VxWorks target agent. See Back End and 4.7 Configuring the Target-Host Communication Interface.
|
||||||||||||||||||
|
|
|||||||||||||||||||
To enable the authorization mechanism, you (and anyone else who wishes to participate in the Tornado authorization scheme from a Windows host) must define an environment variable WIND_UID as identification; see Sharing and Reserving a Target Server.
The Authorizations property list (Figure 8-3) offers the following controls:
The Back End property list is used to specify how a target server will communicate with a target (Figure 8-4).
The fields displayed for the Back End property list vary depending on the communications method you choose from the list labeled Available Back Ends. The default, wdbrpc, is suitable for targets with IP connectivity.
The standard back ends are described in Table 8-1. Other back ends may be available separately; contact your nearest Wind River office (see the back cover).
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
WARNING:
The target server must be configured with the same communication back end as the one built into the VxWorks image. See 2.4 Host-Target Communication Configuration and 4.7 Configuring the Target-Host Communication Interface.
|
||||||||||||||||||
The wdbserial back end (see Figure 8-4) also has the following properties:
In order to avoid excessive data-transfer transactions with the target, the target server maintains a cache on the host system. By default, this cache can grow up to a size of 1 MB. Change the cache size using the options in the Memory Cache Size property list (Figure 8-6).
The Target Server File System (TSFS) is a full-featured VxWorks file system that provides target access to files located on the host system. See the tgtsvr reference entry in the online Tornado Tools Reference and VxWorks Programmer's Guide: Local File Systems for more information.
The TSFS provides the most convenient way to boot a target over a serial connection (see 2.5.7 Booting a Target Without a Network).
|
|
WARNING:
To use the TSFS, you must include the WDB target server file system component when you build the VxWorks image. See 4.4 Creating a Custom VxWorks Image).
|
||||||||||||||||||
Tornado supports virtual I/O to the host from target applications (see Virtual I/O). By default, any virtual output from the target is broadcast to all shell windows.
However, you can use the target server to create a dedicated console for virtual I/O. The option buttons in the Console and Redirection property list (Figure 8-8) direct virtual I/O to various locations:
|
|
|||||||||||||||||||
The Logging property list (Figure 8-9) allows you to log WDB and WTX requests.
The Miscellaneous property list (Figure 8-10) provides for Tornado 1.0.1 tools compatibility, and for use of options that are not available through the Configure Target Servers dialog box.
|
|
|||||||||||||||||||
In general, you will probably do most of your work from the Tornado IDE. In this case, you do not need to worry about environment variables: Tornado manages its internal environment automatically. However, if you also want to run some portions of Tornado from the command line (such as the compilation tools, or the shell), you must make sure that the appropriate variables are set in order for the tools to work properly. The file torVars.bat in c:\tornado\host\x86-win32\bin captures the requisite definitions, so that all you have to do is run torVars.bat to set the environment variables appropriately for your own Tornado installation.
You may want to start a server from the command line or from a batch file, so that your target is ready to use as soon as you enter the Tornado development environment. To do so, run c:\tornado\host\x86-win32\bin\tgtsvr.exe. You must specify the network name of your target as an argument (see Establishing the VxWorks Target Name and IP Address; and the tgtsvr reference in . ).
There are a number of useful command-line options to tgtsvr that control the behavior of your target server. These include the -V (verbose) option for troubleshooting, the -B option for alternative methods of communicating with the target, and several options for redirecting I/O. For detailed information on these and other command-line options, see the tgtsvr reference entry.
When a target server is started, the target server icon is displayed in the in the Windows taskbar (Figure 8-12). The context menu for the icon provides options for displaying the Log Console window, displaying information about the target, and shutting down the target server. The tooltip for the icon displays the name of the target server. Double-clicking on the icon opens the Log Console window. When the target server reports error messages, a yellow exclamation point is superimposed on the target server icon.
The Log Console window displays target server log output (Figure 8-12). The Hide button hides the target server Log Console window. The Stop button stops the target server. The About button displays version information about the target server, and basic information about the target system (BSP, CPU, and operating system).
|
|
|||||||||||||||||||
If a target server for your target has already been configured and started, you can select it with either the Tornado Launch toolbar or by various means from the Tools menu.
For information about configuring and starting a target server, see 8.2 Configuring and Starting a Target Server.
The Tornado Launch toolbar has a pull-down list box that shows all the target servers that are currently running and known to the Tornado registry that your system is using (Figure 8-13; also see 2.2 Setting Up the Host). Click on the drop-down list box to display the available target servers; then select a target server from the list. If no target servers are listed, or none of the ones listed represent the target you need, you must configure and start a target server.
When you start a browser, shell, or debugger from the Tools menu you can specify which target server to use. Tornado displays a dialog box with summary information about the target server currently selected with the Targets drop-down list for that tool.
Figure 8-14 shows the Launch Shell dialog box that appears when you click Tools>Shell; clicking Browser or Debugger produces a similar dialog box. Thus, you can use the Tools menu to connect a tool to an alternate target without changing the currently selected target in your Tornado session.
You can also use the Manage Target Servers dialog box to select a target server. See 8.6 Managing a Target Server.
A number of target-server management commands are available to control your target servers and other networked Tornado target servers. To reach these commands, click Tools>Target Server> Manage. Tornado opens the dialog box shown in Figure 8-15.
At the top of the Manage Target Servers dialog box is a target selector--a drop-down list that you can use to select any of the targets registered with the Tornado target registry you are using. To help you see what target is selected, the Manage Target Servers dialog box displays the target information summary (the same information as the target summary available from the browser; see 9.5 Target-Information Window). You can update the display with the
(exclamation mark) button.
Once you select a target, you can select a command from the Select Action drop-down list box (Figure 8-15), then click Apply to execute the command on the selected target. Click Close to dismiss the dialog box.
The following commands are available on the Select Action drop-down list:
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
To participate in the Tornado authorization scheme, you must set the environment variable WIND_UID to a unique numeric user ID; see your Windows documentation.
If some Tornado users at your site use UNIX hosts, they do not need to set the WIND_UID environment variable; on UNIX hosts, the Tornado authorization scheme uses the system user ID.
When a target server is available to anyone, its status is unreserved. This status is visible in the browser (9.5 Target-Information Window) and in the target-selection dialog for any Tornado tool (for example, Figure 8-14). Any user can attach a tool to the target, and any user can also restrict its use.
When you configure a target server, you can arrange for the server to be exclusively available to your user ID every time you start it, by clicking the Lock on Startup option button in the Authorizations property panel of the Configure Target Servers dialog box. See 8.2.2 Target-Server Configuration Options. Target servers started this way have the status locked.
If a target server is not locked by its creator, and if no one else has reserved it, you can reserve the target server for your own use: click on the Reserve command of the Manage Target Servers dialog box (see 8.6 Managing a Target Server). The target status becomes reserved until you release the target with the Unreserve command in the same dialog box. Unreserve on a target that is not reserved has no effect, nor does Unreserve on a target reserved or locked by someone else.
This simple reserve/unreserve locking mechanism is sufficient for many development environments. In some organizations, however, it may be necessary to further restrict some targets to a particular group of users. For example, a QA organization may need to ensure certain targets are used only for testing, while still using the reserve/unreserve mechanism to manage contention within the group of testers.
To restrict a target server to a list of users, create a file listing authorized users, and configure the target server to base authorization on that file (see Authorizations). The file should consist of one line for each user, with each line containing the user name, followed by a space, followed by the user's numeric identification.
For users on UNIX hosts, the user names are host sign-on names, as used by system files like /etc/passwd (or its network-wide equivalent), and the numbers are the system user IDs. For users on Windows hosts, the names are mnemonic aids, and the numbers are arbitrary identifiers.
You can also use one special entry in the authorization file: a plus sign (+) to explicitly authorize any user to connect to the target server. (This might be useful to preserve the link between a target server and an authorization file when access to that target need only be restricted from time to time.)
1: Strictly speaking, there is another layer of authorization defining who is meant by "any user." The file c:\tornado\.wind\userlock is a Tornado-wide authorization file, used as the default list of authorized users for any target server that does not define its own authorized-users file. This file has the same format described below for individual authorization files.