1_getstart2.pdf

Embed Size (px)

Citation preview

  • 7/29/2019 1_getstart2.pdf

    1/47

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

    Chapter

    1Getting Started

    Components of Tornado

    Getting Help

    Hardware / Software ConfigurationBooting

    Starting Tornado

    DB Agent

  • 7/29/2019 1_getstart2.pdf

    2/47

    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

    hat is Tornado?

    hat is VxWorks?

    How are Tornado and VxWorks used?hat is provided with Tornado?

    here are files located?

  • 7/29/2019 1_getstart2.pdf

    3/47

    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.

    ajor 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

    Interprocessor communicationq Remote file accessq Remote command/function executionq Booting across network

  • 7/29/2019 1_getstart2.pdf

    4/47

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

    Development Tools

    Tornado Development Tools:

    q Launch - Launch Tornado toolsq WindSh - Access target interactivelyq CrossWind - Source-level debuggerq Browser - Display system informationq Project Facility - Configure applications or VxWorksq WindView - Analyze multitasking applicationq Simulator - Simulate VxWorks target on host OS

    Tools are customizable with Tcl:

    q Add new functionalityq Customize user interfaceq some target-resident tools are available.

    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 add user-defined commands.q 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.

  • 7/29/2019 1_getstart2.pdf

    5/47

    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:

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

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

    Differences from a non-real-time OS:

    q Preemptive priority based schedulingq Fastq Small and configurable (micro-kernel architecture)

  • 7/29/2019 1_getstart2.pdf

    6/47

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

  • 7/29/2019 1_getstart2.pdf

    7/47

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

    Cross-development Cycle

    Typical Tornado development configuration

    TargetHost

    RS-232

    ethernet

    VxWorksTornado

    Coding and builds done on the host using proven tools:

    q Editingq Compiling/assembling/linking, within the project facility or from

    the command line.q Tracking source code (ClearCase, PVCS, Visual Source Safe, ...)

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

    q Loadingq Executionq Source level debuggingq 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.

  • 7/29/2019 1_getstart2.pdf

    8/47

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

    Tornado Delivery

    Boot ROMs for supported boards

    q Board specificq Use network to download VxWorks from hostq Turnkey for standard boards

    CD-ROM for product components

    q Tornado tools, which run on the hostq The VxWorks OS, which runs on the targetq Wind River Supplied BSPs

    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.

  • 7/29/2019 1_getstart2.pdf

    9/47

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

    Portability

    HSP

    Generic

    VxWorks

    Arch

    BSP

    WDB

    Agent

    Most of VxWorks is machine independent. The machine-dependent

    portions of VxWorks are:

    q Architecture specific (e.g., MC680X0, PPC, i960, x86, ARM).q Board specific (e.g., hardware initialization, VMEbus interface,

    clock/timer functions).q 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.

  • 7/29/2019 1_getstart2.pdf

    10/47

    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.

  • 7/29/2019 1_getstart2.pdf

    11/47

    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 hosts hardware and operating

    system. Valid types are:

    x86-win32 All Windows hosts

    sun4-solaris2 Solaris hosts

    parisc-hpux10 HP-UX hosts

  • 7/29/2019 1_getstart2.pdf

    12/47

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

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

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

    memPartLib malloc stdlib.h

    semLib semTake semLib.h

    sysLib sysHwInit sysLib.h

  • 7/29/2019 1_getstart2.pdf

    13/47

    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

    anuals.

    Online information.

    sers group.echnical Support.

    indSurf

  • 7/29/2019 1_getstart2.pdf

    14/47

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

    Overview

    There are several classes of help resources:

    Manuals on host tools:

    q

    Tornado Users Guideq GNU ToolKit Users Guideq WindView Users Guide

    Manuals on VxWorks OS:

    q VxWorks Programmers Guideq VxWorks Network Programmers Guideq VxWorks Reference Manualq BSP Reference (HTML)

    Tornado Online HTML Manuals

    Technical Support (if purchased)

    Other manuals include:

    q Wind River Products Installation Guide.q Customer Support Users Guideq Tornado Release Notes.q Tornado API Guide.q Debugging with GDBq GNU Make

    Tornado online help:

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

    q Manuals can be accessed using Help menu on Windows and UNIX.q Some context-sensitive help is available on Windows hosts using the

    F1 key.

  • 7/29/2019 1_getstart2.pdf

    15/47

    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:

    q Tornado Device Driver Workshopq Tornado BSP Training Workshopq Tornado Tools Training Workshop

    Technical Support provides help with

    q

    installation problems and media errorsq WRS software, documentation, and service errorsq understanding WRS product functionality

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

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

    Additional newsgroups of interest include:

    q comp.os.realtime - general real-time topicsq comp.arch.bus.vmebusq comp.arch.embedded

    Technical Support is available if purchased.

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

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

  • 7/29/2019 1_getstart2.pdf

    16/47

    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

  • 7/29/2019 1_getstart2.pdf

    17/47

    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.

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

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

  • 7/29/2019 1_getstart2.pdf

    18/47

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

    Target Hardware Configuration

    VxWorks ROMs replace the manufacturers ROMs.

    Boards may need to be jumpered. See the online BSP

    Reference entry for your BSP about hardware setupconsiderations.

    Of course,

    q Static electricity and overheating can damage boards.q Connectors must be firmly in place (serial cables,

    ethernet cables, VME, etc.). VME specific:

    q System controller in slot 0 (left-most slot).q Having empty slots between boards requires

    jumpering the backplane.

    VME:

    q If there are empty slots between boards (and the backplane is notjumpered correctly), VMEbus interrupts and arbitration will not

    work properly.q Some boards enable bus arbitration via jumpers. In this case, the

    board in the left-most slot must be jumpered differently from theothers.

  • 7/29/2019 1_getstart2.pdf

    19/47

    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 hosts start-up files to start the

    registry daemon, wtxregd, when the host boots.

    Configure network access information:

    q Obtain target IP addressesq Assign host names to targets (optional)q If booting with RSH, list your targets name in

    ~/.rhosts.q If necessary, modify routing tables.

    Environment variables which must be set include

    q WIND_BASE Tornado installation directoryq WIND_REGISTRY host where registry daemon runs

    q WIND_HOST_TYPE sun4-solaris2 or parisc-hpux10q PATH $WIND_BASE/host/$WIND_HOST_TYPE/bin:...q 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 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.

  • 7/29/2019 1_getstart2.pdf

    20/47

    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 installedq in the Startup folder for Windows 95, 98 or NT 4.0.q 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:\TTwo

    set 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 withhostnames is:

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

  • 7/29/2019 1_getstart2.pdf

    21/47

    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

    lternative booting schemes

  • 7/29/2019 1_getstart2.pdf

    22/47

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

    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 Allows setting of boot parameters.q Downloads VxWorks into target memory via the

    network.q Starts executing VxWorks.

  • 7/29/2019 1_getstart2.pdf

    23/47

    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:q Boot device Network interface to use.q Host internet address Address of host from which to boot.q Path of VxWorks image File to transfer over network.q User name For file access purposes.q Target internet address Defines the targets address.

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

  • 7/29/2019 1_getstart2.pdf

    24/47

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

    At Power-On of Target

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

    One may type h at the boot prompt to see a list of commands.VxWorks Boot]: h

    - Print this list@ - boot (load and go)

    - print boot params - change boot params

    - load boot file adrs - go to adrs

    adrs [,n] - display memory.

    netif - print network interface device addressdev (0,procnum) host:/file h=# e=# b=# g=# u=usr [pw=passswd] f=#tn=targetname s=script o=other

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

    vailable boot devices: ei0 sm

  • 7/29/2019 1_getstart2.pdf

    25/47

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

    Boot Parameters

    [VxWorks Boot]: pboot device : eiunit number : 0

    processor 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) : 0target 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)

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

  • 7/29/2019 1_getstart2.pdf

    26/47

    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 hosts windowing system) for boot.

    Can also make new boot ROMs with correct default

    parameters (see the Reconfiguration chapter).

  • 7/29/2019 1_getstart2.pdf

    27/47

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

    Booting[VxWorks boot]: @

    boot 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.165user (u) : todd

    ftp password (pw) : covert

    flags (f) : 0x8

    target name (tn) : 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: 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 images

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

    Debugging hints - If you see...

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

    q Loading... without the size of the VxWorks image, check the ethernetcable and connection.

    q The Starting at with no further indication that VxWorks is running,verify that the VxWorks image is valid.

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

  • 7/29/2019 1_getstart2.pdf

    28/47

    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.

    q Typing reboot( ) or CTRL-X generates a warm reboot.q In a VME environment, typically an abort generates

    a warm reboot, while a reset causes a cold reboot forall CPUs on the bus.

  • 7/29/2019 1_getstart2.pdf

    29/47

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

    Alternative Booting Schemes

    The shared memory networkallows 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 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 theflags boot parameter to obtain critical boot

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

    both, include 0xC0 inflags. 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.

  • 7/29/2019 1_getstart2.pdf

    30/47

    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

    anaging a Tornado development session

  • 7/29/2019 1_getstart2.pdf

    31/47

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

    Accessing Tools

    Use a control panel to manage your Tornado session:

    q Create and manage target servers.q Start Tornado tools.q Invoke online manuals.q File requests for Technical Support.q 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 Tornados development environment, add Tcl commands

    to the appropriate files in the .wind directory. See the Tornado Users

    Guide for details.

  • 7/29/2019 1_getstart2.pdf

    32/47

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

    UNIX: Launcher

    Menu 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 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 Launch new or saved target servers.q Save target server configurations.q

    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.

  • 7/29/2019 1_getstart2.pdf

    33/47

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

    PC: Tornado Environment

    LaunchToolbar

    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.

  • 7/29/2019 1_getstart2.pdf

    34/47

    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 oftarget resources needed by development tools:

    q Communication with debug agent on target.q Dynamic module loading and unloading.q Host-resident symbol table for target.q Allocation of memory on target for host tools.

    q Cache of target program text segment memory.q Virtual I/O facilities.

    This scheme is flexible:

    q Minimizes tools impact on target.q 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 tools WTX request by:

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

  • 7/29/2019 1_getstart2.pdf

    35/47

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

    VxWorks

    WDB AgenttgtsvrTool

    Tool

    Tool

    wtxregd

    TargetHost

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

    q the WIND_REGISTRY environment variable (UNIX)q the Tools => Options... => Tornado Registry page (Windows)

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

    The target server provides:q communication over Ethernet, serial, NetROM, and custom

    connections.q host-resident table of target symbols.q dynamic module loading and unloading.q cache of program text stored in targets RAM.q 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.

  • 7/29/2019 1_getstart2.pdf

    36/47

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

    UNIX:Creating Target Servers (Pt. 1)

    Target name/IP Address

    TargetServer Name

    Target

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

    q Enter targets name in the Target Name field.q Select desired options.q Launching the target server will save the configuration.

  • 7/29/2019 1_getstart2.pdf

    37/47

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

    Creating Target Servers (Pt. 2)

    Backend list

    Target server

    command line

    LaunchButton

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

    list and click on Launch.

  • 7/29/2019 1_getstart2.pdf

    38/47

    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 Line

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

    q Enter targets name in the Target Name / IP Address field.q Select desired options, using the Change Property toolbar.q 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.

  • 7/29/2019 1_getstart2.pdf

    39/47

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

    Connecting To Target

    Once the target server is successfully connected to the

    target,

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

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

  • 7/29/2019 1_getstart2.pdf

    40/47

    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

  • 7/29/2019 1_getstart2.pdf

    41/47

    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:

    q Reading or modifying memory.q Setting or clearing break points.q Creating, starting, stopping, and deleting tasks.q Calling functions.q Gathering system object information.

    Agent is configurable:

    q Specify task, external, or dual debug mode.q Select communication strategy consistent with target

    server back end.q Set amount of target memory reserved for agents

    use.

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

  • 7/29/2019 1_getstart2.pdf

    42/47

    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 taskor internal mode.

    Because the WDB agent does not depend on VxWorks, it is possible toperform 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.

  • 7/29/2019 1_getstart2.pdf

    43/47

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

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

    Set WDB communication type. Some example

    components are:q .../select WDB connection/WDB END driver connectionq .../select WDB connection/WDB serial connection

    Configure the agents 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 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 passcontrol 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.

  • 7/29/2019 1_getstart2.pdf

    44/47

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

    Summary

    Tornados three components:

    q VxWorks real-time operating systemq Networkingq Development tools

    BSP (Board Support Package)

    q Located in wind/target/config/bspNameq Contains board-specific files

    Host executables are located inwind/host/

    host-os/bin/.

    Help available:

    q Online documentationq Customer Support and WindSurf

  • 7/29/2019 1_getstart2.pdf

    45/47

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

    Summary

    Target hardware setup is described in BSP

    documentation.

    Host environment.

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

    q Configure network facilities: IP addresses andhostnames.

    Critical boot parameters:q boot deviceq VxWorks pathnameq host internet addressq target internet addressq user nameq processor number

  • 7/29/2019 1_getstart2.pdf

    46/47

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

    Summary

    Use control panel to manage a Tornado development

    session:

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

    Invoke a target server for each target.

    Target server manages:

    q Target resources used by host tools.q

    Target information.q Communication with target.q Tool-target interactions.

  • 7/29/2019 1_getstart2.pdf

    47/47

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

    Summary

    Configure WDB Agent:

    q Debug modeq Communication strategy