Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
DecafAndEclipse ] [ not logged in ] [ Web: Main ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]



This page explains how to get up and running as a decaf developer with the EclipseIDE. The instructions are valid for a UNIX environment where you have the ability to do filesystem links.

Installing Eclipse and the CDT

First, you need to get Eclipse. Go to http://www.eclipse.org and download the latest release (currently 2.1). If you are on Linux, I suggest the GLIBC version. Also get the latest release of the CDT (http://www.eclipse.org/cdt/) (currently 1.01) for your Eclipse platform. Even though the CDT was built with Eclipse 2.0, it does still work well enough with Eclipse 2.1, even if the Eclipse installer doesn't believe it. The features and bug fixes in 2.1 over 2.0 are well worth the upgrade. You'll be well served if you also install the absolute latest Sun JDK on which to run Eclipse. The latest versions of the Sun JDK have hotcode replace and speed improvements both of which you'll be thankful for. For building decaf, you will also need to have a 1.1.x VM available on your system.

Extract your Eclipse build to the /usr directory. Create a shortcut to

and start up Eclipse. It will install itself this first time. Next shut down Eclipse and extract the CDT to /usr/eclipse, then restart Eclipse.

Setting up decaf in Eclipse

Go to a command prompt and get Decaf from CVS like SourceForge tells you to. Put it somewhere like /home/<user>/cvs/decafxx.

Now, you'll create four projects in Eclipse, three Java projects for decaf java code, and one C++ project for the JJOS/decaf C++ code. Name them 'decaf', 'decaf-i386', 'decaf-linux', and 'JJOS'. Once they are created, open your shell and create links as follows:

Now, you have to tell Eclipse about these directories. Go into Eclipse and refresh each of the projects. It will do a meaningless compile with lots of errors, ignore it and let it finish. Go into the properties for each Java project in turn and change the Source directory the the src directory you just created. Make sure to change the output directory to .workspace/<project>/bin. In the 'decaf' project you'll have to add two additional paths. Go the the properties -> Java Build Path -> Libraries and add two class folders, /decaf/stub-bin and /decaf-linux/bin. This will fix your remaining Java build problems. Any errors left are real errors.

Last, you need to get the C++ code to build. Go to JJOS -> Properties -> C/C++ Project -> Build Settings -> Build Command. Uncheck 'use default' and put in your build command: make -C ~/cvs/decaf3b/cpp/build/linux/ all

Now when you need to build the C project go to Menu -> Project -> Rebuild Project, and your C errors will show up in the task list. It is a good idea to filter the task list to only show tasks for the current selection and its children. To do a GRUB build you will still need to use the command line.


I haven't yet gotten to the point of trying to use the debugger, but these directions will at least get you out of using simple text editors for JOS development and give you all of the refactoring and other nice features that Eclipse can give you to increase your productivity in your precious little development time!


Content of these pages are owned and copyrighted by the poster.
Hosted by: