This document gives some general lab usage tips about how to use Tornado and VxWorks to connect to our lab targets
The lab currently consists of targets named rtesp1 through rtespXX, which are located on lab benches. The name of the target is shown by a label on the power supply. All of these targets are Intel Pentium motherboards of various speeds with a power supply, floppy drive, network card, and video card.
On each target board, there exists one or more switches connected directly to the motherboard. These switches can be used to either reset and/or turn on power to the target. Motherboards with two switches use an ATX type power supply, which needs to be switched on/off via the motherboard. Motherboards with only one switch utilize an AT type power supply, and have a seperate power on/off switch connected to the power supply itself.
To power up a lab target, first make sure that the power supply switch is on (side with a line (-) should be depressed.) Next, either press the power button connected to the power supply or press the button connected to the motherboard that is labeled "Power" (depending on power supply type.)
Typically, the only reason to power on/off a target would be to swap out peripheral components such as PCI cards. You may leave targets running when you are finished using them.
To reset a target, press the button connected to the motherboard which is labeled "Reset." It is a good idea to reset targets before you begin working with them. (Note: reset may also be accomplished by using the "reboot" command at the Windshell prompt.
Other Lab Equipment:
In addition to targets, you will notice monitors and small boxes near them called KVM or Keyboard Video Monitor switches.
A KVM Switch
These monitors are used to display the information shown on the targets. You will use these monitors to view the output of your printf() or logMsg() functions. Note that it is not necessary to have a monitor connected when using the target.
The KVM switch's have numbers listed on the top or front which correspond to the currently connected target. An LED shows the current connected target next to the number. In addition, each is labeled with the rtespX target name which corresponds to the number on the KVM switch. To display the monitor output for your particular target, make sure the LED next to the desired target name is illuminated.
Tornado VxWorks Tools Interface:
To connect to the targets, first open Tornado (Start->Programs->Tornado 2.0.2->Tornado)
The first time you open Tornado, you may need to set it to start a registry server on your local machine (if it has not already been started.) If your Tornado registry has been started, you will see an icon like this in the bottom right corner of your screen:"
The Tornado Registry Icon
You need to make sure that your tools are using your local registry server. To do this, go to Tools->Options and scroll to the "Tornado Registry" tab. If "Local registry" is not selected, select it, close and re-start Tornado.
You will also need to start a tornado server on your target in order to connect to a specific target. In order to do this, use connect2tgt.bat which I have written to automate this process. Download to the Z:\ root directory on your machine and click to start (next time you do not need to re-download, just run from your local directory.) The program will ask you which target you would like to start. Enter the target number (enter number 1 to XX for rtesp1 - rtespXX respectively) and press enter. After the program finishes, you should see that a target server has been started on your computer
The Target Server Icon
If you would like to start a server for another target, use connect2tgt.bat again with a new target number. Please connect only to the target at your desk, or a target you are reasonably certain no one else is using (if there are more people in the lab, ask to make sure no one is using the target.) If two people are connected to the same target, problems may occur that would be difficult to debug.
Next- open an existing project or create a new project. When prompted, select "Create Downloadable Application Modules for VxWorks"
At the next dialog, specify the project name and location and if you would like to create a new workspace or add to an existing workspace. It may be nice to use the same workspace for all of your labs during the semester, so you can easily reference previous lab code.
At the next dialog, select the "PENTIUMgnu" toolchain. This will set the compiler to generate code specific to the Pentium targets.
Select "Finish" to finish setting up the project. Right click on the Projcet name in the workspace view to add the .c files for your project.
When you are ready to compile, select Build->Compile. When you have no compile errors and were able to build successfully, you are now ready to download your code to the target.
The first step is to select your desired target from the target drop-down menu. The drop down menu is shown by the graphic below. All of the targets you have started using the connect2tgt.bat file should be listed in this drop down box.
Select the target you would like to connect to by highlighting it in the drop down menu.
Click on the ->i button to open a windshell on this target.
Before using the shell, please be sure to read the following:
Chapter 6 - Shell from the Tornado Users Guide
To reference specific VxWorks functions, search for the function in the VxWorksReferenceManual
After building your file for the target (ie PENTIUMgnu) the easiest way to download to the target is to make sure the target is selected in the drop down box, right click on the Project name in the Workspace window and click on "Download **YOURPROJECTNAMEHERE**.out." You may also use Project->Download and select the desired .out file from the file browser.
You may then use functions such as sp or taskSpawn to start and debug your task (or call directly from the shell using the task name.) In either of these scenarios, pay attention to the priority at which your task is spawned, it may effect operation of the shell or of your task
Hopefully these notes should get you started on the right path. If you have any questions, please e-mail me.