Contiki Installation

From CoMo Robotics
Jump to: navigation, search

Back to Contiki page: Contiki

Back to Wireless Sensor networks page: Wireless Sensor Networks


Contents



Contiki and Instant Contiki

The source code of Contiki is available on SourceForge at the address http://sourceforge.net/projects/contiki/. To date, the latest version is Contiki 2.3. Two types of installation are possible from the download section, and the corresponding files are stored in the folders Instant contiki or Contiki.

Instant Contiki is a virtual disk for VMware, which contains a Ubuntu OS preconfigured for Contiki. The file is 1 GB, and can be run using the VMware player freely available from [1]. The user and password for the virtual machine are user and user.
The Contiki files in Instant Contiki are located in the user home directory. It is easier to install Contiki using Instant Contiki, as (almost) everything is preconfigured for you, in an (almost) stable version.

Eclipse

It is a good idea to install Eclispe. Dowload it from [2]. Make sure to select a version including the C/C++ development tools. Untar it your local directory for example

cd ~
tar -xvzf eclipse-cpp-galileo-SR1-linux-gtk.tar.gz

and launch it

cd eclipse
./eclipse &

It asks you the folder where to put your projects. The default choice is a good option (a \verb"workspace" folder in your home directory).

Once launched, create a new project, with the \verb"contiki-2.3" source folder. This allows Eclipse to make connections between all the files of the Contiki OS. In Particular, a useful feature is the F3 key which allows to open the files where variables, constants, and functions are defined. Simply put the mouse on the item for which you want to find the declaration, and press F3.

Note that some of the files related to the MSP430 platform are not in the Contiki foler, but in the /usr/msp430 folder.

Setting up the environment

The file tmote-bsl-linux in tools/sky must be made executable. Go to the directory tools/sky and change the permissions with

chmod a+x tmote-bsl-linux

It is useful to add at the end of your .bashrc file (in your directory) the following lines:

 export PATH=.:$PATH
 export CLASSPATH=.:/home/user/contiki-sky-2.3/collect-demo.jar:/home/user/contiki-sky-2.3/lib/jcommon-1.0.13.jar:
/home/user/contiki-sky-2.3/lib/jfreechart-1.0.10.jar:$CLASSPATH

This allows to run commands located in the current directory, and to easily compile the Contiki programs relying on a graphical interface (such as the energy or data collection demos).

Personal tools