How to use Tornado GNU tools with Eclipse/CDT

This is my OLD blog. I've copied this post over to my NEW blog at:

You should be redirected in 2 seconds.

Configuration: VxWorks 5.5, Tornado 2.2, GNU toolchain, simulator target, Eclipse 3.2, CDT 3.1, Windows XP.

I've finally figured out how to use the Tornado GNU tools inside Eclipse/CDT as a Standard Make project. I believe the key was setting up the environment variables correctly. (I used the method in this previous post to determine the Tornado environment.) This approach still uses the Tornado project (.wpj) file and TCL scripts, so you need to start with an existing Tornado project. You will then copy the Tornado files into your Eclipse directory. This still beats editing in Eclipse and building in Tornado. Now I am able to edit and build in Eclipse. Note: this will work with both a downloadable or a bootable project.

Update 3/20/07: I now can start a Vxworks simulator, target server, and shell as an external tool in Eclipse. I've added those steps at the end of this guide.

Steps for building your project in Eclipse

  1. Assume your Tornado project directory is C:\sofeng\proj\Project0
  2. Open eclipse.exe and open the C/C++ perspective
  3. From the "File" menu, select "New" -> "Standard Make C Project"
  4. Enter the project name and the workspace location; click "Next" NOTE: Make sure these paths do not contain spaces. (e.g. "Documents and Settings")
  5. Click the "Make Builder" tab.
    • Uncheck "Use default" checkbox. In the "Build command:" textbox, enter "make"
    • Check the "Build on resource save (Auto Build)" checkbox. Delete the text "all" in the textbox. Delete the text "all" from the next textbox also.
  6. Click the "Environment" tab
    • Set the following environment variables using the "New..." button:
      • Path = C:\Tornado2.2\host\x86-win32\bin;
      • SHELL = C:\WINDOWS\system32\cmd.exe
      • TCL_LIBRARY = C:\Tornado2.2\host\resource\tcl
      • WIND_BASE = C:\Tornado2.2
      • WIND_HOST_TYPE = x86-win32
    • Select the "Append environment to native environment" option.
  7. Click the "Discovery Options" tab. Uncheck the "Automate discovery of paths and symbols" checkbox.
  8. Click "Finish"
  9. In the "C/C++ Projects" Window, right-click on your project and select "Import..."
  10. Under "General", select "File System". Click "Next"
  11. In the "From directory:" box, enter "C:\sofeng\proj\Project0"
  12. Select all the files including "Makefile" and "Project0.wpj". You do not need to select "SIMNTgnu"
  13. Select the "Create selected folders only" option
  14. Click "Finish"
  15. Your project should start building

Steps for using the Vxworks simulator and shell in Eclipse

These steps explain how to setup an "External Tool" in Eclipse to run a unix shell script. The shell script will run the commands to start the vxworks simulator, start the target server, and run the shell. Luckily you don't need any unix tools because the Tornado distribution already includes it. With this addition, now you can build your vxworks project with the method above and now start a vxworks simulator to download and run your project.
  1. Create a new text file and enter the following text. The ampersand's makes the process run in the background allowing the tools to run simultaneously. (Note the use of forward slashes is significant.)
    c:/Tornado2.2/target/config/simpc/vxworks &
    c:/tornado2.2/host/x86-win32/bin/tgtsvr -V -B wdbpipe -R c:/temp \
    -RW -c c:/Tornado2.2/target/config/simpc/vxWorks.exe vxsim &
    C:/Tornado2.2/host/x86-win32/bin/windsh.exe -q vxsim
    Save the file as "c:\sofeng\".
  2. In Eclipse, from the "Run" menu, select "External Tools" > "External Tools..."
  3. Click on "Program", then press the 'New' button. (It is the button in the top left with a plus sign.)
  4. In the "Name:" field, type "vxsim_tool"
  5. In the "Location:" field, enter "c:\tornado2.2\host\x86-win32\bin\sh.exe"
  6. In the "Working Directory:" field, type whatever you want your working directory to be, e.g. "c:\"
  7. In the "Arguments:" box, enter "c:\sofeng\"
  8. Click on the "Common" tab. Inside the "Display in favorites menu" box, check the "ExternalTools" checkbox. Also, make sure the "Allocate Console (necessary for input)" checkbox is checked.
  9. Click "Apply" and "Close".
  10. Now to run it, go to the "Run" menu > "External Tools" > "vxsim_tool". (Or use the "External Tools" button on the toolbar.)
  11. Your simulator should now start, the target server icon should appear in the system tray, and the Shell should appear as a "Console" window in Eclipse.
  12. To download your application, see How to download a Vxworks application from the command line
Related posts:
How to run the VxWorks Simulator from the command line
Tornado Tools Command Line Summary
Technorati tags: , ,


sofeng said...


Nice article !

Could you mention though where (whether) actually the project files
were copied to (under Eclipse) ... or actually the build really took
place in your original project directory (that is in
C:\sofeng\proj\Project0) ?

Also I wonder if you have installed WindRiver's WorkBench 2.x (latest
is 2.6) IDE (which is Eclipse's based) ? - I have ... .
WindRiver's WorkBench 2.x IDE is designed by WindRiver for *new*
memory-protected vxWorks 6.x and WorkBench 2.x comes with better
compiler ... WorkBench 2.x also allows to import/build VxWorks 5.5.1
/Tornado 2.2 project in a similar fashion as you described it (using
Tornado 2.2 gnu tool chain ... but in the original proj directory under
Tornado installation tree) - it would be nice though to see whether
newer compiler supplied with WorkBench 2.x could be used for building
VxWorks 5.5.1 /Tornado 2.2 project as well (WindRiver is not
interested in providing instructions for such option - they want
VxWorks 5.5.1 /Tornado 2.2 users to migrate to vxWorks 6.x instead ...).


Hi Alex,
To answer you first question, I copied my files from the original project directory to a new directory to be used with Eclipse. It may work to leave the files in the original location, but I have not tried it.

I do not have WindRiver's Workbench. I wish I did. Since I don't have Workbench, that is why I am using Eclipse with Tornado. I think Workbench 2.5 and later has limited support for VxWorks 5.5 (which includes building your project). So if you have Workbench 2.5 or later, I would use it instead of my method. Here is a Wind River .pdf article you may or may not have seen:

Anonymous said...

Hola Sofeng,

First of all, I would like to congrats you for your site. It has been very useful for me and I am sure for many others too! I really thank you for all the hard work.

I wonder if you could help please. I am using Tornado2.2 on a PC win64. And I am no able to install ULIP :-( When I follow the procedure to install it it pups a window telling I should "Verify that the driver has been design for WINDOWS based on x64". Any ideas on what I should do? Thanks in advance.

Kindly regards,

sofeng said...

Hi Hector,
Thanks for your comments. Unfortunately, I don't have any experience with win64 (or much with ULIP either).


This is my *OLD* blog. I've copied all of my posts and comments over to my NEW blog at:

Please go there for my updated posts. I will leave this blog up for a short time, but eventually plan to delete it. Thanks for reading.