Getting Started with Tornado – ECEN 5623

Dan Walkes

Spring 2005

 

Starting Tornado:

            Start with Start->Programs->Tornado 2.0.2->Tornado (** Note ** Don’t use Tornado 2.2 until instructed otherwhise ***)

 

Create a New Project:

 

Select the “New” tab in the Dialog that comes up and select “Create a downloadable application modules for VxWorks”

 

 

 

 

 

Specify a name for the project, and start a workspace.  The above locations are recommended, you may use any you like. 

 

For future lab assignments, you can add them to the workspace you are creating in the “Workspace” box.

 

 

Select a toolchain for your project.

 

If you are using the simulator, you need to select the SIMNTgnu toolchain.  To create a project that will be dowloadable to a target, you need to select the PENTIUMgnu toolchain here instead. See Using the Lab for more information about setting up a project for the lab targets instead of the simulator.

 

Select “Finish” at the next dialog to complete the Project setup.

 

 

Adding Files to the Project:

 

            Download “twotasks.c” (or any other code file) from:

            http://ece.colorado.edu/~siewerts/ecen/ex/ecen5623/ECEN4623_Src/

            And save the files to the “Location” specified in the “Create Downloadable Application Modules for VxWorks: step1” dialog shown above.

 

Note:  The above folders are recommendations, you may use any directories and names you like.  Using this format, you could add a new directory for each lab in the “Assign” directory and add this to your LabAssignments.wsp workspace.  That way you can browse all previous lab code when working on future labs very easily.

 

IMPORTANT!!!!!  - note that Tornado 2.0 cannot use directory names which include a space character

 

 

 

 

With the “File” tab selected, right-click on “*YOURPROJECTNAMEHERE* Files” tree item and select “Add Files.”  Add the source file you just downloaded to your project.

 

 

Building The Project

 

            Select Build->Build to build the project.

 

Downloading to the Simulator or to a Target

 

            Right click on the “*YOURPROJECTNAMEHERE* Files” tree item and select “Download *YOURPROJECTNAMEHERE*.out”  If you setup your project to use the simulator, a dialog box pops up stating “No simulator is currently running.  Start simulator?”  Select Yes.  Select “Standard simulator” and select “OK” to start.  Press OK again if necessary to start the target server.

If you are using the Target, follow the instructions in the Using the Lab page to download your code to the target.

 

Opening a windshell prompt

 

Now notice that the target server should be listed in the drop-down box at the top left of the screen (in the case, below, the target server is vxsim@d1656.   Use the ->i  button to open a windshell on this target.

 

To connect to a target, you will select the desired target you would like to connect to in this drop down menu (see Using the Lab

 

 

 

 

 

To execute your code, simply type the name of the function you would like to run at the windshell prompt, or use the sp VxWorks function to spawn the task.  BE CAREFUL ABOUT HOW YOU START YOUR PROGRAM.  If you execute your program from the command line (simply by typing the name of your program) the shell will halt until your function exits.  If your function has a delay, this may stall the shell.  A better way to start a task is to use the “sp” command, or typing:

-> sp MyFunctionName

 

Alternatively, you can look at using the “task_spawn” command to spawn the task at a specified priority.

 

For more information about VxWorks functions, see Help->Manuals Index and use the “Index” tab to search by function name.

 

Help->Manuals Contents is a html list of all VxWorks Manuals.  You will find this very useful as well.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Starting Windview

           

            You will use Windview for timing related analysis.  The Windview button is denoted by the arrow and circle in the above screenshot.  After choosing the Windview trace, Make sure to select “Additional Instrumentation” in the drop down box under “Base Events” as shown in the screenshot.

 

The Green “GO” button can be used to start the windview capture

The Red “STOP” button can be used to stop the windview capture.

 

The button that has a bullseye and arrow pointing outward can be used to upload the windview data after the target stops.

 

Note:  For lab submission, please use Cntrl->PrintScreen to capture the windview screenshot and paste into your word document for submission.

You may need to run the simulation for a while before you actually see the two tasks execution (not in a delay state).  Use the “i” command to figure out when these tasks execute, and start your Windview trace just before it.  Zoom in and annotate the section of Windview trace which includes both tasks execution.  Include this portion in your lab report.

 

 

For More Information:

            See “TguideWin.pdf” and getStartWin.pdf at     http://ece.colorado.edu/~siewerts/wrsman/

 

            A step by step tutorial very similar to this may be found in “getStartWin.pdf”