Difference between revisions of "Installing from SCM"

From TinyOS Wiki
Jump to: navigation, search
Line 1: Line 1:
 
NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from CVS/GIT.
 
NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from CVS/GIT.
 +
 +
== Step 0: Enable the Stanford tinyos repository ==
 +
 +
sudo echo "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main" >> /etc/apt/sources.list
 +
sudo apt-get update
  
 
== Step 1: Install the nesc compiler ==
 
== Step 1: Install the nesc compiler ==
  
Using the Stanford repository:
+
sudo apt-get install nesc
  apt-get install nesc
 
  
 
The Stanford repository contains the 1.3.0 which has a required dependency on sun-java5-jdk/sun-java6-jdk. If you are using a newer version of Ubuntu or Debian that doesn't provide this, you can install the nesc 1.3.1:
 
The Stanford repository contains the 1.3.0 which has a required dependency on sun-java5-jdk/sun-java6-jdk. If you are using a newer version of Ubuntu or Debian that doesn't provide this, you can install the nesc 1.3.1:
 +
 
  wget http://cs.jhu.edu/~razvanm/wsn/debian/nesc-1.3.1.deb
 
  wget http://cs.jhu.edu/~razvanm/wsn/debian/nesc-1.3.1.deb
  dpkg -i nesc-1.3.1.deb
+
  sudo dpkg -i nesc-1.3.1.deb
  
 
If you need the 64-bit of nesc 1.3.1 you can get it like this:
 
If you need the 64-bit of nesc 1.3.1 you can get it like this:
 +
 
  wget http://cs.jhu.edu/~razvanm/wsn/debian/64/nesc-1.3.1.deb
 
  wget http://cs.jhu.edu/~razvanm/wsn/debian/64/nesc-1.3.1.deb
 +
sudo dpkg -i negc-1.3.1.deb
  
 
== Step 2: Install the crosstools ==
 
== Step 2: Install the crosstools ==
  
 
Debian MSP430:
 
Debian MSP430:
  apt-get install msp430-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
+
 
 +
  sudo apt-get install msp430-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
  
 
Debian AVR:
 
Debian AVR:
  apt-get install avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
+
 
 +
  sudo apt-get install avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos
  
 
== Step 3: Checkout the TinyOS 2.x source tree ==
 
== Step 3: Checkout the TinyOS 2.x source tree ==
Line 29: Line 38:
  
 
If you want to use git then instead of the last command you can do:
 
If you want to use git then instead of the last command you can do:
git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x.git
+
 
 +
git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x.git
  
 
== Step 4: Compile the TinyOS tools ==
 
== Step 4: Compile the TinyOS tools ==
Line 44: Line 54:
  
 
Add the following to .profile (or .bash_profile or .bashrc depending on your system):
 
Add the following to .profile (or .bash_profile or .bashrc depending on your system):
 +
 
  export PATH=$HOME/local/bin:$PATH
 
  export PATH=$HOME/local/bin:$PATH
 
  export TOSROOT=$HOME/local/src/tinyos-2.x
 
  export TOSROOT=$HOME/local/src/tinyos-2.x
Line 53: Line 64:
  
 
== See also ==
 
== See also ==
 +
 
*[[TinyOS CVS access]]
 
*[[TinyOS CVS access]]
  
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Revision as of 16:12, 23 January 2010

NOTE: It is highly recommended to remove the system-wide tinyos-tools package when using the TinyOS from CVS/GIT.

Step 0: Enable the Stanford tinyos repository

sudo echo "deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main" >> /etc/apt/sources.list
sudo apt-get update

Step 1: Install the nesc compiler

sudo apt-get install nesc

The Stanford repository contains the 1.3.0 which has a required dependency on sun-java5-jdk/sun-java6-jdk. If you are using a newer version of Ubuntu or Debian that doesn't provide this, you can install the nesc 1.3.1:

wget http://cs.jhu.edu/~razvanm/wsn/debian/nesc-1.3.1.deb
sudo dpkg -i nesc-1.3.1.deb

If you need the 64-bit of nesc 1.3.1 you can get it like this:

wget http://cs.jhu.edu/~razvanm/wsn/debian/64/nesc-1.3.1.deb
sudo dpkg -i negc-1.3.1.deb

Step 2: Install the crosstools

Debian MSP430:

sudo apt-get install msp430-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos

Debian AVR:

sudo apt-get install avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos

Step 3: Checkout the TinyOS 2.x source tree

cd ~
mkdir -p local/src
cd local/src
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x

If you want to use git then instead of the last command you can do:

git clone git://hinrg.cs.jhu.edu/git/tinyos-2.x.git

Step 4: Compile the TinyOS tools

 cd tinyos-2.x/tools
 ./Bootstrap
 ./configure --prefix=$HOME/local
 make all
 make install

A few ENTERs will be required by the last two commands.

Step 5: Set the environment variables

Add the following to .profile (or .bash_profile or .bashrc depending on your system):

export PATH=$HOME/local/bin:$PATH
export TOSROOT=$HOME/local/src/tinyos-2.x
export TOSDIR=$TOSROOT/tos
export MAKERULES=$TOSROOT/support/make/Makerules
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
export PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH
export PATH=$HOME/local/src/tinyos-2.x/support/sdk/c:$PATH

See also