How to use Tornado GNU tools with Eclipse 3.2 / CDT 3.1
来源:互联网 发布:维普数据库免费账号 编辑:程序博客网 时间:2024/06/06 23:19
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 toolsinside Eclipse/CDT as a Standard Make project. I believe the key was setting upthe environment variables correctly. (I used the method inthis previous post to determine the Tornado environment.)This approach still uses the Tornado project (.wpj) file and TCL scripts, soyou need to start with an existing Tornado project. You will then copy theTornado files into your Eclipse directory. This still beats editing in Eclipseand building in Tornado. Now I am able to edit and build in Eclipse. Note: thiswill work with both a downloadable or a bootable project.
Update 2007-03-20: I now can start a Vxworks simulator, target server, andshell as an external tool in Eclipse. I've added those steps at the end of thisguide.
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.
- 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.
- Set the following environment variables using the "New..." button:
- Click the "Discovery Options" tab. Uncheck the "Automate discovery of paths and symbols" checkbox.
- Click "Finish"
- In the "C/C++ Projects" Window, right-click on your project and select "Import..."
- Under "General", select "File System". Click "Next"
- In the "From directory:" box, enter "C:\sofeng\proj\Project0"
- Select all the files including "Makefile" and "Project0.wpj". You do not need to select "SIMNTgnu"
- Select the "Create selected folders only" option
- Click "Finish"
- Your project should start building
Steps for using the Vxworks simulator and shell inEclipse
These steps explain how to setup an "ExternalTool" in Eclipse to run a unix shell script. The shell script will run thecommands to start the vxworks simulator, start the target server, and run theshell. Luckily you don't need any unix tools because the Tornado distributionalready includes it. With this addition, now you can build your vxworks projectwith the method above and now start a vxworks simulator to download and runyour 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.)
2. c:/Tornado2.2/target/config/simpc/vxworks&
3. c:/tornado2.2/host/x86-win32/bin/tgtsvr-V -B wdbpipe -R c:/temp \
4. -RW -cc:/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\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
原文出处:http://www.saltycrane.com/blog/2007/02/how-to-use-tornado-gnu-tools-with/
阿科
2012年12月27日于北京邮电大学新科研楼302室
- How to use Tornado GNU tools with Eclipse 3.2 / CDT 3.1
- How to config Eclipse CDT with pthread
- How to use Mantis with Eclipse
- How to Install and Use JRebel with WebLogic and Eclipse
- How to use Bootstrap Manifest Generator tools
- Know How to Use Command-line Tools
- Know How to Use Command-Line Tools
- How to use gnu readline to implement "reset password".
- How to use bitBucket with EGit in Eclipse,如何在Eclipse中使用bitbucket远程仓库
- How to Do Everything with Google Tools
- How To Use Linux epoll with Python
- How to use Trace2UML together with Doxygen
- How To Use Linux epoll with Python
- How to use Blocks with iOS
- how to use linux epoll with c
- How to use Django with uWSGI
- How to use passwords securely with wget
- How To Use Linux epoll with Python
- Android 应用程序内切换语言
- iphone里读取BG2312编码文件或者二进制流
- 二叉排序树
- android 自定义listview无法响应点击事件OnItemClickListener
- windows server 2003 svn 服务器安装及配置(无Apache)
- How to use Tornado GNU tools with Eclipse 3.2 / CDT 3.1
- adb shell dumpsys 命令——打印当前系统信息
- zend studio 破解
- POJ1013 Counterfeit Dollar 解题报告
- 快速排序&半快速排序思想求n个无序数中第k或者前k个数
- Spring Test 整合 JUnit 4 使用总结
- __attribute__((packed))详解
- zigbee:tools->f8wEndev.cfg f8wRouter.cfg
- Maven 使用