Getting started
This is a quick guide for getting started with Darjeeling. It should explain everything from checking out the code
to compiling your first Darjeeling build.
Before you start
Before you can start developing with Darjeeling, there are some prerequisites.
Operating system
This short tutorial assumes that you're using Linux, in fact it's the weapon of choice for most of the
developers working on Darjeeling. We also provide some information about getting things to work on OSX.
Things haven't been tested with Windows or Windows/Cygwin, so you're pretty much on your own if you want
to use that. Feel free to ask questions on the forum though.
Java 1.6
Darjeeling requires Java 1.6. Ubuntu/Debian/Mint users installing the Sun JDK 1.6 is pretty straightforward, just
install the sun-java6-jdk package. Make sure you use the sun JDK, since we haven't tested with anything else.
For OSX users Java 1.6 should come pre-installed, but is not standard on older Pentium Macs. One workable option is
to install SoyLatte. This installs into /usr/local so it can
coexist with the standard MacOS java, you just need to set your path appropriately when you are building Darjeeling.
SoyLatte has a known issue where the @Override annotation will generate errors when used with a method that
implements an interface method. If you get weird errors conceSelect the application that should be builtrning @Override on mac/soylatte, this might be
your problem. We don't know of any workarounds, so it's probably best to just remove/comment out the offending
@Override tags from your Java code.
Ant
The build system uses Apache ANT. The Ubuntu package is simply called ant.
We're pretty sure it will work with 1.7.1.
GCC
You'll need to install GCC to build the Linux version of Darjeeling, and the appropriate ports for AVR and MSP430.
Ubuntu users will find both gcc-msp430 and avr-gcc in the standard repositories.
Obtaining the source
Check out the source from SVN:
svn co https://darjeeling.svn.sourceforge.net/svnroot/darjeeling/trunk darjeeling
Common requirements
set environment variables
Add DARJEELING to your path, so you can simply copy and past the commands from this guide.
export DARJEELING=<path to darjeeling>
Build the infuser
cd $DARJEELING/src/infuser
ant
Native
You can run darjeeling natively on your computer. Just follow these steps.
Go to the directory for builds for the native system
cd $DARJEELING/src/config/native
Select the application that should be built
Edit build.xml and change the property "apps". Currently it is set to "testsuite", you can change it to "blink". The applications are located in $DARJEELING/src/apps. Note: you can also specify multiple applications, seperated by a comma. They will be run in parallel.
Run the application
./darjeeling.elf
That's all. Your java application is now running on top of darjeeling.
|