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 2007-03-20: 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
- Assume your Tornado project directory is C:\sofeng\proj\Project0
- Open eclipse.exe and open the C/C++ perspective
- From the "File" menu, select "New" -> "Standard Make C Project"
- Enter the project name and the workspace location; click "Next" NOTE: Make sure these paths do not contain spaces. (e.g. "Documents and Settings")
- 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.
- 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.
Steps for using the Vxworks simulator and shell in EclipseThese 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.
- 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 vxsimSave the file as "c:\sofeng\vxsim.sh".
- In Eclipse, from the "Run" menu, select "External Tools" > "External Tools..."
- Click on "Program", then press the 'New' button. (It is the button in the top left with a plus sign.)
- In the "Name:" field, type "vxsim_tool"
- In the "Location:" field, enter "c:\tornado2.2\host\x86-win32\bin\sh.exe"
- In the "Working Directory:" field, type whatever you want your working directory to be, e.g. "c:\"
- In the "Arguments:" box, enter "c:\sofeng\vxsim.sh"
- 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.
- Click "Apply" and "Close".
- Now to run it, go to the "Run" menu > "External Tools" > "vxsim_tool". (Or use the "External Tools" button on the toolbar.)
- 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.
- To download your application, see How to download a Vxworks application from the command line
How to run the VxWorks Simulator from the command line
Tornado Tools Command Line Summary
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
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 ...).
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: http://www.windriver.com/whitepapers/VxWorks-5_Support_Workbench_2-5_wp.pdf
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.
Thanks for your comments. Unfortunately, I don't have any experience with win64 (or much with ULIP either).
Hi Sofeng, Thanks for providing some very useful information about eclipse. I have a basic question for you. Can you tell me what tools do i need to compile and run an application on Vxworks board if i dont have wind-river workbench installed on my machine. I have eclipse available with me. -Jason
I downloaded Eclipse version 3.4.2. I cannot match your steps here to the current IDE. Will it be possible to get the steps above match the latest Eclipse version?
I'm sorry, I've switched jobs and no longer use VxWorks/Tornado or Eclipse. (If you have questions about Python or Emacs, fire away ;)
Thanks man, your post just save my life !!!:)
Eliot, Good job with paving the way for us!
Rafael, I don't have the Eclipse version as Eliot either. I have Eclipse Helios Service Release 1. However, I think I am on the right track.
1) Create an empty project for C/C++. 2) Import your project(File > Import) 3) RightClick on your project name select Properties. 4) On the left handside, you should see C/C++ Build. Select the item, you should be able to uncheck "Use default build command" and put in "make". 5) After expanding the C/C++ Build, you should see an item called "Environment". Add the environment as Eliot explained then select "Append variables to native environment" at the bottom. Then hit Apply.
Unfortunately, I am still not able to build yet but I believe I am on the right track. Hopefully, these instruction is far enough for Eliot to come in and help :). Good job Eliot!
Hello Eliot I am interested in learning VxWorks and I am looking for a project which can help me to understand and implement VxWorks ...Please let me know where I can find one ...i have tried searching on the Internet but can't find one ....Thanks and regards