Difference between revisions of "Installing TinyOS 2.1"

From TinyOS Wiki
Jump to: navigation, search
(Fixing link to cygwin files download.)
 
(25 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
<p>If you already have a 1.x tree or an existing 2.x tree, you can use the <i>upgrade</i> instructions at  
 
<p>If you already have a 1.x tree or an existing 2.x tree, you can use the <i>upgrade</i> instructions at  
[http://www.tinyos.net/tinyos-2.x/doc/html/upgrade-tinyos.html], with the added note that Cygwin should be upgraded to the latest version. In cygwin run "cygcheck -c"  and check the cygwin entry is 1.5.25-11 or later. As of Apr08, Cygwin is not supported on Windows Vista.
+
[http://www.tinyos.net/tinyos-2.x/doc/html/upgrade-tinyos.html], with the added note that Cygwin should be upgraded to the latest version. In cygwin run "cygcheck -c"  and check the cygwin entry is 1.5.25-11 or later. As of Apr08, Cygwin is not supported on Windows Vista.</p>
  
<p>There are two ways to do a clean install of TinyOS. The first way is to install a live CD that gives you a virtualized Linux with a complete TinyOS install. Note that since this is on a CD, you can't modify  anything; you can, however, make a LiveUSB device to use as your TinyOS install. The second way is to install TinyOS on your host operating system. When installing on a host operating system, you can either use a debian package repository or manually install with RPMs. There is not yet a live CD for 2.1.
+
<p>There are two ways to do a clean install of TinyOS. The first way is to install a live CD that gives you a virtualized Linux with a complete TinyOS install. Note that since this is on a CD, you can't modify  anything; you can, however, make a LiveUSB device to use as your TinyOS install. The second way is to install TinyOS on your host operating system. When installing on a host operating system, you can either use a debian package repository or manually install with RPMs. There is not yet a live CD for 2.1.</p>
  
  
Line 10: Line 10:
  
 
1) Remove any old tinyos repository from /etc/apt/sources.list and add the following:
 
1) Remove any old tinyos repository from /etc/apt/sources.list and add the following:
<br>  Supported distributions are (edgy, feisty, gutsy, hardy)  
+
<br>  Supported distributions are (hardy, intrepid, jaunty, karmic)  
   deb http://tinyos.stanford.edu/tinyos/dists/ubuntu <distribution> main
+
   deb http://hinrg.cs.jhu.edu/tinyos <distribution> main
 +
 
 +
A single pools supports all distributions at this time.
  
 
2) Update your repository cache:
 
2) Update your repository cache:
Line 17: Line 19:
 
3) Run the following to install the latest release of tinyos and all its supported tools:
 
3) Run the following to install the latest release of tinyos and all its supported tools:
 
   sudo apt-get install tinyos
 
   sudo apt-get install tinyos
 +
 +
This will likely give you a message telling you to choose between the two available versions.  An example to then execute is:
 +
sudo apt-get install tinyos-2.1.1
 +
 
4) Add the following line to your <code>~/.bashrc</code> or <code>~/.profile</code> file in your home directory to set up the environment for TinyOS development at login
 
4) Add the following line to your <code>~/.bashrc</code> or <code>~/.profile</code> file in your home directory to set up the environment for TinyOS development at login
 
   #Sourcing the tinyos environment variable setup script
 
   #Sourcing the tinyos environment variable setup script
   source /opt/tinyos-2.1.0/tinyos.sh
+
   source /opt/tinyos-2.1.1/tinyos.sh
  
If you typically run tinyos from CVS and only require the toolchain installation, you can install the <code>tinyos-required</code> package instead of the <code>tinyos</code> one to just pull these in.  Keep in mind though, that if you work from CVS, nesc 1.3 is required instead of the default nesc package which is at version 1.2.9 at the moment.  This means you will also need to install the <code>nesc-1.3</code> package in addition to <code>tinyos-required</code> in order to compile from CVS.  Make sure you do this in two separate steps beacause nesc-1.3 OVERWRITES the files installed by the <code>nesc</code> package pulled in by <code>tinyos-required</code>. 
+
If you typically run tinyos from CVS and only require the toolchain installation, you can install the <code>tinyos-required</code> package instead of the <code>tinyos</code> one to just pull these in.
  sudo apt-get install tinyos-required
 
  sudo apt-get install nesc-1.3
 
 
 
If you want to downgrade back to the standard <code>nesc</code> package at any time later, first remove <code>nesc-1.3</code> and reinstall it with the --reinstall flag:
 
  sudo apt-get remove nesc-1.3
 
  sudo apt-get --reinstall install nesc
 
 
 
All of this will be unnecessary after the 2.1 release as nesc-1.3 will become the default, and nesc-1.2.9 will become the deprecated version.  These instructions will be updated at that time.
 
  
 
Keep in mind had inconsistent success with running <code>apt-get <b>upgrade</b> tinyos</code>, so for now it's best to play it safe and remove any old tinyos packages before installing the new ones.  
 
Keep in mind had inconsistent success with running <code>apt-get <b>upgrade</b> tinyos</code>, so for now it's best to play it safe and remove any old tinyos packages before installing the new ones.  
  
Also you have used the TinyOS debian repository in the past, keep in mind that all of the tools have been updated for the upcoming TinyOS-2.1 release, but still work with all older versions of TinyOS as well.  If you try updating in this way, and you see conflicts with some deprecated packages, send me an email (klueska@cs.stanford.edu), and I'll add them to the conflicts list so that they get removed when the updated tools are installed.  These conflicts should be OK so long as you remove any old packages; they are due to a change in the names of the updated packages installing into the same locations as the outdated ones.
+
Also you have used the TinyOS debian repository in the past, keep in mind that all of the tools have been updated for TinyOS-2.1, but still work with all older versions of TinyOS as well.  If you try updating in this way, and you see conflicts with some deprecated packages, send me an email (cire831@gmail.com), and I'll add them to the conflicts list so that they get removed when the updated tools are installed.  These conflicts should be OK so long as you remove any old packages; they are due to a change in the names of the updated packages installing into the same locations as the outdated ones.
  
 
<h1>Manual installation on your host OS with RPMs</h1>
 
<h1>Manual installation on your host OS with RPMs</h1>
Line 92: Line 90:
  
 
<ol>
 
<ol>
# Download [http://cone.informatik.uni-freiburg.de/people/aslam/cygwin-files.zip cygwin-files.zip] and unzip it under some local folder say c:/cygwin-files
+
# Download [http://archive.cone.informatik.uni-freiburg.de/people/aslam/cygwin-files.zip cygwin-files.zip] and unzip it under some local folder say c:/cygwin-files
 
# Go to c:/cygwin-files and start the setup. Use following instructions.
 
# Go to c:/cygwin-files and start the setup. Use following instructions.
 
:# When it ask for ''"Choose A download source"'', then use ''"Install from Local Directory"'' option
 
:# When it ask for ''"Choose A download source"'', then use ''"Install from Local Directory"'' option
Line 112: Line 110:
 
<li> Related to the above warnings, if you see warnings about the cygwin1.dll not  
 
<li> Related to the above warnings, if you see warnings about the cygwin1.dll not  
 
     being found, don't worry. All will be well once you reboot and the right DLL is loaded. <p></p></li>
 
     being found, don't worry. All will be well once you reboot and the right DLL is loaded. <p></p></li>
 +
<li> You will need the packages rpm, make and perl which are not installed by default. For a complete installation, flex, bison and python are required, too.<p></p></li>
 
</ul>
 
</ul>
  
Line 119: Line 118:
 
avr or msp430 or both) with the rpm command 'rpm -ivh <i>rpm></i>'.  
 
avr or msp430 or both) with the rpm command 'rpm -ivh <i>rpm></i>'.  
 
On
 
On
windows, if you get an error claiming that the rpm was build for an NT
+
windows, if you get an error claiming that the rpm was intended for a cygwin_nt-5.1 operating system and you're indeed on a windows computer, bypass the erroneous
computer and you're on a windows NT computer, bypass the erroneous
 
 
error by using 'rpm -ivh --ignoreos <i>rpmname</i>'.
 
error by using 'rpm -ivh --ignoreos <i>rpmname</i>'.
 
</p>
 
</p>
Line 136: Line 134:
 
   <td>avr-binutils<font color="red">&#8224;</font></td>
 
   <td>avr-binutils<font color="red">&#8224;</font></td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tools/windows/avr-binutils-2.17tinyos-3.cygwin.i386.rpm avr-binutils-2.17tinyos-3.cygwin.i386.rpm] </td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tools/windows/avr-binutils-2.17tinyos-3.cygwin.i386.rpm avr-binutils-2.17tinyos-3.cygwin.i386.rpm] </td>
   <td>avr-binutils-2.17tinyos-3.i386.rpm is not yet available.</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tools/linux/avr-binutils-2.17tinyos-3.i386.rpm avr-binutils-2.17tinyos-3.i386.rpm] </td>
  
 
</tr>
 
</tr>
Line 143: Line 141:
 
   <td bgcolor="#dddddd">avr-gcc</td>
 
   <td bgcolor="#dddddd">avr-gcc</td>
 
   <td bgcolor="#dddddd">[http://www.tinyos.net/dist-2.1.0/tools/windows/avr-gcc-4.1.2-1.cygwin.i386.rpm avr-gcc-4.1.2-1.cygwin.i386.rpm]</td>
 
   <td bgcolor="#dddddd">[http://www.tinyos.net/dist-2.1.0/tools/windows/avr-gcc-4.1.2-1.cygwin.i386.rpm avr-gcc-4.1.2-1.cygwin.i386.rpm]</td>
   <td bgcolor="#dddddd">avr-gcc-4.1.2-1.fc9.i386.rpm is not yet available.</td>
+
   <td bgcolor="#dddddd">[http://www.tinyos.net/dist-2.1.0/tools/linux/avr-gcc-4.1.2-1.i386.rpm avr-gcc-4.1.2-1.i386.rpm]</td>
 
</tr>
 
</tr>
  
Line 150: Line 148:
  
 
   <td>[http://www.tinyos.net/dist-2.1.0/tools/windows/avr-libc-1.4.7-1.cygwin.i386.rpm avr-libc-1.4.7-1.cygwin.i386.rpm]</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tools/windows/avr-libc-1.4.7-1.cygwin.i386.rpm avr-libc-1.4.7-1.cygwin.i386.rpm]</td>
   <td>avr-libc-1.4.7-1.fc9.i386.rpm is not yet available.</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tools/linux/avr-libc-1.4.7-1.i386.rpm avr-libc-1.4.7-1.i386.rpm]</td>
 
</tr>
 
</tr>
  
Line 165: Line 163:
 
   <td>[http://www.tinyos.net/dist-2.1.0/tools/linux/avr-insight-6.3-1.i386.rpm avr-insight-6.3-1.i386.rpm]</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tools/linux/avr-insight-6.3-1.i386.rpm avr-insight-6.3-1.i386.rpm]</td>
 
</tr>
 
</tr>
 +
 +
<tr>
 +
  <td bgcolor="#dddddd">avrdude<font color="red">&#8224;&#8224;</font></td>
 +
  <td bgcolor="#dddddd">[http://www.tinyos.net/dist-2.1.0/tools/windows/avrdude-tinyos-5.6cvs-1.cygwin.i386.rpm avrdude-tinyos-5.6cvs-1.cygwin.i386.rpm]</td>
 +
  <td bgcolor="#dddddd">[http://www.tinyos.net/dist-2.1.0/tools/linux/avrdude-tinyos-5.6cvs-1.i386.rpm avrdude-tinyos-5.6cvs-1.i386.rpm]</td>
 +
</tr>
 +
  
 
</table>
 
</table>
<i><font color="red">&#8224;</font>If you receive an rpm error that indicates that you have a newer version already installed, try <code>rpm -Uvh --force</code></i>
+
<i><font color="red">&#8224;</font>If you receive an rpm error that indicates that you have a newer version already installed, try <code>rpm -Uvh --force</code></i><br>
 +
<i><font color="red">&#8224;&#8224;</font>If you receive an rpm error that indicates that you are missing /bin/sh, try <code>rpm -Uvh --force --nodeps</code></i>
  
  
Line 245: Line 251:
 
   <td>libc</td>
 
   <td>libc</td>
  
   <td>[http://www.tinyos.net/dist-2.1.0/tools/windows/msp430tools-libc-20050308-1.cygwin.i386.rpm msp430tools-libc-20080808-1.cygwin.i386.rpm]</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tools/windows/msp430tools-libc-20080808-1.cygwin.i386.rpm msp430tools-libc-20080808-1.cygwin.i386.rpm]</td>
   <td>msp430tools-libc-20080808-1.i386.rpm is not yet available.</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tools/linux/msp430tools-libc-20080808-1.i386.rpm msp430tools-libc-20080808-1.i386.rpm]</td>
 
</tr>
 
</tr>
  
Line 301: Line 307:
 
<tr>
 
<tr>
 
   <td>NesC</td>
 
   <td>NesC</td>
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/nesc-1.3.0-1.cygwin.i386.rpm nesc-1.3.0a-1.cygwin.i386.rpm]</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/nesc-1.3.0-1.cygwin.i386.rpm nesc-1.3.0-1.cygwin.i386.rpm]</td>
   <td>[http://www.tinyos.net/dist-1.2.0/tinyos/linux/nesc-1.3.0-1.i386.rpm nesc-1.3.0-1.fc9.i386.rpm]</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/nesc-1.3.0-1.fc9.i386.rpm nesc-1.3.0-1.fc9.i386.rpm]</td>
 
   <td><code>rpm -Uvh</code><br/>
 
   <td><code>rpm -Uvh</code><br/>
 
                     <code>rpm -Uvh --ignoreos</code> (if Cygwin complains)</td>
 
                     <code>rpm -Uvh --ignoreos</code> (if Cygwin complains)</td>
Line 317: Line 323:
 
   <td>Deputy</td>
 
   <td>Deputy</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/tinyos-deputy-1.1-1.cygwin.i386.rpm tinyos-deputy-1.1-1.cygwin.i386.rpm]</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/tinyos-deputy-1.1-1.cygwin.i386.rpm tinyos-deputy-1.1-1.cygwin.i386.rpm]</td>
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/tinyos-deputy-1.1-1.fc9.i386.rpm tinyos-deputy-1.1-1.i386.rpm]</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/tinyos-deputy-1.1-1.fc9.i386.rpm tinyos-deputy-1.1-1.fc9.i386.rpm]</td>
 
   <td><code>rpm -i</code><br/>
 
   <td><code>rpm -i</code><br/>
 
                     <code>rpm -i --ignoreos</code> (if Cygwin complains)</td>
 
                     <code>rpm -i --ignoreos</code> (if Cygwin complains)</td>
Line 334: Line 340:
 
   <td>tinyos-tools</td>
 
   <td>tinyos-tools</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/tinyos-tools-1.3.0-1.cygwin.i386.rpm tinyos-tools-1.3.0-1.cygwin.i386.rpm]</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/tinyos-tools-1.3.0-1.cygwin.i386.rpm tinyos-tools-1.3.0-1.cygwin.i386.rpm]</td>
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/tinyos-tools-1.3.0-1.i386.rpm tinyos-tools-1.3.0-1.i386.rpm]</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/tinyos-tools-1.3.0-1.fc9.i386.rpm tinyos-tools-1.3.0-1.i386.rpm]</td>
 
   <td><code>rpm -ivh --force</code>&nbsp;(1.x tree)<br><code>rpm -Uvh</code>&nbsp;(no 1.x tree)<br></td>
 
   <td><code>rpm -ivh --force</code>&nbsp;(1.x tree)<br><code>rpm -Uvh</code>&nbsp;(no 1.x tree)<br></td>
  
Line 369: Line 375:
 
   <td>TinyOS</td>
 
   <td>TinyOS</td>
  
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/tinyos-2.1.0-1.cygwin.noarch.rpm tinyos-2.1.0-1.cygwin.noarch.rpm]</td>
+
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/windows/tinyos-2.1.0-2.cygwin.noarch.rpm tinyos-2.1.0-2.cygwin.noarch.rpm]</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/tinyos-2.1.0-1.fc9.noarch.rpm tinyos-2.1.0-1.fc9.noarch.rpm]</td>
 
   <td>[http://www.tinyos.net/dist-2.1.0/tinyos/linux/tinyos-2.1.0-1.fc9.noarch.rpm tinyos-2.1.0-1.fc9.noarch.rpm]</td>
 
</tr>
 
</tr>
Line 380: Line 386:
 
Ideally, you'll put these environment variables in a shell script that will run when your shell starts, but you needn't  
 
Ideally, you'll put these environment variables in a shell script that will run when your shell starts, but you needn't  
 
put such a script under /etc/profile.d.  
 
put such a script under /etc/profile.d.  
 +
You can use ~/.bash_profile. (in Cygwin, too)
 
</p>
 
</p>
 
<p>
 
<p>
Line 418: Line 425:
 
</td></tr><tr>
 
</td></tr><tr>
 
   <td>CLASSPATH</td>
 
   <td>CLASSPATH</td>
   <td>C:\tinyos\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;.</td>
+
   <td>C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;.</td>
 
   <td>$TOSROOT/support/sdk/java/tinyos.jar:.</td>
 
   <td>$TOSROOT/support/sdk/java/tinyos.jar:.</td>
  

Latest revision as of 08:36, 23 April 2013

If you already have a 1.x tree or an existing 2.x tree, you can use the upgrade instructions at [1], with the added note that Cygwin should be upgraded to the latest version. In cygwin run "cygcheck -c" and check the cygwin entry is 1.5.25-11 or later. As of Apr08, Cygwin is not supported on Windows Vista.

There are two ways to do a clean install of TinyOS. The first way is to install a live CD that gives you a virtualized Linux with a complete TinyOS install. Note that since this is on a CD, you can't modify anything; you can, however, make a LiveUSB device to use as your TinyOS install. The second way is to install TinyOS on your host operating system. When installing on a host operating system, you can either use a debian package repository or manually install with RPMs. There is not yet a live CD for 2.1.


Two-step install on your host OS with Debian packages

If you are running a version of Linux that supports Debian packages, then you may want to use the TinyOS package repository.

1) Remove any old tinyos repository from /etc/apt/sources.list and add the following:
Supported distributions are (hardy, intrepid, jaunty, karmic)

 deb http://hinrg.cs.jhu.edu/tinyos <distribution> main

A single pools supports all distributions at this time.

2) Update your repository cache:

 sudo apt-get update

3) Run the following to install the latest release of tinyos and all its supported tools:

 sudo apt-get install tinyos

This will likely give you a message telling you to choose between the two available versions. An example to then execute is:

sudo apt-get install tinyos-2.1.1

4) Add the following line to your ~/.bashrc or ~/.profile file in your home directory to set up the environment for TinyOS development at login

 #Sourcing the tinyos environment variable setup script
 source /opt/tinyos-2.1.1/tinyos.sh

If you typically run tinyos from CVS and only require the toolchain installation, you can install the tinyos-required package instead of the tinyos one to just pull these in.

Keep in mind had inconsistent success with running apt-get upgrade tinyos, so for now it's best to play it safe and remove any old tinyos packages before installing the new ones.

Also you have used the TinyOS debian repository in the past, keep in mind that all of the tools have been updated for TinyOS-2.1, but still work with all older versions of TinyOS as well. If you try updating in this way, and you see conflicts with some deprecated packages, send me an email (cire831@gmail.com), and I'll add them to the conflicts list so that they get removed when the updated tools are installed. These conflicts should be OK so long as you remove any old packages; they are due to a change in the names of the updated packages installing into the same locations as the outdated ones.

Manual installation on your host OS with RPMs

Currently, the TinyOS Core Working Group supports TinyOS on two platforms: Cygwin (Windows) and Linux. There have been some successful efforts to getting TinyOS environments working on Mac OSX, but OSX is not supported by the Core WG.

Installing a TinyOS enviromnent has five basic steps; Windows requires an extra step, installing Cygwin, which is a UNIX-like environment. The steps are:

  1. Installing a Java 1.6 JDK. Java is the most common way of interacting with mote base stations or gateways that are plugged into a PC or laptop.
  2. Windows only. Install Cygwin. This gives you a shell and many UNIX tools which the TinyOS environment uses, such as perl and shell scripts.
  3. Installing native compilers. As you're compiling code for low-power microcontrollers, you need compilers that can generate the proper assembly code. If you using mica-family motes, you need the AVR toolchain; if you're using telos-family motes, you need the MSP430 toolchain.
  4. Installing the nesC compiler. TinyOS is written in nesC, a dialect of C with support for the TinyOS concurrency model and component-based programming. The nesC compiler is platform-independent: it passes its output to the native compilers, so that it can take advantage of all of the effort put into their optimizations.
  5. Installing the TinyOS source tree. If you want to compile and install TinyOS programs, you need the code.
  6. Installing the Graphviz visualization tool. The TinyOS environment includes nesdoc, a tool that automatically generates HTML documentation from source code. Part of this process involves drawing diagrams that show the relationships between different TinyOS components. Graphviz is an open source tool that nesdoc uses to draw the diagrams.

Step 1: Install Java 1.6 JDK


Download and install Sun's 1.6 JDK from http://java.sun.com.

Step 2: Install Cygwin

This step is required for Windows installations only. If you are installing on Linux, skip to step 3.

We have put online the cygwin packages that we've confirmed to be compatible with TinyOS. The instructions below use those packages. You can also upgrade your cygwin environment according to the instructions at www.cygwin.com and your environment will most likely work. A large number of TinyOS users, upgrade their cygwin packages at least monthly from cygnus. However, since we can't test what packages are compatible as they become available daily, we can't confirm that today's set will work.

    1. Download cygwin-files.zip and unzip it under some local folder say c:/cygwin-files
    2. Go to c:/cygwin-files and start the setup. Use following instructions.
    1. When it ask for "Choose A download source", then use "Install from Local Directory" option
    2. When it ask for "Select Root Install Director" then use following options.
      Root Directory: c:\cygwin (or some other directory without spaces in its name)
      Install for: All Users
      Default Text file type: Unix/Binary
    3. When it ask for "Select local Package directory" then select "c:/cygwin-files" (Note: this location depends on where you have unzip cygwin-files.zip, in step-1 above we have used c:/cygwin-files)
    4. Complete the rest of installation process

Some notes:

  • You might see a message explaining that you need to reboot because some files are in use. This most likely means that your cygwin DLL is loaded and in-use and, therefore, cannot be replaced. When you reboot, the new DLL will be loaded.

  • Related to the above warnings, if you see warnings about the cygwin1.dll not being found, don't worry. All will be well once you reboot and the right DLL is loaded.

  • You will need the packages rpm, make and perl which are not installed by default. For a complete installation, flex, bison and python are required, too.

Step 3: Install native compilers

Install the appropriate version of the following (Windows or Linux, avr or msp430 or both) with the rpm command 'rpm -ivh rpm>'. On windows, if you get an error claiming that the rpm was intended for a cygwin_nt-5.1 operating system and you're indeed on a windows computer, bypass the erroneous error by using 'rpm -ivh --ignoreos rpmname'.

Atmel AVR Tools

Tool Windows/Cygwin Linux
avr-binutils avr-binutils-2.17tinyos-3.cygwin.i386.rpm avr-binutils-2.17tinyos-3.i386.rpm
avr-gcc avr-gcc-4.1.2-1.cygwin.i386.rpm avr-gcc-4.1.2-1.i386.rpm
avr-libc avr-libc-1.4.7-1.cygwin.i386.rpm avr-libc-1.4.7-1.i386.rpm
avarice avarice-2.4-1.cygwin.i386.rpm avarice-2.4-1.i386.rpm
insight (avr-gdb) avr-insight-6.3-1.cygwin.i386.rpm avr-insight-6.3-1.i386.rpm
avrdude†† avrdude-tinyos-5.6cvs-1.cygwin.i386.rpm avrdude-tinyos-5.6cvs-1.i386.rpm

If you receive an rpm error that indicates that you have a newer version already installed, try rpm -Uvh --force
††If you receive an rpm error that indicates that you are missing /bin/sh, try rpm -Uvh --force --nodeps


PXA27x Tools (iMote2)

Tool Windows/Cygwin Linux
xscale-elf-binutils xscale-elf-binutils-2.15tinyos-1.cygwin.i386.rpm xscale-elf-binutils-2.15-2.i386.deb
xscale-elf-gcc xscale-elf-gcc-3.4.3-1.cygwin.i386.rpm xscale-elf-gcc-3.4.3-2.i386.deb
xscale-elf-newlibc xscale-elf-newlib-1.11.0tinyos-1.cygwin.i386.rpm xscale-elf-newlib-1.13.0-1.i386.deb
jtag jflashmm.tgz OpenOCD toolchain

Copy jflashmm.tgz to /opt directory, untar it (tar xzf jflashmm.tgz), and make sure it's on your path (see Step 5).


TI MSP430 Tools

Tool Windows/Cygwin Linux
base msp430tools-base-0.1-20050607.cygwin.i386.rpm msp430tools-base-0.1-20050607.i386.rpm
python tools msp430tools-python-tools-1.0-1.cygwin.noarch.rpm msp430tools-python-tools-1.0-1.noarch.rpm
binutils msp430tools-binutils-2.16-20050607.cygwin.i386.rpm msp430tools-binutils-2.16-20050607.i386.rpm
gcc msp430tools-gcc-3.2.3-20050607.cygwin.i386.rpm msp430tools-gcc-3.2.3-20050607.i386.rpm
libc msp430tools-libc-20080808-1.cygwin.i386.rpm msp430tools-libc-20080808-1.i386.rpm
jtag [2]Not yet available msp430tools-jtag-lib-20031101cvs-20050610.i386.rpm
gdb [3]Not yet available msp430tools-gdb-6.0-20050609.i386.rpm

Step 4: Install TinyOS toolchain

The TinyOS-specific tools are the NesC compiler and a set of tools developed in the tinyos-2.x/tools source code repository. They are also installed using rpms. If you using the Cygwin version recommended in these install instructions, you should install the "Recommended" Windows/Cygwin nesC RPM. If you get strange errors when you try to compile TinyOS programs, such as the error message "the procedure entry point basename could not be located in the dynamic link library cygwin1.dll", this is likely due to a Cygwin version incompatibility: try the "Other" Windows/Cygwin RPM (1.2.7a). If you are using Cygwin and installing the nesC RPM causes an error that the RPM was built for Cygwin, add the --ignoreos option.

Finally, there are two Linux versions of tinyos-tools, depending on whether you have a 32-bit or 64-bit machine. The first is the i386 RPM and the second is the i686 RPM. If you have a 64-bit Java VM, it is important that you install the i686 RPM or otherwise the Java support may not work properly.

TinyOS-specific Tools

Tool Windows/Cygwin Linux Command
NesC nesc-1.3.0-1.cygwin.i386.rpm nesc-1.3.0-1.fc9.i386.rpm rpm -Uvh
rpm -Uvh --ignoreos (if Cygwin complains)
Tool Windows/Cygwin Linux Command
Deputy tinyos-deputy-1.1-1.cygwin.i386.rpm tinyos-deputy-1.1-1.fc9.i386.rpm rpm -i
rpm -i --ignoreos (if Cygwin complains)
Tool Windows/Cygwin Linux Command
tinyos-tools tinyos-tools-1.3.0-1.cygwin.i386.rpm tinyos-tools-1.3.0-1.i386.rpm rpm -ivh --force (1.x tree)
rpm -Uvh (no 1.x tree)

Step 5: Install the TinyOS 2.x source tree

Now that the tools are installed, you need only install the tinyos 2.x source tree and then set your environment variables. Install the appropriate version of the following (Window or Linux) with the rpm command 'rpm -ivh rpm'. As with the previous rpms, if you get an error claiming that the rpm was build for an NT computer and you're on a windows NT computer, bypass the erroneous error by using 'rpm -ivh --ignoreos rpmname'.

  • Install tinyos-2.x

    TinyOS 2.x

    Windows/Cygwin Linux
    TinyOS tinyos-2.1.0-2.cygwin.noarch.rpm tinyos-2.1.0-1.fc9.noarch.rpm
  • Configure your environment

    Ideally, you'll put these environment variables in a shell script that will run when your shell starts, but you needn't put such a script under /etc/profile.d. You can use ~/.bash_profile. (in Cygwin, too)

    The example settings below assume that the tinyos-2.x installation is in /opt/tinyos-2.x. Change the settings to be correct for where you've put your tinyos-2.x tree. Note that the windows CLASSPATH must be a windows-style path, not a cygwin path. You can generate a windows style path from a cygwin-style path using 'cygpath -w'. For example:

    export CLASSPATH=`cygpath -w $TOSROOT/support/sdk/java/tinyos.jar`
    export CLASSPATH="$CLASSPATH;."
    

    TinyOS 2.x

    Environment Variable Windows Linux
    TOSROOT /opt/tinyos-2.x same as in Cygwin
    TOSDIR $TOSROOT/tos same as in Cygwin
    CLASSPATH C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;. $TOSROOT/support/sdk/java/tinyos.jar:.
    MAKERULES $TOSROOT/support/make/Makerules same as in Cygwin
    PATH /opt/msp430/bin:/opt/jflashmm:$PATH same as in Cygwin

    Only necessary if you're using MSP430 or iMote2 platform/tools.

    In addition to the above environment variables, do the following on Linux machines:

    1. Change the ownership on your /opt/tinyos-2.x files: chown -R <your uid> /opt/tinyos-2.x
    2. Change the permissions on any serial (/dev/ttyS<N>), usb (/dev/tts/usb<N>, /dev/ttyUSB<N>), or parallel (/dev/parport) devices you are going to use: chmod 666 /dev/<devicename>

Step 6: Installing Graphviz

Go to download page of the Graphviz project and download the appropriate RPM. You only need the basic graphviz RPM (graphviz-); you don't need all of the add-ons, such as -devel, -doc, -perl, etc. If you're not sure what version of Linux you're running,

uname -a

might give you some useful information. Install the rpm with rpm -i rpm-name. In the case of Windows, there is a simple install program, so you don't need to deal with RPMs.

you may need to download graphviz 1.1.0 here