getting started -...

47
Wind River Systems Tornado Training Workshop © Copyright Wind River Systems 1-1 Chapter 1 Getting Started Components of Tornado Getting Help Hardware / Software Configuration Booting Starting Tornado WDB Agent

Upload: others

Post on 27-Jun-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-1

Chapter

1

Getting Started

Components of Tornado

Getting Help

Hardware / Software Configuration

Booting

Starting Tornado

WDB Agent

Page 2: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-2

Getting Started

1.1 Components of Tornado

Getting Help

Hardware / SoftwareConfiguration

Booting

Starting Tornado

WDB Agent

What is Tornado?

What is VxWorks?

How are Tornado and VxWorks used?

What is provided with Tornado?

Where are files located?

Page 3: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-3

What is Tornado?

Real-TimeSystem

DevelopmentTools

Networking

• 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

● Interprocessor communication

● Remote file access

● Remote command/function execution

● Booting across network

Page 4: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-4

Development Tools

• Tornado Development Tools:

● Launch - Launch Tornado tools

● WindSh - Access target interactively

● CrossWind - Source-level debugger

● Browser - Display system information

● Project Facility - Configure applications or VxWorks

● WindView - Analyze multitasking application

● Simulator - Simulate VxWorks target on host OS

• Tools are customizable with Tcl:

● Add new functionality

● Customize user interface

● some target-resident tools are available.

• Most Wind River tools can be customized with the Tool CommandLanguage (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:

● add user-defined commands.

● customize Tornado GUI’s 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.

Page 5: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-5

Real-Time System

Kernel

I/OSystem

DeviceDrivers

MemoryMgmt.

FileSystems

NetworkStack

• A real-time operating system allows applications to meet critical

deadlines.

• Multitasking kernel:

● 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:

● Preemptive priority based scheduling

● Fast

● Small and configurable (micro-kernel architecture)

Page 6: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-6

Performance Enhancements

• All tasks reside in a common address space.

• All tasks run in supervisor (privileged) mode.

RAM

text

data

bss

fooLib

int fooVal;

void fooSet (int x)

{

fooVal = x;

}

tTaskA

fooSet (4)

tTaskB

fooSet (99)

• 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 virtualaddress contexts).

- A deviant task can corrupt other tasks.

• All tasks run in supervisor (privileged) mode.

+ No system call overhead. All VxWorks facilities are invoked asnormal subroutines.

Page 7: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-7

Cross-development Cycle

Typical Tornado development configuration

TargetHostRS-232

ethernet

VxWorksTornado

• Coding and builds done on the host using proven tools:

● Editing

● Compiling/assembling/linking, within the project facility or fromthe command line.

● Tracking source code (ClearCase, PVCS, Visual Source Safe, ...)

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

● Loading

● Execution

● Source level debugging

● Performance monitoring

• 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 modification of the code.

Page 8: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-8

Tornado Delivery

• Boot ROM’s for supported boards

● Board specific

● Use network to download VxWorks from host

● Turnkey for standard boards

• CD-ROM for product components

● Tornado tools, which run on the host

● The VxWorks OS, which runs on the target

● Wind River Supplied BSP’s

• Compiler ToolKit

• Manuals on VxWorks and Tornado

• 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 CD-

ROM version, and product bulletins can be found at www.wrs.com/corporate/support/prodbullet/T2.0.

Page 9: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-9

Portability

HSP

GenericVxWorks

Arch

BSP

WDB

Agent

• Most of VxWorks is machine independent. The machine-dependent

portions of VxWorks are:

● Architecture specific (e.g., MC680X0, PPC, i960, x86, ARM).

● Board specific (e.g., hardware initialization, VMEbus interface,clock/timer functions).

● Host specific (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-specific

part of VxWorks. HSP is an acronym for Host Support Package. It is the

host-specific part of Tornado.

Page 10: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-10

Tornado Directory Tree

/usr/wind

host

share

target

Tornado host-residenttools

SETUP program

Shared XDR code

VxWorks OS,Board support packages

On-line HTMLdocumentation

SETUP

docs

• 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.

Page 11: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-11

Host Directory Tree

include Header files for Tornado tools

src VxColor demo source

host-os Host-specific tools

bin Tornado and GNU host executables

lib Tornado Tool libraries

resource GUI, Tcl, and Help support files

tcl Standard Tcl distribution

host

• The directory host-os is named for your host’s hardware and operating

system. Valid types are:

x86-win32 All Windows hosts

sun4-solaris2 Solaris hosts

parisc-hpux10 HP-UX hosts

Page 12: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-12

Target Directory Tree

config Files to configure and build VxWorks

all Generic configuration files

bspName Board Support Package (BSP)

comps VxWorks component descriptorfiles and configlettes.

proj Pre-built VxWorks bootable projects

h VxWorks header files

lib Libraries provided by VxWorks

src Partial VxWorks source code

unsupported Tools, drivers

target

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

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

● This file may include other files from the BSP directory as well asgeneric drivers under wind/target/src/drv (e.g., the clock/timerroutines are in the wind/target/src/drv/timer directory).

● Source code for network interface and SCSI drivers is not providedin the standard distribution.

• Each VxWorks library, consisting of usually one, but sometimes more

object modules, has corresponding header files. Examples:

Library Routine Include file(s)------------------ ----------------- -------------------taskLib taskSpawn taskLib.hmemPartLib malloc stdlib.hsemLib semTake semLib.hsysLib sysHwInit sysLib.h

Page 13: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-13

Getting Started

Components of Tornado

1.2 Getting Help

Hardware / SoftwareConfiguration

Booting

Starting Tornado

WDB Agent

Manuals.

Online information.

Users’ group.

Technical Support.

WindSurf

Page 14: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-14

Overview

There are several classes of help resources:

• Manuals on host tools:

● Tornado User’s Guide● GNU ToolKit User’s Guide● WindView User’s Guide

• Manuals on VxWorks OS:

● VxWorks Programmer’s Guide● VxWorks Network Programmer’s Guide● VxWorks Reference Manual● BSP Reference (HTML)

• Tornado Online HTML Manuals

• Technical Support (if purchased)

• Other manuals include:

● Wind River Products Installation Guide.● Customer Support User’s Guide● Tornado Release Notes.● Tornado API Guide.● Debugging with GDB● GNU Make

• Tornado online help:

● All of the Tornado and VxWorks manuals are available in HTMLformat in wind/docs.

● Manuals can be accessed using Help menu on Windows and UNIX.

● Some context-sensitive help is available on Windows hosts using theF1 key.

Page 15: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-15

Other Resources

• Usenet newsgroups covering VxWorks and embedded

programming topics, for example comp.os.vxworks.

• Training courses:

● Tornado Device Driver Workshop

● Tornado BSP Training Workshop

● Tornado Tools Training Workshop

• Technical Support provides help with

● installation problems and media errors

● WRS software, documentation, and service errors

● understanding WRS product functionality

• WindSurf self-help web pages: search engine, FAQ,

patches, document updates, known problems list, ...

• Additional newsgroups of interest include:

● comp.os.realtime - general real-time topics

● comp.arch.bus.vmebus

● comp.arch.embedded

• Technical Support is available if purchased.

● Use the Support menu item within Tornado This helps you fill out aTornado Support Request form, then sends email [email protected].

● In the USA, call 1-800-USA-4WRS. Hours are from 5 A.M. to 5 P.M.Pacific time. Outside of the USA, contact your local WRS office.

• 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.

Page 16: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-16

Getting Started

Components of Tornado

Getting Help

1.3 Hardware / SoftwareConfiguration

Booting

Starting Tornado

WDB Agent

Configuring the target hardware

Configuring the host software

Page 17: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-17

Setting up for Cross-Development

To perform cross-development, you must:

• Set up target hardware.

• Define host environment variables and configure

networking software.

• Start the Tornado registry, wtxregd.

● wtxregd manages a list of target servers. Tools contactthe registry to look up target servers by name.

• Specify target boot parameters and boot target.

• Configure and launch target server.

● Each target server manages host tools’ interactionwith a particular target.

• A typical configuration 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.

Page 18: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-18

Target Hardware Configuration

• VxWorks ROM’s replace the manufacturer’s ROM’s.

• Boards may need to be jumpered. See the online BSPReference entry for your BSP about hardware setup

considerations.

• Of course,

● Static electricity and 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 requiresjumpering the backplane.

• VME:

● If there are empty slots between boards (and the backplane is notjumpered correctly), VMEbus interrupts and arbitration will notwork properly.

● Some boards enable bus arbitration via jumpers. In this case, theboard in the left-most slot must be jumpered differently from theothers.

Page 19: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-19

UNIX: Host Software Configuration

• Set environment variables required by Tornado in your

.cshrc (or .profile) file. The script torvars.csh (or

torvars.sh) may be sourced to set these variables.

• Modify the registry host’s start-up files to start the

registry daemon, wtxregd, when the host boots.

• Configure network access information:

● Obtain target IP addresses

● Assign host names to targets (optional)

● If booting with RSH, list your target’s name in~/.rhosts.

● If necessary, modify routing tables.

• Environment variables which must be set include

● WIND_BASE 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 User’s Guide discusses how toconfigure the environment variables for your host.

• wtxregd is the Wind Registry daemon, which tracks available target

servers and must be running on the host specified 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.

Page 20: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-20

PC: Host Software Configuration

• No environment variables need be set to work withinthe Tornado IDE under Windows. Source torVars.bat touse tools from the command line.

• Registry startup procedure is defined when installingTornado. 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.

• When using Tornado, specify the registry host you wish

to use on the Tools => Options... => Tornado Registrypage.

• Consult Windows 95/98/NT documentation to install

and configure TCP/IP for a PC.

• 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 file:

set WIND_HOST_TYPE=x86-win32set WIND_BASE=D:\TTwoset PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%

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

• The hosts file which you may edit to associate IP addresses with

hostnames is:

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

Page 21: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-21

Getting Started

Components of Tornado

Getting Help

Hardware / SoftwareConfiguration

1.4 Booting

Starting Tornado

WDB Agent

Setting boot parameters

Rebooting

Alternative booting schemes

Page 22: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-22

Boot ROM

• Target’s boot ROM code executes on power up.

• Boot ROM’s 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 thenetwork.

● Starts executing VxWorks.

Page 23: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-23

Boot ConfigurationHost

(Columbia)

Target

90.0.0.131

90.0.0.70

wind/target/config/bspName/vxWorks

RS-232

CPU number

0

boot device

ei

team1%

• Boot parameters are set via a serial link.

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

• Key boot parameters:

● Boot device Network interface to use.

● Host internet address Address of host from which to boot.

● Path of VxWorks image File to transfer over network.

● User name For file access purposes.

● Target internet address Defines the target’s address.

● CPU number Each board in chassis gets a differentnumber. The shared memory master isCPU 0.

Page 24: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-24

At Power-On of Target

• On power-on, the boot ROM’s 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 paramsc - change boot paramsl - load boot fileg adrs - go to adrsd adrs [,n] - display memory...n netif - print network interface device address$dev (0,procnum) host:/file h=# e=# b=# g=# u=usr [pw=passswd] f=#

tn=targetname s=script o=otherBoot flags:

0x02 - load local system symbols0x04 - don’t autoboot0x08 - quick autoboot (no countdown)0x20 - disable login security0x40 - use dhcp to get boot parameters0x80 - use tftp to get boot image0x100 - use proxy arp

available boot devices: ei0 sm

Page 25: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-25

Boot Parameters

[VxWorks Boot]: pboot device : ei

unit number : 0

processor number : 0

host name : wolverine

file name : c:\tornado2\target\config\mv162\vxWorks

inet on ethernet (e) : 147.11.12.204:ffffff00

host inet (h) : 147.11.12.165

user (u) : todd

ftp password (pw) : covert

flags (f) : 0

target name (tn) : t12-204

• Unset boot parameters are not displayed by p:

gateway inet (g)

startup script (s)

other (o)

• Check hardware to determine type of boot device. Some examples:

Manufacturer Boot Device Code

3Com elPciLance lnExcelan exDigital dcIntel ei

• Windows users may use ’/’ instead of ’\’ as a file separator. Unix users

would of course use ‘/’.

• For file access permission (to download the VxWorks system image)

● User name

● For rsh protocol ~/.rhosts (UNIX Host)

● A password must be specified to boot using the FTP protocol.

Page 26: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-26

Changing Boot Parameters

• Type “c” at the boot prompt to change the bootparameters interactively.

• Target boards with NVRAM retain changes after poweris cycled.

• Alternatively, can type boot parameters on a single lineat the boot prompt:

$ei(0,0)wolverine:c:\tornado2\target\config\mv162\vxWorks \

h=147.11.12.165 e=147.11.12.204 u=todd pw=covert tn=t12-204

Keeping this line in a file on the host machine allows cutand paste (in host’s windowing system) for boot.

• Can also make new boot ROM’s with correct default

parameters (see the Reconfiguration chapter).

Page 27: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-27

Booting[VxWorks boot]: @

boot device : eiunit number : 0processor number : 0host name : wolverinefile name : c:\tornado2\target\config\mv162\vxWorksinet on ethernet (e) : 147.11.12.204:ffffff00host inet (h) : 147.11.12.165user (u) : toddftp password (pw) : covertflags (f) : 0x8target name (tn) : t12-204

Attached TCP/IP interface to ei0.Attaching network interface lo0... done.Loading... 424504 + 29664 + 29404Starting at 0x20000...

Attached TCP/IP interface to ei unit 0Attaching network interface lo0... done.NFS client support not included.

VxWorksCopyright 1984-1998 Wind River Systems, Inc.

CPU: Motorola MVME162 VxWorks: 5.4 BSP version: 1.2/0 Creation date: Apr 17 1999 WDB: Ready.

• The numbers following Loading... are the sizes of the VxWorks image’s

text, data, and bss (uninitialized data) segments.

• Debugging hints - If you see...

● The first Attaching network interface without the done, verify thatthe correct network interface is being used. On VME systems withseparate ethernet cards, check that the system controller isconfigured properly and that the ethernet board is properlyjumpered.

● Loading... without the size of the VxWorks image, check the ethernetcable 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, checkthe network driver in the newly loaded VxWorks image.

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

Page 28: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-28

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.

● Typing reboot( ) or CTRL-X generates a warm reboot.

● In a VME environment, typically an abort generatesa warm reboot, while a reset causes a cold reboot forall CPU’s on the bus.

Page 29: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-29

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 file using TFTP.

• Can put VxWorks in ROM. This will be covered in the

Reconfiguration chapter.

• The various booting methods are discussed in the VxWorks NetworkProgrammer’s Guide and the Tornado User’s Guide.

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

SLIP.

• Specify the 0x40 bit in the flags boot parameter to obtain critical boot

parameters via DHCP. Specify 0x80 in flags to boot with TFTP. To do

both, include 0xC0 in flags. Setup of the DHCP server host is also

required; see the Networking chapter and the VxWorks NetworkProgrammer’s 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.

Page 30: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-30

Getting Started

Components of Tornado

Getting Help

Hardware / SoftwareConfiguration

Booting

1.5 Starting Tornado

WDB Agent

Managing a Tornado development session

Page 31: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-31

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. 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.

• We will examine other tools later.

• To customize Tornado’s development environment, add Tcl commands

to the appropriate files in the .wind directory. See the Tornado User’sGuide for details.

Page 32: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-32

UNIX: LauncherMenu Bar

Button Bar

DisplayPanels

Tool SelectIcons

• 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 server’s 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:

● Launch new or saved target servers.● Save target server configurations.● Restart/kill target servers.

• Use Support menu to request Technical Support via email.

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

• Use Info menu to browse relevant Web sites.

• Use Help to access the online hypertext manuals.

Page 33: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-33

PC: Tornado EnvironmentLaunchToolbar

• Use the Tools menu to launch new or saved target servers, and access

Tornado tools.

• Use the Project menu to manage and download project files.

• Use the Build menu to compile projects and track dependencies.

• Use the File and Edit menus to view and modify files.

• 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 configured.

Page 34: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-34

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:

● 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 flexible:

● Minimizes tool’s impact on target.● Tools independent of type of communication link.

• 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 satisfies a tool’s WTX request by:

● manipulating information it has cached.

● sending requests to the WDB agent on the target.

Page 35: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-35

Tornado Architecture

• wtxregd must be started before target server and tools.

• The tools, registry, and target server may run on

different hosts.

VxWorks

WDB AgenttgtsvrTool

Tool

Tool

wtxregd

TargetHost

• The Tornado registry daemon must be running on the host specified by

● the WIND_REGISTRY environment variable (UNIX)

● the Tools => Options... => Tornado Registry page (Windows)

• The target server (tgtsvr) mediates tools’ interactions with the target.

The target server provides:

● communication over Ethernet, serial, NetROM, and customconnections.

● host-resident table of target symbols.● dynamic module loading and unloading.● cache of program text stored in target’s 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

find out how to contact a particular target server.

Page 36: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-36

UNIX:Creating Target Servers (Pt. 1)

Target name/IP Address

TargetServer Name

TargetServer Lock

• To invoke the target server configuration window, click on the Target =>

Create menu item from the Launcher.

• Use the target server configuration window to launch and save target

server configurations.

• To create a target server configuration:

● Enter target’s name in the Target Name field.

● Select desired options.

● Launching the target server will save the configuration.

Page 37: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-37

Creating Target Servers (Pt. 2)

Backend list

Target servercommand line

LaunchButton

• To launch a saved configuration, select it from the Saved Configurations

list and click on Launch .

Page 38: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-38

PC: Managing Target Servers

Target Server Name

Target Server

Target Name /IP Address

Properties

Target ServerCommand LineLaunch Button

• To invoke the Target Server configuration window select Target Server/

Configure from the Tools menu in the Tornado development

environment.

• To create a target server configuration:

● Enter target’s name in the Target Name / IP Address field.

● Select desired options, using the Change Property toolbar.

● Optionally, specify Log File , Timeout and Re-try(Count) fields.

• To launch a configuration, click on Launch, and the configuration will be

saved. To save the configuration 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.

Page 39: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-39

Connecting To Target

• Once the target server is successfully connected to the

target,

● (UNIX) An xterm will appear with connectioninformation (provided the Verbose option wasspecified), or

● (Windows ) A dedicated target server window willdisplay status. Look in taskbar system tray for .

• Now Tornado tools may be started to interact with the

target.

Page 40: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-40

Getting Started

Components of Tornado

Getting Help

Hardware / SoftwareConfiguration

Booting

Starting Tornado

1.6 WDB Agent

Configuring WDB Agent

Page 41: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-41

WDB Agent Configuration

• The WDB Agent acts on the target on behalf of the

target server and Tornado tools:

● Reading or modifying memory.

● Setting or clearing break points.

● Creating, starting, stopping, and deleting tasks.

● Calling functions.

● Gathering system object information.

• Agent is configurable:

● Specify task, external, or dual debug mode.

● Select communication strategy consistent with targetserver back end.

● Set amount of target memory reserved for agent’suse.

• 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, Tornado’s

intrusion on the target is minimized.

• The default configuration 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.

Page 42: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-42

Host - Target Interaction

back end

Tool

tgtsvr

VxWorks

WDB Agent

• 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 configuration gives

the best performance. However, this configuration only provides task-

level 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 configuration is called

external or system mode.

Page 43: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-43

Agent Configuration• In the default VxWorks image, the WDB agent is

defined, 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):

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

• Set WDB communication type. Some example

components are:

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

• Configure the agent’s serial channel (optional) by

setting component parameters.

• Components and parameters are discussed in the Projects chapter.

• The default configuration 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 User’s 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 User’s Guide for details.

Page 44: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-44

Summary

• Tornado’s three components:

● VxWorks real-time operating system

● Networking

● Development tools

• BSP (Board Support Package)

● Located in wind/target/config/bspName● Contains board-specific files

• Host executables are located in wind/host/host-os/bin/.

• Help available:

● Online documentation

● Customer Support and WindSurf

Page 45: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-45

Summary

• Target hardware setup is described in BSP

documentation.

• Host environment.

● Set environment variables for UNIX or command-line use.

● Configure network facilities: IP addresses andhostnames.

• Critical boot parameters:

● boot device● VxWorks pathname● host internet address● target internet address● user name● processor number

Page 46: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-46

Summary

• Use control panel to manage a Tornado development

session:

● Create, restart, and kill target servers.

● Start Tornado tools like WindSh, Browser, etc..

• Invoke a target server for each target.

• Target server manages:

● Target resources used by host tools.

● Target information.

● Communication with target.

● Tool-target interactions.

Page 47: Getting Started - read.pudn.comread.pudn.com/.../windows/1993802/Vvxworks_docx/01Getting_Start… · Small and configurable (micro-kernel architecture) ... patches, document updates,

Wind River SystemsTornado Training Workshop © Copyright Wind River Systems 1-47

Summary

• Configure WDB Agent:

● Debug mode

● Communication strategy