Chapter - 2 Getting Started Wind River Systems, Inc. 1997 Getting Started Hardware/Software Configuration Booting Reconfiguration Managing Tornado Target Servers WDB Agent 2-2 Overview • To perform Cross-Development, you must configure: • Host environment variables. • Target hardware • Network software • Several administrative processes must be running in order to use Tornado tools: • Target server - Manages tools’ interaction with a target • Registry - Manages information needed to contact a target server. • License Manager - Provides license management. 2-3 Target Hardware Configuration •VxWorks ROM’s replace the manufacturer’s ROM’s. •Boards may need to be jumpered. See Board Support Documentation (tman bspName, or the target.txt file) for hardware considerations. •Of course : •Static electricity, overheating can damage boards. •Connectors must be firmly in place (serial cables, ethernet cables, VME, etc). •VME specific •“System controller” in slot 0 (left most slot). •Having empty slots between boards requires jumpering the backplane. 2-4 UNIX: Host Software Configuration • Set some environment variables in your .cshrc (or .profile) file. Here is a sample .cshrc stub: setenv WIND_HOST_TYPE sun4-sunos2 setenv WIND_BASE /u/team1/wind setenv WIND_REGISTRY colmumbia setenv PATH ${WIND_BASE}/host/${WIND_HOST_TYPE}/bin:${PATH} setenv GCC_EXEC_PREFIX $WIND_BASE/host/$WIND_HOST_TYPE/lib/gcc-lib/ alias ccx ‘cc68k . . .’ alias tman ‘man -M ${WIND_BASE}/host/man: ${WIND_BASE}/target/man’ • Modify the WIND_REGISTRY host’s startup files to start the registry daemon, wtxregd, when the host boots. • Configure WIND license management. 2-5 UNIX: Network Configuration • Define your target’s name by modifying /etc/hosts: 123.12.1.7 vxtarget If using NIS, consult your network administrator. • Put your target’s name (as it appears in the /etc/hosts file) in ~/.rhosts if booting via RSH. •Modify routing tables, if necessary. •Perform similar configuration to enable communication with the hosts running the registry daemon and license manager. 2-6 PC: Host Software Configuration • No environment variables need be set to use the Tornado development environment under Windows. • Install the registry • in the Startup folder for Windows 95 or NT4.0 • as a service for Windows NT • Consult the Windows 95/Windows NT documentation to install and configure TCP/IP for a PC. The hosts file is : • Windows 95 - c:\windows\host • Windows NT - c:\winnt\system32\drivers\etc\hosts • Configure Wind License Management. 2-7 Wind License Management • The Target Server and WindView are license-managed. • Floating licences require a network. • A server daemon on one host allocates a limited number of licences, or seats, to clients, first come first serve. Each seat allows one user on one host to use a particular product, or feature. • Single user licences are valid for one user on one machine. The license is managed by the product, not by a server daemon. • Use the SETUP -L tool on the installation CD to : •email WRS the server host ID needed to create keys. •set up license key files with keys returned from WRS. •on client machines, specify the license server host. 2-8 Getting Started Hardware/Software Configuration Booting Reconfiguration Managing Tornado Target Servers WDB Agent 2-9 Boot ROM • Target’s boot ROM code executes on power up. • Boot ROMs do not contain the VxWorks system under which your application runs. • VxWorks system image is an object module on the host. • The boot ROM code: • Allows setting of boot parameters. • Downloads VxWorks into target memory via the network. • Starts executing VxWorks. 2-10 Boot Configuration wind/target/config/bspName/vxWorks Host (Columbia) team1 % 90.0.0.70 team1 % Target RS-232 90.0.0.131 2-11 CPU number boot device 0 enp At Power-On of Target Serial Session VxWorks System Boot Copyright 1984-1994 Wind River Systems, Inc. CPU: Motorola MVME162 Version: 5.1.1 BSP Version: 1.0 Creation date: Thu May 04 17:17:21 PDT 1995 Press any key to stop auto-boot... 7 [VxWorks boot]: 2-12 The Boot ROM Help Menu [VxWorks Boot]: h ? - Print this list @ - boot (load and go) p - print boot params c - change boot params l - load boot file g adrs - go to adrs d adrs [,n] - display memory ... s [0/1] - system controller 0=off, 1=on n netif - print network interface device address $dev (0,procnum) host:/file h=# e=# b=# g=# u=usr [pw=passwd] f=# tn=targetname s=script o=other Boot flags: 0x02 - load local system sysmbols 0x04 - don’t autoboot 0x08 - quick autoboot (no countdown) .... available boot devices: ex enp ln bp sm 2-13 Boot Parameters [VxWorks Boot]: p boot device processor number host name file name inet on ethernet (e) host inet (h) user (u) flags (f) target name (tn) : : : : : : : : : ln 0 columbia /u/team1/wind/target/config/mv147/vxWorks 90.0.0.131: ffffff00 90.0.0.70 team1 0 vx1 • Unset boot parameters are not displayed by p : gateway inet(g) ftp password (pw) (blank=use RSH) startup script (s) other (o) 2-14 Changing Boot Parameters • Type “c” at the boot prompt to change the boot parameters interactively. • Target boards with NVRAM retain changes after power is cycled. • Alternatively, can type boot parameters on a single line at the boot prompt: $ei(0,0)columbia:/usr/tor1.0/target/config/mv162/vxWorks h=90.0.0.70 e=90.0.0.131 u=team1 Keeping this line in a file on the host machine allows cut and paste (in host’s windowing system) for boot. • Can also make new boot ROMs with correct default parameters (see the Reconfiguration chapter). 2-15 Booting [VxWorks Boot]: @ boot device : ln processor number host name file name inet on ethernet (e) host inet (h)` user (u) flags (f) target name (tn) : : : : : : : : 0 mekong ~trent/wind/target/config/frc30/vxWorks 147.11.54.154 147.11.54.4 trent 0x8 t54-154 Attaching network interface ln0... done. Attaching network interface lo0... done. Loading... 270500 + 14816 + 33050 Starting at 0x1000... Attaching network interface ln0... done. Attaching network interface lo0... done. NFS client support not included. VxWorks Copyright 1984-1995 Wind River Systems, Inc. 2-16 CPU: Force SYS68K / CPU-30 VxWorks: 5.3 BSP Version: 1.1/0 Creation date: Feb 7 1996 WDB: Ready. Rebooting • Type reboot() at a WindSh prompt • Type CTRL-X in serial window or UNIX WindSh. • Press abort button on board • Press reset button on chassis • On a power-on or other cold reboot, RAM is zeroed out to avoid parity errors reading uninitialized memory. A warm reboot skips this step. • Typing reboot( ) or CTRL-X generates a warm reboot. • In a typical VME environment, an abort generates a warm reboot, while a reset causes a cold reboot for all CPU’s on the bus. 2-17 Alternative Booting Schemes • The shared memory network allows a target to boot over the VMEbus. This scheme is discussed in the appendix. Ethernet Host CPU CPU CPU 0 1 2 VMEbus • Can put VxWorks in ROM. This will be covered in the Reconfiguration chapter. 2-18 Alternative Booting Schemes Other booting schemes discussed in the Programmer’s Guide include: • Booting from a local SCSI disk. • Booting one VxWorks target from another, using FTP server CPU 0 CPU 1 VMEbus 2-19 CPU 2 Alternative Booting Schemes • Can boot over a serial line using SLIP (Serial Line Interface Protocol) or CSLIP (Compressed SLIP), or PPP(point-ToPoint Protocol). This is much slower than booting over a fast network connection such as ethernet • Using boot parameters obtained by a target from the host via the BOOTP protocol, the TFTP (Trivial File Transfer Protocol) can be used to boot. 2-20 Getting Started Hardware/Software Configuration Booting Reconfiguration Managing Tornado Target Servers WDB Agent 2-21 Configuring VxWorks How your VxWorks images are configured is governed by information from three sources : 1. The file wind/target/config/all/configAll.h •defines a base (default) configuration affecting all targets. 2. The file wind/target/config/bsp/Name/config.h •specifies board-specific configuration for targets built in the directory bspName. •extends / overrides the base configuration specified in configAll.h. 3. The WindConfig tool , if used, •includes or excludes optional facilities in VxWorks. •overrides scaling choices made in configAll.h and config.h. 2-22 The configAll.h file /* INCLUDED SOFTWARE FACILITIES */ /*********************************************************/ #define INCLUDE_BOOTP #define INCLUDE_CACHE_SUPPORT #define INCLUDE_CONSTANT_RDY_Q .... /* EXCLUDED FACILITIES */ /********************************************************/ #if FALSE .... #define INCLUDE_NFS #define INCLUDE_PING #define INCLUDE_RPC ... #endif /* FALSE */ 2-23 The config.h file #define BSP_VERSION “1.1” #define BSP_REV “/4” /* 0 for first revision */ #define INCLUDE_SCSI2 #include “configAll.h” #include “mv162.h” #undef INCLUDE_BOOTP #define INCLUDE_PING Override defaults in configAll.h. #undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_SERIAL ...... Other configurable board parameters /* The following has been added by WindConfig */ #include “configdb.h” Overrides INCLUDE_XXX above 2-24 WindConfig 2-25 Getting Started Hardware/Software Configuration Booting Reconfiguration Managing Tornado Target Servers WDB Agent 2-26 Accessing Tools • Use a control panel to manage your Tornado session: • Create and manage target servers. • Start Tornado tools • Invoke online manuals. • File requests for Technical Support • Browse relevant Web sites. • For UNIX hosts, the control panel is the Launcher. • For PC hosts, the integrated Tornado development environment serves as the control panel. 2-27 Accessing A Control Panel • (UNIX Host) To invoke the Launcher from the command line, use : % launch & • (PC Host) To start the Tornado development environment , select the Tornado icon in the Tornado program group ( Start => Programs => Tornado ). 2-28 UNIX Launcher Menu Bar Button Bar Display Panels Tool Select Icons 2-29 PC: Tornado Environment Menu Bar Button Bar Tornado Launch Toolbar Display Panels 2-30 Getting Started Hardware/Software Configuration Booting Reconfiguration Managing Tornado Target Servers WDB Agent 2-31 Overview • After booting a target, start its target server. • Target server provides host-based management of target resources needed by development tools: • Dynamic module loading and unloading. • Host-resident symbol table for target. • Allocation of memory on target for host tools. • Gathering of information about objects on target. • This scheme is flexible: • Minimizes tool’s impact on target. • Target server handles communication with the target. • Tools are independent of the type of communication link required by target. 2-32 The Target Server wtxregd Tool VxWorks Tool tgtsvr Tool wlmd 2-33 WDB Agent Host - Target Interaction Tool VxWorks tgtsvr back end 2-34 WDB Agent Starting the Target Server After booting a target, you must start a target server to access the target via Tornado’s tools: • wtxregd, the registry daemon, should be running on the WIND_REGISTRY host. • For target server configuration , use • the Target menu from the Launcher. (UNIX Host) • the Tools menu in the Tornado development environment. (PC Host) 2-35 UNIX: Managing Target Servers Target Server Name / IP Address Target Server Name Target Server Lock Target Server Command Window Launch Button 2-36 PC: Managing Target Servers Target Server Name Change Property Target Server Name / IP Address Backed Log File Target Server Command Window Launch Button 2-37 Connecting To Target • Once the target server is successfully connected to the target, a diagnostic window will appear with connection information (provided the Verbose option was specified) : tgtsvr (igor@sybeck): Thu Jun 12 14:14:02 1997 License request... authorized on host ‘palomino’. Wind River Systems Target Server : NT/Win95 version Attaching backend... succeeded. Connecting to target agent... succeeded. Attaching C++ interface... succeeded. Attaching a.out OMF reader... succeeded. • Now Tornado tools may be started to interact with the target. 2-38 Getting Started Hardware/Software Configuration Booting Reconfiguration Managing Tornado Target Servers WDB Agent 2-39 WDB Agent Configuration • WDB Agent provides target agency for the Tornado tools: • Modifying memory. • Setting break points. • Examining objects. • Agent is configurable: • Specify task, external, or dual debug mode. • Select communication strategy consistent with target server back end. • Set amount of target memory reserved for agent’s use. 2-40 Host - Target Interaction Tool VxWorks tgtsvr back end 2-41 WDB Agent Agent Configuration • By default, INCLUDE_WDB is defined, enabling WDB Agent support. • Set WDB_MODE to the appropriate debug strategy: • WDB_MODE_DUAL - task and system-level agent. • WDB_MODE_TASK - task-level agent only. • WDB_MODE_EXTERN - system-level agent only. • Set WDB_COMM_TYPE to your communication type. Examples are: • WDB_COMM_NETWORK • WDB_COMM_SERIAL - TCP/IP link. - serial link. • Specify the initial size of the agent’s memory pool with WDB_POOL_SIZE. • Configure the agent’s serial channel (optional). 2-42 Summary • Environment variables. • WIND_BASE • WIND_REGISTRY • WIND_HOST_TYPE • PATH • GCC_EXEC_PREFIX • Configure network facilities. • Critical boot parameters: • boot device • VxWorks pathname • host internet address • target internet address • user name • processor number 2-43 Summary • Invoke a target server for each target. • Target server manages: • Target resources used by host tools. • Target Information. • Communication with target. • Tool-target interactions. • Use control panel to manage a Tornado development session: • Create, restart, and kill target servers. • Start Tornado tools like windsh, browser, etc 2-44 Summary • Reconfiguration: • Modify the file wind/target/config/bspName/config.h , or use WindConfig. • Avoid modifying wind/target/config/all/configAll.h, which specifies a baseconfiguration affecting all targets. • Remake the vxWorks image in: wind/target/config/bspName. • Configure WDB Agent: • Debug mode. • Communication strategy. • Memory pool. 2-45