2.4   Target Setup

This section covers bringing up VxWorks on a target with a relatively simple configuration. The VxWorks Programmer's Guide elaborates on more advanced options, such as gateways, NFS, multiprocessor target systems, and so on.


*

NOTE: Before you set up your target hardware, you may find it productive to use Tornado with the integrated target simulator. See the Tornado Getting Started Guide for a tutorial introduction.

2.4.1   Example Target Configurations

VxWorks is a flexible system that has been ported to many different hardware platforms. Two common examples are illustrated in this section.

Figure 2-1 illustrates a minimal cross-development configuration: the target is a bare board, connected to the host development system by a single serial line. When you connect the host and target exclusively over serial lines, you must:

See 2.5.3 Serial-Line Connections.

Another target system configuration, representing a more resource-rich development environment, is shown in Figure 2-2. The default boot program and VxWorks image support booting the target over a network.

The configuration in Figure 2-2 consists of the following:

Chassis
A card cage with backplane and power supply.

Target CPU
A single-board computer (target) where VxWorks is to run.

Console
An ASCII terminal or a serial port on a workstation (required by the boot program for initial setup).

File Server
A networked host where VxWorks binaries reside on disk; often the same workstation used as the console.

For more detailed information about your particular target Board Support Package (BSP), see Help>Manuals contents>BSP Reference in the Tornado Launcher (the file wind/docs/BSP_Reference.html).

2.4.2   Networking the Host and Target

IP networking over Ethernet is the most desirable way to connect a development target to your host, because of the high bandwidth it provides. This section describes setting up simple IP connections to a target over Ethernet. To read about other communication strategies, see 2.5 Host-Target Communication Configuration.

Before VxWorks can boot an executable image obtained from the host, the network software on the host must be correctly configured. There are three main tasks in configuring the host network software to get started with VxWorks:

The following sections describe these procedures in more detail. Consult your system administrator before following these procedures: some procedures may require root permissions, and some UNIX systems may require slightly different procedures.


*

NOTE: If your UNIX system is running the Network Information Service (NIS), the "hosts" database is maintained by NIS facilities that are beyond the scope of this introduction. If you are running NIS, consult your UNIX system administration manuals.

Initializing the Host Network Software

Most UNIX systems automatically initialize the network subsystem and activate network processes in the startup files /etc/rc2 and /etc/rc.boot. This typically includes configuring the network interface with the ifconfig command and starting various network daemons. Consult your UNIX system manuals if your UNIX startup procedure does not initialize the network.

Establishing the VxWorks System Name and Address

The UNIX host system maintains a file of the names and network addresses of systems accessible from the local system. This database is kept in the ASCII file /etc/hosts, which contains a line for each remote system. Each line consists of an Internet address and the name(s) of the system at that address. This file must have entries for your host UNIX system and the VxWorks target system.

For example, suppose your host system is called mars and has Internet address 90.0.0.1, and you want to name your VxWorks target phobos and assign it address 90.0.0.50. The file /etc/hosts must then contain the following lines:

90.0.0.1      mars 
90.0.0.50     phobos

Giving VxWorks Access to the Host

The UNIX system restricts network access through remote login, remote command execution, and remote file access. This is done for a single user with the .rhosts file in that user's home directory, or globally with the /etc/hosts.equiv file.

The .rhosts file contains a list of system names that have access to your login. Thus, to allow a VxWorks system named phobos to log in with your user name and access files with your permissions, create a .rhosts file in your home directory containing the line:

phobos

The /etc/hosts.equiv file provides a less selective mechanism. Systems listed in this file are allowed login access to any user defined on the local system (except the super-user root). Thus, adding the VxWorks system name to /etc/hosts.equiv allows the VxWorks system to log in with any user name on the system.

Table 2-2:  Accessing Host from Target


Target listed in:
 
Access
 

/etc/hosts.equiv
 
Any user can log in.
 
.rhosts file in user's home directory
 
Only this user can log in.
 

2.4.3   Configuring the Target Hardware

Configuring the target hardware may involve the following tasks:

The following general procedures outline common situations. Select from them as appropriate to your particular target hardware. Refer also to the specific information in the target-information reference entry for your BSP; see Help>Manuals contents>BSP Reference in the Tornado Launcher (the file wind/docs/BSP_Reference.html).

Boot ROMs and Other Boot Media

Tornado includes one of the following boot media as part of each VxWorks BSP package:

  • Boot ROM.  
    Most BSPs include boot ROMs.

  • Floppy Disk.  
    Some BSPs for systems that include floppy drives use boot diskettes instead of a boot ROM. For example, the BSPs for PC386 or PC486 systems usually boot from diskette.

  • Flash Memory.  
    For boards that support flash memory, the BSP may be designed to write the boot program there. In such cases, an auxiliary program is supplied to write the boot program into flash memory.

  • Open Boot Prom.  
    Some targets use the "Open Boot Prom" protocol developed by Sun Microsystems. This is particularly common on (but not limited to) SPARC-based BSPs.

    For specific information on a BSP's booting method, see Help>Manuals contents>BSP Reference in the Tornado Launcher (the file wind/docs/BSP_Reference.html).

    You may also wish to replace a boot ROM, even if it is available, with a ROM emulator. This is particularly desirable if your target has no Ethernet capability, because the ROM emulator can be used to provide connectivity at near-Ethernet speeds. Tornado includes support for one such device, NetROM.1 For information about how to use NetROM on your target, refer to 2.5.4 The NetROM ROM-Emulator Connection.

    For cases where boot ROMs are used to boot VxWorks, install the appropriate set of boot ROMs on your target board(s). When installing boot ROMs, be careful to:

  • See 4.7 Configuring and Building a VxWorks Boot Program for instructions on creating a new boot program with parameters customized for your site.

    Setting Board Jumpers

    Many CPU and Ethernet controller boards still have configuration options that are selected by hardware jumpers, although this is less common than in the past. These jumpers must be installed correctly before VxWorks can boot successfully. You can determine the correct jumper configuration for your target CPU from the information provided in the target-information reference for your BSP; see Help>Manuals contents>BSP Reference in the Tornado Launcher (wind/docs/BSP_Reference.html).

    Board Installation and Power

    For bare-board targets, use the power supply recommended by the board manufacturer (often a PC power supply).

    If you are using a VME chassis, first install the CPU board in the first slot of the backplane. See Figure 2-3.

    On a VMEbus backplane, there are several issues to consider:

  • P1 and P2 Connectors.  
    The P1 connector must be completely bussed across all the boards in the system.

    Many systems also require the P2 bus. Some boards require power on the P2 connector, and some configurations require the extended address and data lines of the B row of the P2 bus.

  • System Controller.  
    The VME bus requires a system controller to be present in the first slot. Many CPU boards have a system controller on board that can be enabled or disabled by hardware jumpers. On such boards, enable the system controller in the first slot and disable it in all others. The diagrams in the target-information reference indicate the location of the system controller enable jumper, if any.

    Alternatively, a separate system controller board can be installed in the first slot and the CPU and Ethernet boards can be plugged into the next two slots.

  • Empty Slots.  
    The VME bus has several daisy chained signals that must be propagated to all the boards on the backplane. If you leave any slot empty between boards on the backplane, you must jumper the backplane to complete the daisy chain for the BUS GRANT and INT ACK signals.

  • Connecting the Cables

    All supported VxWorks targets include at least one on-board serial port. This serial port must be connected to an ASCII terminal (or equivalent device), at least for the initial configuration of the boot parameters and getting started with VxWorks. Subsequently, VxWorks can be configured to boot automatically without a terminal. Refer to the CPU board hardware documentation for proper connection of the RS-232 signals.

    For the Ethernet connection, a transceiver cable must be connected from the Ethernet controller to an Ethernet transceiver.


    1:  NetROM is a trademark of Applied Microsystems Corporation.