[CRUSH-code] setting up for development with Eclipse
Bill Bennett
bill at wizardofaz.net
Wed Nov 16 08:43:34 MST 2005
Hi programming people.
Here is a somewhat terse list of instructions on how to set up to use Eclipse for robot code development. Other than providing a development environment that's better than MPLAB (while losing the simulation tools we never used anyway), it also provides built-in support for shared development though CVS. We're using the sourceforge cvs server for this purpose, so anybody can view, and authorized people can edit, our code from any computer. Gives us some backup and change management too.
At Jason's suggestion, I tried to make this easier by installing all the pieces the conventional way, then creating a zip file of everything in it's installed place. These tools don't depend on Windoze registry values, or dll files installed in system places, so this technique works out fine. If you already have any of the tools (eclipse, mcc18, a java toolkit, or mingw) installing this way will either replace or give you a duplicate, depending on where you installed them before. If you want to avoid this, uninstall your existing copies first. The one exception is the IFI_Loader, which does install some system files. So, if you want to be able to download to the RC from your computer you have to install that tool separately. Generally at home this is of no value.
If you will want to change code and save the changes from your own machine, get a Sourceforge.net account. It's free. Tell me what your sourceforge userid is, and I'll add you as an authorized developer on our project. If you only want to browse, anybody can do that.
Steps:
Download this zip file: http://crush1011.org/programming/CRUSHProgToolsCD.zip. It's about 250 meg. If you're internet connection is slow, ask me to make a CD for you to avoid the download time.
Unzip it to c:\, allowing replacement. As noted above, if you already have things in any of these places, they will be replaced:
c:\Program Files\Eclipse
c:\Program Files\java\
c:\Program Files\mcc18
c:\Program Files\MinGW
Only if you plan to download compiled code from your computer to the RC : Download http://crush1011.org/programming/ifi-loader-v1-0-10.zip, unzip it and run setup.exe to install. Note that someday there may be a newer version at ifirobotics.com, try this link http://www.ifirobotics.com/rc.shtml#Programming, which of course may also change, if so, hunt for it.
Add some directories to the path like this: on the desktop, right-click My Computer, select "properties". Click the advanced tab, then the Environment variables button. This may be slightly different depending on your version of windows. If you have a PATH variable in the top user section, select it and click the edit button. Otherwise, do the same for the PATH in the bottom System section. At the end of the existing "variable value" string, add this exactly:
;c:\Program Files\mcc18\bin;c:\Program Files\MinGW\bin
Click OK, OK, OK to close all the windows.
Create a shortcut to start Eclipse. There are many ways to do this. Here's one example:
on the desktop, right-click in some blank place, chose new->shortcut. To fill in the file location, click the browse button and navigate to
c:\Program Files\eclipse\eclipse.exe, or just type it in.
Start eclipse with the shortcut you made. Provide a workspace directory name. The one we use is on CRUSH computers is:
C:\CRUSH1011\RobotCode
Only check the box for "use this default and don't ask again" if you never expect to use Eclipse for anything besides CRUSH coding.
Get access to our code:
Window->Open Perspective->Other->CVS Repository Exploring
In the CVS Repositories panel on the left, right click in the white space, select New->Repository Location
Fill in the blanks:
Host: cvs.sourceforge.net
Repository path: /cvsroot/crush1011
User: your sourceforge ID if you have one and I've authorized it, otherwise use anonymous (you will not be able to put back changes, it's a safe way to practice)
Password: your sourceforge password, or leave blank for anonymous
Connection type: extssh if you used a sourceforge ID, pserver if you used anonymous
Check Save password if you want to (a hassle if you don't)
Click Finish
You can now use the + sign on the new repository to see what's there. Look in HEAD. For practice, check out 2005Adil2 (the one we've been working on in recent weeks). Do this: click the + to expand the repositor, click + to expand HEAD, right-click on 2005Adil2, click Check Out.
After the Check Out operation completes, click Window->Open Perspective->Other->C/C++
Notice that recently used perspectives are available on the rightmost tab of the main window, so you don't have to always go the hard way. Grab the left edge of the tab and drag to make it wider and see all the listed perspectives.
Now you can expand the 2005Adil2 project and open files for browsing or editing. If you check Project->Build Automatically, then anytime you save changes it will recompile. You can see the compile results in the Console tab of the bottom right panel. If you don't have Build Automatically checked, you can use Project->Build Project, or Project->Build All to compile changes you've made. You might want this if you're computer is slow.
I'll write about the CVS stuff another time. You can put back changes you've made, see the differences between your copy and the one on the server, go back to an old version, and so on.
So it wasn't so terse I guess.
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wizardofaz.whsites.net/pipermail/crush-code/attachments/20051116/378b8917/attachment.htm
More information about the CRUSH-code
mailing list