]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - doc/html/install-tinyos.html
Text.
[tinyos-2.x.git] / doc / html / install-tinyos.html
index f75cded63e5aa3ddb3427252d33f80a1a1c5195c..78b5895d2fc0d9ba44e6ee4b6c47e493b06e6c60 100644 (file)
@@ -2,22 +2,53 @@
 <!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
 <html>
 <head>
-  <title>Installing TinyOS 2.0</title>
+  <title>Installing TinyOS 2.0.2</title>
   <link href="../stylesheets/tutorial.css" rel="stylesheet" type="text/css">
 </head>
 <body>
 
-<div class="title">Installing TinyOS 2.0</div>
-<div class="subtitle">Last updated 5 November 2006</div>
+<div class="title">Installing TinyOS 2.0.2</div>
+<div class="subtitle">Last updated 30 July 2007</div>
 
 <p>If you already have a 1.x tree or an existing 2.x tree, you are better off 
 following the <i>upgrade</i> instructions at 
-<a href="upgrade-tinyos.html">upgrade-tinyos.html</a>.</p>
-
+<a href="upgrade-tinyos.html">upgrade-tinyos.html</a>. There are two ways to install
+      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 instally with RPMs.</p> 
+
+      <h1>One-step Install with a Live CD</h1>
+
+      <p><A
+      HREF="http://toilers.mines.edu/Public/XubunTOS">Download a
+      Linux live CD that has a TinyOS installation on it</A>. 
+      All you
+      need to do is download the CD image, burn it onto a CD, and
+      install from there. This saves you all of the complexities of
+      installation, and it's the recommended way to install
+      TinyOS. The link above has complete instructions. The live CD is
+      provided by the Toilers group at the Colorado School of
+      Mines.</p>
+
+      <h1>Two-step install on your host OS with Debian packages</h1>
+
+   <p>If you are running a version of Linux that supports Debian packages, then
+   you may want to use the TinyOS package repository. There is a <A HREF="http://www.tinyos.net/scoop/story/2007/3/1/142950/4912">story on www.tinyos.net</A> 
+   that describes how to use it. If you do this, then you do not have to
+   install the instructions here, except that you will need to check
+   that your environment is set up correctly (the end of step 5 in
+    the manual installation.</p>
+
+      <h1>Manual installation on your host OS with RPMs</h1>
 <p>Currently, the TinyOS Core Working Group supports TinyOS on two platforms: Cygwin (Windows)
 and Linux. There have been some <A HREF="">successful efforts</A> to getting TinyOS environments working
 on Mac OSX, but OSX is not supported by the Core WG.</p>
 
+
 <p>Installing a TinyOS enviromnent has five basic steps; Windows requires an extra step,
 installing Cygwin, which is a UNIX-like environment. The steps are:</p>
 
@@ -47,7 +78,7 @@ installing Cygwin, which is a UNIX-like environment. The steps are:</p>
   that nesdoc uses to draw the diagrams.</li>
 </ol>
 
-<h1>Step 1: Install Java 1.5 JDK</h1>
+<h2>Step 1: Install Java 1.5 JDK</h2>
 
 <b>Windows</b><br>
 Download and install Sun's 1.5 JDK from <a href="http://java.sun.com">http://java.sun.com</a>.
@@ -56,7 +87,7 @@ Download and install Sun's 1.5 JDK from <a href="http://java.sun.com">http://jav
 <b>Linux</b><br>
 Download and install IBM's 1.5 JDK from <a href="http://www-128.ibm.com/developerworks/java/jdk/">http://www-128.ibm.com/developerworks/java/jdk/</a>.
 
-<h1>Step 2: Install Cygwin</h1>
+<h2>Step 2: Install Cygwin</h2>
 
 <font color=red> This step is required for Windows installations only. If you are installing
 on Linux, skip to step 3.</font>
@@ -72,6 +103,8 @@ work.
 
 <p>
 <ol>
+<li> Download and install Cygwin from <A HREF="http://www.cygwin.com">www.cygwin.com</A>.</li>
+<p>
 <li> Download the confirmed-compatible cygwin packages from the tinyos web site <a href="http://www.tinyos.net/dist-1.2.0/tools/windows/cygwin-1.2a.tgz">here</a>.
 <p>
 <li> In a cygwin shell, unzip the above package into some directory. In these instructions the directory is /cygdrive/c/newcygpkgs.
@@ -108,7 +141,7 @@ This unzips the packages.
 </ol>
 </ol>
 
-<h1>Step 3: Install native compilers </h1>
+<h2>Step 3: Install native compilers </h2>
 
 Install the appropriate version of the following (Windows or Linux,
 avr or msp430 or both) with the rpm command 'rpm -ivh <rpm>'. 
@@ -218,7 +251,7 @@ but they have not yet been extensively tested by a large community.)
 
 </tbody></table>
 
-<h1>Step 4: Install TinyOS toolchain</h1>
+<h2>Step 4: Install TinyOS toolchain</h2>
 
 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
@@ -226,13 +259,22 @@ also installed using rpms. If you using the Cygwin version recommended
 in these install
 instructions, you should install the "Recommended" Windows/Cygwin
 nesC RPM. 
-Try installing it and if it does not work (e.g., you
-get strange errors when you try to execute it), this may be due
+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
+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 <code>--ignoreos</code> 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-2.x/tinyos rpms  -------->
 </p><p><b><em>TinyOS-specific Tools</em></b>
 <table border="0">
@@ -246,24 +288,31 @@ add the <code>--ignoreos</code> option.
 
 <tr>
   <td>NesC</td>
-  <td><a href="http://www.tinyos.net/dist-1.2.0/tinyos/windows/nesc-1.2.7b-1.cygwin.i386.rpm">nesc-1.2.7b-1.cygwin.i386.rpm</a></td>
-  <td><a href="http://www.tinyos.net/dist-1.2.0/tinyos/windows/nesc-1.2.7a-1.cygwin.i386.rpm">nesc-1.2.7a-1.cygwin.i386.rpm</a></td>
-  <td><a href="http://www.tinyos.net/dist-1.2.0/tinyos/linux/nesc-1.2.7a-1.i386.rpm">nesc-1.2.7a-1.i386.rpm </a></td>
+  <td><a href="http://www.tinyos.net/dist-1.2.0/tinyos/windows/nesc-1.2.8a-1.cygwin.i386.rpm">nesc-1.2.8a-1.cygwin.i386.rpm</a></td>
+  <td><a href="http://www.tinyos.net/dist-1.2.0/tinyos/windows/nesc-1.2.8b-1.cygwin.i386.rpm">nesc-1.2.8b-1.cygwin.i386.rpm</a></td>
+  <td><a href="http://www.tinyos.net/dist-1.2.0/tinyos/linux/nesc-1.2.8a-1.i386.rpm">nesc-1.2.8a-1.i386.rpm </a></td>
   <td><a href=""></a><code>rpm -Uvh</code><br>
                      <code>rpm -Uvh --ignoreos</code> (if Cygwin complains)</td>
 </tr>
-
+<tr></tr>
+<tr>
+  <td bgcolor="#dddddd"><b>Tool</b></td>
+  <td bgcolor="#dddddd"><b>Windows/Cygwin</b></td>
+  <td bgcolor="#dddddd"><b>32-bit Linux</b></td>
+  <td bgcolor="#dddddd"><b>64-bit Linux</b></td>
+  <td bgcolor="#dddddd"><b>Command</b></td>
+</tr>
 <tr>
-  <td bgcolor="#dddddd">tinyos-tools</td>
-  <td bgcolor="#dddddd"><a href="http://www.tinyos.net/dist-2.0.0/tinyos/windows/tinyos-tools-1.2.3-1.cygwin.i386.rpm">tinyos-tools-1.2.3-1.cygwin.i386.rpm</a></td>
-  <td bgcolor="#dddddd"><a href="http://www.tinyos.net/dist-2.0.0/tinyos/windows/tinyos-tools-1.2.3-1.cygwin.i386.rpm">tinyos-tools-1.2.3-1.cygwin.i386.rpm</a></td>
-  <td bgcolor="#dddddd"><a href="http://www.tinyos.net/dist-2.0.0/tinyos/linux/tinyos-tools-1.2.3-1.i386.rpm">tinyos-tools-1.2.3-1.i386.rpm</a></td>
-  <td bgcolor="#dddddd"><a href=""></a><code>rpm -ivh --force</code>&nbsp;(1.x tree)<br><code>rpm -Uvh</code>&nbsp;(no 1.x tree)<br></td>
+  <td>tinyos-tools</td>
+  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/windows/tinyos-tools-1.2.4-2.cygwin.i386.rpm">tinyos-tools-1.2.4-2.cygwin.i386.rpm</a></td>
+  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/linux/tinyos-tools-1.2.4-2.i386.rpm">tinyos-tools-1.2.4-2.i386.rpm</a></td>
+  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/linux/tinyos-tools-1.2.4-2.i686.rpm">tinyos-tools-1.2.4-2.i686.rpm</a></td>
+  <td><a href=""></a><code>rpm -ivh --force</code>&nbsp;(1.x tree)<br><code>rpm -Uvh</code>&nbsp;(no 1.x tree)<br></td>
 </tr>
 
 </tbody></table>
 
-<h1>Step 5: Install the TinyOS 2.x source tree </h1>
+<h2>Step 5: Install the TinyOS 2.x source tree </h2>
 
 Now that the tools are installed, you need only install the tinyos 2.x 
 source tree and then set your environment variables.
@@ -273,7 +322,7 @@ 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
 <i>rpmname</i>'.
-
+<p>
 <ul>
 <li> Install tinyos-2.x
 <p>
@@ -290,8 +339,8 @@ bypass the erroneous error by using 'rpm -ivh --ignoreos
 
 <tr>
   <td>TinyOS</td>
-  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/windows/tinyos-2.0.0-1.cygwin.noarch.rpm">tinyos-2.0.0-1.cygwin.noarch.rpm</a></td>
-  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/linux/tinyos-2.0.0-1.noarch.rpm">tinyos-2.0.0-1.noarch.rpm</a></td>
+  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/windows/tinyos-2.0.2-2.cygwin.noarch.rpm">tinyos-2.0.2-2.cygwin.noarch.rpm</a></td>
+  <td><a href="http://www.tinyos.net/dist-2.0.0/tinyos/linux/tinyos-2.0.2-2.noarch.rpm">tinyos-2.0.2-2.noarch.rpm</a></td>
 </tr>
 
 </tbody></table>
@@ -364,9 +413,29 @@ groups: </li>
 -->
 </code></code></li></ol>
 
+
+
+
+<li><p>Finally, if you have installed TinyOS 2.0.1, there is a bug in TOSSIM (which will be fixed in 2.0.2).
+The bug is in file <tt>tos/chips/atm128/sim/atm128_sim.h</tt>. Change these lines 22 and 23 from:
+
+<pre>
+#define _SFR_IO8(io_addr) _MMIO_BYTE((io_addr) + 0x20)
+#define _SFR_IO16(io_addr) _MMIO_WORD((io_addr) + 0x20)
+</pre>
+
+to
+
+<pre>
+#define _SFR_IO8(io_addr) _MMIO_BYTE((io_addr))
+#define _SFR_IO16(io_addr) _MMIO_WORD((io_addr))
+</pre>
+
+If you do not do this, then timers will not work correctly.
+
 </li></ul>
 
-<h1>Step 6: Installing Graphviz</h1>
+<h2>Step 6: Installing Graphviz</h2>
 
 <p>Go to <A HREF="http://www.graphviz.org/Download..php">download page</A> of the Graphviz project
 and download the appropriate RPM. You only need the basic graphviz RPM (<tt>graphviz-</tt>);