Вы находитесь на странице: 1из 47

Chapter

1
Getting Started

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-1

Components of Tornado

Getting Help

Hardware / Software Conguration

Booting

Starting Tornado

WDB Agent

Getting Started
1.1 Components of Tornado Getting Help Hardware / Software Conguration Booting Starting Tornado WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-2

What is Tornado?

What is VxWorks?

How are Tornado and VxWorks used?

What is provided with Tornado?

Where are les located?

What is Tornado?

Real-Time System

Development Tools

Networking

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-3

Tornado is an integrated environment for developing real-time and embedded applications.

Major components of Tornado:

VxWorks real-time operating system runs time-critical or embedded application.

Development tools aid in testing, timing, and debugging.

Networking support enables


q q

Interprocessor communication Remote le access Remote command/function execution Booting across network

Development Tools
Tornado Development Tools:
q q

Launch WindSh CrossWind Browser Project Facility WindView Simulator

- Launch Tornado tools - Access target interactively - Source-level debugger - Display system information - Congure applications or VxWorks - Analyze multitasking application - Simulate VxWorks target on host OS

Tools are customizable with Tcl:


q q

Add new functionality Customize user interface some target-resident tools are available.
Copyright Wind River Systems Wind River Systems

Tornado Training Workshop

1-4

Most Wind River tools can be customized with the Tool Command Language (Tcl), a scripting language similar to the Bourne Shell or C.

Tcl and the Tk ToolKit, by John Ousterhout, has more information on Tcl.

Tcl allows users to:


q q

add user-dened commands. customize Tornado GUIs with new menu-items, buttons, etc.

Tornado is available on Solaris 2.51, 2.6, and 2.7; Windows 95, 98 and NT; and HP-UX 10 hosts.

Some GUI customizations may be incompatible between UNIX and Windows platforms.

GNU C++ support is bundled with Tornado.

Real-Time System
Memory Mgmt. File Systems

I/O System

Kernel
Device Drivers Network Stack

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-5

A real-time operating system allows applications to meet critical deadlines.

Multitasking kernel:
q q

Real-time scheduling (preemptive, priority based) Intertask communication Mutual exclusion

Other standard facilities are set up as libraries surrounding the kernel.

Differences from a non-real-time OS:


q q

Preemptive priority based scheduling Fast Small and congurable (micro-kernel architecture)

Performance Enhancements
All tasks reside in a common address space. RAM text data bss fooLib
int fooVal; void fooSet (int x) { fooVal = x; } tTaskB fooSet (99) tTaskA fooSet (4)

All tasks run in supervisor (privileged) mode.

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-6

In UNIX/NT, a process has its own memory locations for data and bss but shares text with all other processes executing the same code.

In VxWorks, when a task accesses the text, data, or bss segments of a module, it accesses the same physical memory locations as any other task using the same code.

All tasks reside in a common address space. + Makes intertask communication fast and easy. + Makes context switch faster (no need to save and restore virtual address contexts). - A deviant task can corrupt other tasks.

All tasks run in supervisor (privileged) mode. + No system call overhead. All VxWorks facilities are invoked as normal subroutines.

Cross-development Cycle
Host RS-232 Target

Tornado

VxWorks

ethernet

Typical Tornado development conguration


1-7

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

Coding and builds done on the host using proven tools:


q q

Editing Compiling/assembling/linking, within the project facility or from the command line. Tracking source code (ClearCase, PVCS, Visual Source Safe, ...) Loading Execution Source level debugging Performance monitoring

Test/Debug done on the target using Tornado host tools:


q q

Typical development cycle consists of iteratively writing and compiling code on the host, downloading to target, testing code on target and going back to host for further writing and modication of the code.

Tornado Delivery
Boot ROMs for supported boards
q q

Board specic Use network to download VxWorks from host Turnkey for standard boards Tornado tools, which run on the host The VxWorks OS, which runs on the target Wind River Supplied BSPs

CD-ROM for product components


q q

Compiler ToolKit Manuals on VxWorks and Tornado

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-8

Some SPARC boards use OpenBoot to download the boot ROM program, which can then boot VxWorks.

The GNU ToolKit family of compilers, linkers, etc., is automatically installed in the Tornado directory tree. In Tornado 2.0, the C compiler is the same GCC version 2.7.2 used in Tornado 1.0.1; for C++ code, the compiler is based on EGCS 1.0.2, or EGCS 1.0.3 for the PC simulator.

See the Wind River Products Installation Guide for the details of installing Tornado.

Information on known problems, changes introduced with current CDROM version, and product bulletins can be found at www.wrs.com/ corporate/support/prodbullet/T2.0.

Portability
HSP

Generic VxWorks

WDB Agent

Arch BSP

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-9

Most of VxWorks is machine independent. The machine-dependent portions of VxWorks are:


q q

Architecture specic (e.g., MC680X0, PPC, i960, x86, ARM). Board specic (e.g., hardware initialization, VMEbus interface, clock/timer functions). Host specic (cross-compilers, tornado tools & target server).

The WDB debug agent provides target agency. Because it is independent of VxWorks, you can perform system-level debugging with the remote source-level debugger.

BSP is an acronym for Board Support Package. It is the board-specic part of VxWorks. HSP is an acronym for Host Support Package. It is the host-specic part of Tornado.

Tornado Directory Tree


host
Tornado host-resident tools

SETUP SETUP program /usr/wind share target docs


Shared XDR code VxWorks OS, Board support packages On-line HTML documentation

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-10

The shared XDR code is used in the transfer of data between the host tools and the target. The eXternal Data Representation is a standard format for sending data over the network used by RPC (Remote Procedure Call) applications.

The Tornado directory tree can be installed anywhere that is convenient. By convention, the location of this installation directory, /usr/wind in this example, is referred to as the wind directory. For a Windows host, the wind directory might be C:\Tornado.

Host Directory Tree

include src

Header les for Tornado tools VxColor demo source

host

host-os Host-specic tools bin Tornado and GNU host executables lib Tornado Tool libraries resource GUI, Tcl, and Help support les tcl Standard Tcl distribution

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-11

The directory host-os is named for your hosts hardware and operating system. Valid types are: x86-win32 sun4-solaris2 parisc-hpux10 All Windows hosts Solaris hosts HP-UX hosts

Target Directory Tree


cong Files to congure and build VxWorks all Generic conguration les bspName Board Support Package (BSP) comps VxWorks component descriptor les and conglettes. Pre-built VxWorks bootable projects

proj

target

h VxWorks header les lib Libraries provided by VxWorks src Partial VxWorks source code unsupported Tools, drivers

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-12

The boot program and VxWorks start-up source code are in wind/ target/cong/all.

BSP source code is shipped in wind/target/cong/bspName/sysLib.c.


q

This le may include other les from the BSP directory as well as generic drivers under wind/target/src/drv (e.g., the clock/timer routines are in the wind/target/src/drv/timer directory). Source code for network interface and SCSI drivers is not provided in the standard distribution.

Each VxWorks library, consisting of usually one, but sometimes more object modules, has corresponding header les. Examples:
Library -----------------taskLib memPartLib semLib sysLib Routine ----------------taskSpawn malloc semTake sysHwInit Include le(s) ------------------taskLib.h stdlib.h semLib.h sysLib.h

Getting Started
Components of Tornado 1.2 Getting Help Hardware / Software Conguration Booting Starting Tornado WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-13

Manuals.

Online information.

Users group.

Technical Support.

WindSurf

Overview
There are several classes of help resources: Manuals on host tools:
q q

Tornado Users Guide GNU ToolKit Users Guide WindView Users Guide VxWorks Programmers Guide VxWorks Network Programmers Guide VxWorks Reference Manual BSP Reference (HTML)

Manuals on VxWorks OS:


q q

Tornado Online HTML Manuals Technical Support (if purchased)


Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-14

Other manuals include:


q q

Wind River Products Installation Guide. Customer Support Users Guide Tornado Release Notes. Tornado API Guide. Debugging with GDB GNU Make All of the Tornado and VxWorks manuals are available in HTML format in wind/docs. Manuals can be accessed using Help menu on Windows and UNIX. Some context-sensitive help is available on Windows hosts using the F1 key.

Tornado online help:


q

Other Resources
Usenet newsgroups covering VxWorks and embedded programming topics, for example comp.os.vxworks. Training courses:
q q

Tornado Device Driver Workshop Tornado BSP Training Workshop Tornado Tools Training Workshop installation problems and media errors WRS software, documentation, and service errors understanding WRS product functionality

Technical Support provides help with


q q

WindSurf self-help web pages: search engine, FAQ, patches, document updates, known problems list, ...
Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-15

Additional newsgroups of interest include:


q q

comp.os.realtime - general real-time topics comp.arch.bus.vmebus comp.arch.embedded Use the Support menu item within Tornado This helps you ll out a Tornado Support Request form, then sends email to support@wrs.com. In the USA, call 1-800-USA-4WRS. Hours are from 5 A.M. to 5 P.M. Pacic time. Outside of the USA, contact your local WRS ofce.

Technical Support is available if purchased.


q

WindSurf may be reached from the Wind River Systems home page, http://www.wrs.com; from there go to the Customer Support page. Access to WindSurf requires registration for a password and user ID.

Getting Started
Components of Tornado Getting Help 1.3 Hardware / Software Conguration Booting Starting Tornado WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-16

Conguring the target hardware

Conguring the host software

Setting up for Cross-Development


To perform cross-development, you must: Set up target hardware. Dene host environment variables and congure networking software. Start the Tornado registry, wtxregd.
q

wtxregd manages a list of target servers. Tools contact the registry to look up target servers by name.

Specify target boot parameters and boot target. Congure and launch target server.
q

Each target server manages host tools interaction with a particular target.
Copyright Wind River Systems Wind River Systems

Tornado Training Workshop

1-17

A typical conguration would run one registry daemon per development project.

The Tornado architecture allows the registry, target servers, and Tornado tools to run on different networked hosts.

Target Hardware Conguration


VxWorks ROMs replace the manufacturers ROMs. Boards may need to be jumpered. See the online BSP Reference entry for your BSP about hardware setup considerations. Of course,
q q

Static electricity and overheating can damage boards. Connectors must be rmly in place (serial cables, ethernet cables, VME, etc.). System controller in slot 0 (left-most slot). Having empty slots between boards requires jumpering the backplane.
Copyright Wind River Systems Wind River Systems

VME specic:
q q

Tornado Training Workshop

1-18

VME:
q

If there are empty slots between boards (and the backplane is not jumpered correctly), VMEbus interrupts and arbitration will not work properly. Some boards enable bus arbitration via jumpers. In this case, the board in the left-most slot must be jumpered differently from the others.

UNIX: Host Software Conguration


Set environment variables required by Tornado in your .cshrc (or .prole) le. The script torvars.csh (or torvars.sh) may be sourced to set these variables. Modify the registry hosts start-up les to start the registry daemon, wtxregd, when the host boots. Congure network access information:
q q

Obtain target IP addresses Assign host names to targets (optional) If booting with RSH, list your targets name in ~/.rhosts. If necessary, modify routing tables.

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-19

Environment variables which must be set include Tornado installation directory WIND_REGISTRY host where registry daemon runs WIND_HOST_TYPE sun4-solaris2 or parisc-hpux10 PATH $WIND_BASE/host/$WIND_HOST_TYPE/bin:... LD_LIBRARY_PATH Solaris shared library path, SHLIB_PATH HP-UX shared library path. The Getting Started chapter of the Tornado Users Guide discusses how to congure the environment variables for your host.
q

WIND_BASE

wtxregd is the Wind Registry daemon, which tracks available target servers and must be running on the host specied by the WIND_REGISTRY environment variable. The local host is the default.

Contact your network administrator about obtaining IP addresses for, and assigning host names to, VxWorks target computers.

PC: Host Software Conguration


No environment variables need be set to work within the Tornado IDE under Windows. Source torVars.bat to use tools from the command line. Registry startup procedure is dened when installing Tornado. The registry may be installed in the Startup folder for Windows 95, 98 or NT 4.0. as a service for Windows NT. The registry may also be run manually.
q q

When using Tornado, specify the registry host you wish to use on the Tools => Options... => Tornado Registry page. Consult Windows 95/98/NT documentation to install and congure TCP/IP for a PC.
Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-20

The torVars.bat script, located in host\x86-win32\bin, sets environment variables needed for command-line use of the tools. Here is an example torVars.bat le:
set WIND_HOST_TYPE=x86-win32 set WIND_BASE=D:\TTwo set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%

In this case, Tornado was installed in the directory D:\TTwo. Too avoid needing to source the le for each command-line shell, one may dene the environment variables in autoexec.bat (Windows 95) or using the System control panel (Windows NT).

The hosts le which you may edit to associate IP addresses with hostnames is:
q q

Windows 95 - c:\windows\hosts Windows NT - c:\winnt\system32\drivers\etc\hosts

Getting Started
Components of Tornado Getting Help Hardware / Software Conguration 1.4 Booting Starting Tornado WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-21

Setting boot parameters

Rebooting

Alternative booting schemes

Boot ROM
Targets 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:
q q

Allows setting of boot parameters. Downloads VxWorks into target memory via the network. Starts executing VxWorks.

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-22

Boot Conguration
Host (Columbia) wind/target/cong/bspName/vxWorks
team1%

90.0.0.70

RS-232

CPU number 90.0.0.131 0 boot device Target


Tornado Training Workshop

ei 1-23

Copyright Wind River Systems Wind River Systems

Boot parameters are set via a serial link.

VxWorks is booted through the ethernet (which is much faster).

Key boot parameters:


q q

Boot device Host internet address Path of VxWorks image User name Target internet address CPU number

Network interface to use. Address of host from which to boot. File to transfer over network. For le access purposes. Denes the targets address. Each board in chassis gets a different number. The shared memory master is CPU 0.

At Power-On of Target

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-24

On power-on, the boot ROMs I/O is through a serial port. To connect to a serial port on a UNIX workstation, use tip (SunOS), cu, or kermit. Above is shown a PC using HyperTerminal.

One may type h at the boot prompt to see a list of commands.

[VxWorks Boot]: h ? - Print this list @ - boot (load and go) p - print boot params c - change boot params l - load boot le g adrs - go to adrs d adrs [,n] - display memory ... n netif - print network interface device address $dev (0,procnum) host:/le h=# e=# b=# g=# u=usr [pw=passswd] f=# tn=targetname s=script o=other Boot ags: 0x02 - load local system symbols 0x04 - dont autoboot 0x08 - quick autoboot (no countdown) 0x20 - disable login security 0x40 - use dhcp to get boot parameters 0x80 - use tftp to get boot image 0x100 - use proxy arp available boot devices: ei0 sm

Boot Parameters
[VxWorks Boot]: p boot device unit number processor number host name le name inet on ethernet (e) host inet (h) user (u) ftp password (pw) ags (f) target name (tn) : : : : : : : : : : : ei 0 0 wolverine c:\tornado2\target\cong\mv162\vxWorks 147.11.12.204:ffffff00 147.11.12.165 todd covert 0 t12-204

Unset boot parameters are not displayed by p:


gateway inet (g) startup script (s) other (o)

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-25

Check hardware to determine type of boot device. Some examples: Manufacturer 3Com Lance Excelan Digital Intel Boot Device Code elPci ln ex dc ei

Windows users may use / instead of \ as a le separator. Unix users would of course use /.

For le access permission (to download the VxWorks system image)


q q

User name For rsh protocol ~/.rhosts (UNIX Host) A password must be specied to boot using the FTP protocol.

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)wolverine:c:\tornado2\target\cong\mv162\vxWorks \ h=147.11.12.165 e=147.11.12.204 u=todd pw=covert tn=t12-204

Keeping this line in a le on the host machine allows cut and paste (in hosts windowing system) for boot. Can also make new boot ROMs with correct default parameters (see the Reconguration chapter).
Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-26

Booting
[VxWorks boot]: @ boot device unit number processor number host name file name inet on ethernet (e) host inet (h) user (u) ftp password (pw) flags (f) target name (tn) : : : : : : : : : : : ei 0 0 wolverine c:\tornado2\target\config\mv162\vxWorks 147.11.12.204:ffffff00 147.11.12.165 todd covert 0x8 t12-204

Attached TCP/IP interface to ei0. Attaching network interface lo0... done. Loading... 424504 + 29664 + 29404 Starting at 0x20000... Attached TCP/IP interface to ei unit 0 Attaching network interface lo0... done. NFS client support not included. VxWorks Copyright 1984-1998 Wind River Systems, Inc. CPU: VxWorks: BSP version: Creation date: WDB: Motorola MVME162 5.4 1.2/0 Apr 17 1999 Ready.

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-27

The numbers following Loading... are the sizes of the VxWorks images text, data, and bss (uninitialized data) segments.

Debugging hints - If you see...


q

The rst Attaching network interface without the done, verify that the correct network interface is being used. On VME systems with separate ethernet cards, check that the system controller is congured properly and that the ethernet board is properly jumpered. Loading... without the size of the VxWorks image, check the ethernet cable and connection. The Starting at with no further indication that VxWorks is running, verify that the VxWorks image is valid. The second Attaching network interface without the done, check the network driver in the newly loaded VxWorks image.

After booting, start a target server and start using Tornado tools.

Rebooting
Type reboot( ) at a WindSh prompt. Type CTRL-X in target console 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.
q q

Typing reboot( ) or CTRL-X generates a warm reboot. In a VME environment, typically an abort generates a warm reboot, while a reset causes a cold reboot for all CPUs on the bus.
Copyright Wind River Systems Wind River Systems

Tornado Training Workshop

1-28

Alternative Booting Schemes


The shared memory network allows a target to boot over the VMEbus. This scheme is discussed in the appendix. Boot from a local disk. Boot one VxWorks target from another, using the FTP server. Boot over a serial line, using SLIP, CSLIP, PPP, or TSFS. Slower than booting across ethernet. Obtain boot parameters using DHCP or BOOTP, then download the boot le using TFTP. Can put VxWorks in ROM. This will be covered in the Reconguration chapter.
Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-29

The various booting methods are discussed in the VxWorks Network Programmers Guide and the Tornado Users Guide.

CSLIP uses compressed TCP/IP headers. Consequently, it is faster than SLIP.

Specify the 0x40 bit in the ags boot parameter to obtain critical boot parameters via DHCP. Specify 0x80 in ags to boot with TFTP. To do both, include 0xC0 in ags. Setup of the DHCP server host is also required; see the Networking chapter and the VxWorks Network Programmers Guide for details.

VxWorks includes a DHCP server component, which can also used as a BOOTP server.

Some boot mechanisms will require rebuilding the boot ROM.

Getting Started
Components of Tornado Getting Help Hardware / Software Conguration Booting 1.5 Starting Tornado WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-30

Managing a Tornado development session

Accessing Tools
Use a control panel to manage your Tornado session:
q q

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. Start control panel with: % launch & For PC hosts, the Tornado integrated development environment (IDE) serves as the control panel. Invoke the IDE with from the Start menu.
Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-31

We will examine other tools later.

To customize Tornados development environment, add Tcl commands to the appropriate les in the .wind directory. See the Tornado Users Guide for details.

UNIX: Launcher
Menu Bar Button Bar

Display Panels

Tool Select Icons

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-32

The Targets panel lists target servers known to the registry.

Information panel displays information about a selected target server.

To launch a tool, click on a target servers name in the Targets panel and then click on the appropriate tool icon. Several optional product icons are shown. They are added automatically when a product is installed.

Use the Target menu to manage target servers:


q q

Launch new or saved target servers. Save target server congurations. Restart/kill target servers. Use Support menu to request Technical Support via email.
q

Use Admin menu to install WRS products, ftp WRS, or edit a users le.

Use Info menu to browse relevant Web sites.

Use Help to access the online hypertext manuals.

PC: Tornado Environment


Launch Toolbar

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-33

Use the Tools menu to launch new or saved target servers, and access Tornado tools.

Use the Project menu to manage and download project les.

Use the Build menu to compile projects and track dependencies.

Use the File and Edit menus to view and modify les.

Use the Debug menu to access source debugger tools.

Use the Help menu to access help facilities.

Use the Window menu for window management.

Tools can also be accessed using the Launch toolbar once a target server is congured.

Target Server
After booting a target, you must start a target server to access the target using the Tornado tools. Target server provides host-based management of target resources needed by development tools:
q q

Communication with debug agent on target. Dynamic module loading and unloading. Host-resident symbol table for target. Allocation of memory on target for host tools. Cache of target program text segment memory. Virtual I/O facilities.

This scheme is exible: Minimizes tools impact on target. Tools independent of type of communication link.
q q

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-34

All Tornado tools use the Wind River Tool Exchange Protocol (WTX) to communicate with the target server. The WTX protocol is documented in the Tornado API Guide.

The target server satises a tools WTX request by:


q q

manipulating information it has cached. sending requests to the WDB agent on the target.

Tornado Architecture
Host Target

wtxregd Tool Tool Tool


wtxregd must be started before target server and tools. The tools, registry, and target server may run on different hosts.
Tornado Training Workshop Copyright Wind River Systems Wind River Systems

VxWorks tgtsvr
WDB Agent

1-35

The Tornado registry daemon must be running on the host specied by


q q

the WIND_REGISTRY environment variable the Tools => Options... => Tornado Registry page

(UNIX) (Windows)

The target server (tgtsvr) mediates tools interactions with the target. The target server provides: communication over Ethernet, serial, NetROM, and custom connections. host-resident table of target symbols. dynamic module loading and unloading. cache of program text stored in targets RAM. virtual I/O path with target. wtxregd, the Wind Registry Daemon, manages the information a tool needs to connect to a target server. Tools initially contact the registry to nd out how to contact a particular target server.
q q q q q

UNIX:Creating Target Servers (Pt. 1)

Target name/ IP Address Target Server Name

Target Server Lock

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-36

To invoke the target server conguration window, click on the Target => Create menu item from the Launcher.

Use the target server conguration window to launch and save target server congurations.

To create a target server conguration:


q q

Enter targets name in the Target Name eld. Select desired options. Launching the target server will save the conguration.

Creating Target Servers (Pt. 2)

Backend list

Target server command line Launch Button

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-37

To launch a saved conguration, select it from the Saved Congurations list and click on Launch.

PC: Managing Target Servers

Target Server Name Target Server Properties

Target Name / IP Address Target Server Command Line Launch Button

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-38

To invoke the Target Server conguration window select Target Server/ Congure from the Tools menu in the Tornado development environment.

To create a target server conguration:


q q

Enter targets name in the Target Name / IP Address eld. Select desired options, using the Change Property toolbar. Optionally, specify Log File, Timeout and Re-try(Count) elds.

To launch a conguration, click on Launch, and the conguration will be saved. To save the conguration without launching it, click on OK.

Selecting Add description to menu checkbox will add the target server name to the Tools -> Target Server menu. Selecting this menu item will launch your target server.

Connecting To Target
Once the target server is successfully connected to the target,
q

(UNIX) An xterm will appear with connection information (provided the Verbose option was specied), or (Windows) A dedicated target server window will display status. Look in taskbar system tray for .

Now Tornado tools may be started to interact with the target.


Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-39

Getting Started
Components of Tornado Getting Help Hardware / Software Conguration Booting Starting Tornado 1.6 WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-40

Conguring WDB Agent

WDB Agent Conguration


The WDB Agent acts on the target on behalf of the target server and Tornado tools:
q q

Reading or modifying memory. Setting or clearing break points. Creating, starting, stopping, and deleting tasks. Calling functions. Gathering system object information. Specify task, external, or dual debug mode. Select communication strategy consistent with target server back end. Set amount of target memory reserved for agents use.
Copyright Wind River Systems Wind River Systems

Agent is congurable:
q q

Tornado Training Workshop

1-41

The target server and WDB agent communicate via the Wind Debug (WDB) Protocol.

The agent uses memory to satisfy tools requests, for example, to download code, create a variable, spawn a task, or process a command.

By setting aside a dedicated pool of memory for the agent, Tornados intrusion on the target is minimized.

The default conguration is dual mode.

To obtain information on VxWorks system objects from the target, a tool sends a Gopher script which the WDB agent interprets to gather and return the requested information. This scheme allows any object to be examined and minimizes the use of target resources. The small Gopher language is part of the WTX protocol documented in the Tornado API guide.

Host - Target Interaction

Tool

VxWorks

tgtsvr back end WDB Agent

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-42

The WDB debug agent executes on the target and provides agency for commands issued by the target server.

All tools connect to the target server, which executes on a host and handles the details of communicating with the WDB agent. Tornado supports TCP/IP, serial, and NetROM connections.

Usually the WDB agent runs as a task, because this conguration gives the best performance. However, this conguration only provides tasklevel debugging. It is called task or internal mode.

Because the WDB agent does not depend on VxWorks, it is possible to perform system-level debugging--e.g, debugging ISRs or code which executes before the kernel is running. Run WDB agent outside of VxWorks to debug at the system-level. This conguration is called external or system mode.

Agent Conguration
In the default VxWorks image, the WDB agent is dened, enabling WDB Agent support. All target agent components are in /development tool components/WDB agent components/. Set WDB mode component to the appropriate debug strategy (select at least one of the two):
q q

.../select WDB mode/WDB system debugging .../select WDB mode/WDB task debugging

Set WDB communication type. Some example components are:


q q

.../select WDB connection/WDB END driver connection .../select WDB connection/WDB serial connection

Congure the agents serial channel (optional) by setting component parameters.


Tornado Training Workshop Copyright Wind River Systems Wind River Systems

1-43

Components and parameters are discussed in the Projects chapter.

The default conguration for most targets includes both the system and task mode agents, with communication via END driver connection.

To debug before the system is multi-tasking, set mode to system debugging only. See the Tornado Users Guide for details.

To debug interrupt service routines, you must choose a mode with an external agent.

Selecting both task and system modes causes VxWorks to create both external and task mode WDB agents. The agents will dynamically pass control back and forth, as you exit and enter system-level debugging.

When debugging over a serial line, use the highest reliable data rate.

See the Getting Started chapter of the Tornado Users Guide for details.

Summary
Tornados three components:
q q

VxWorks real-time operating system Networking Development tools Located in wind/target/cong/bspName Contains board-specic les

BSP (Board Support Package)


q q

Host executables are located in wind/host/host-os/bin/. Help available:


q q

Online documentation Customer Support and WindSurf


Copyright Wind River Systems Wind River Systems

Tornado Training Workshop

1-44

Summary
Target hardware setup is described in BSP documentation. Host environment.
q

Set environment variables for UNIX or commandline use. Congure network facilities: IP addresses and hostnames.

Critical boot parameters: boot device VxWorks pathname host internet address target internet address user name processor number
q q q q q q

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-45

Summary
Use control panel to manage a Tornado development session:
q q

Create, restart, and kill target servers. Start Tornado tools like WindSh, Browser, etc..

Invoke a target server for each target. Target server manages:


q q

Target resources used by host tools. Target information. Communication with target. Tool-target interactions.

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-46

Summary
Congure WDB Agent:
q q

Debug mode Communication strategy

Tornado Training Workshop

Copyright Wind River Systems Wind River Systems

1-47

Вам также может понравиться