This is a quick guide for getting started with Darjeeling with TinyOS and TNode. 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.
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.
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.
The build system uses Apache ANT. The Ubuntu package is simply called ant.
We're pretty sure it will work with 1.7.1.
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
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
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 sequence.
Darjeeling supports a port to TinyOS/TNode. TNodes are nodes manufactured by SONET company. In order to be able to compile and flash the program on TNodes, you need a modified version of tinyos-2.x and uisp (microcontroller programmer). These two programs are used in TU Delft repository. But because of the distribution policy, we cannot put it on here. Nevertheless, even without our modified version of TinyOS you should be able to compile with the normal TinyOS 2.x. The only problem is that programming a different node and testing is not yet done by us. Therefore, you might try it on your own risk.
Install nesc, and the tweaked tinyos and uisp
Make sure the following environment variables are set.
export TOSDIR=<path to tinyos-2.x>/tos
export NESC=<path to nesc>
export NESC1=<path to lib/ncc/nesc1>
export NESC_LIB=<path to lib/ncc/>
Build the application
As discussed earlier, you can select the application you want to build in build.xml.
Program the node
Connect the node, make sure you've enough permissions (on Linux the getusbownership.sh script in the directory can help) and program the node.