X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=doc%2Fhtml%2Finstall-tinyos.html;fp=doc%2Fhtml%2Finstall-tinyos.html;h=c8f05f8368ad698deba1ee60ddfe1fa1ff4e3867;hb=1ba974b83d19fc41bf80acd52726f36f7f1df297;hp=0000000000000000000000000000000000000000;hpb=4db69a460ad5d18d33cbf5c3ef74ad584d9e2886;p=tinyos-2.x.git diff --git a/doc/html/install-tinyos.html b/doc/html/install-tinyos.html new file mode 100644 index 00000000..c8f05f83 --- /dev/null +++ b/doc/html/install-tinyos.html @@ -0,0 +1,367 @@ + + + + + Installing TinyOS 2.0 + + + + +
Installing TinyOS 2.0
+
Last updated 12 June 2006
+ +

If you already have a 1.x tree, you are better off following the upgrade +instructions at upgrade-tinyos.html. + +

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 four basic steps; Windows requires an extra step, +installing Cygwin, which is a UNIX-like environment. The steps are:

+ +
    +
  1. Installing a Java 1.5 (Java 5) JDK. Java is the most common way of interacting + with mote base stations or gateways that are plugged into a PC or laptop.
  2. +
  3. Windows only. Install Cygwin. This gives you a shell + and many UNIX tools which the TinyOS environment uses, such as perl and shell + scripts.
  4. +
  5. 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.
  6. +
  7. 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.
  8. +
  9. Installing the TinyOS source tree. If you want to compile and + install TinyOS programs, you need the code.
  10. +
  11. 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.
  12. +
+ +

Step 1: Install Java 1.5 JDK

+ +Windows
+Download and install Sun's 1.5 JDK from http://java.sun.com. + +

+Linux
+Download and install IBM's 1.5 JDK from http://www-128.ibm.com/developerworks/java/jdk/. + +

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 the confirmed-compatible cygwin packages from the tinyos web site here. +

    +

  2. In a cygwin shell, unzip the above package into some directory. In these instructions the directory is /cygdrive/c/newcygpkgs. +
    +     $ cd /cygdrive/c/newcygpkgs
    +     $ tar zxvf cygwin-1.2a.tgz 
    +
    +This unzips the packages. +

    +

  3. In Windows Explorer, navigate to /cygdrive/c/newcygpkgs and click on the file setup.exe. Setup.exe is the setup program distributed by Cygnus Solutions. +

    +

  4. Follow these steps when the Cygwin Setup windows appears: +
      +
    +
  5. Opt to disable the virus scanner (it will be enabled when you're finished). +

    +

  6. Opt to Install from Local Directory. +

    +

  7. Specify the Root directory to be where your current cygwin installation is. This would be the directory that directories like 'opt' and 'usr' are in. For example, mine is rooted at c:\tinyos\cygwin, so I enter that. +

    +

  8. Select to Install for All Users +

    +

  9. Select the Unix file type (very important!) +

    +

  10. For the Local Packages Directory, specify where you unzipped the cygwin packages tarfile. For example, I would specify c:\newcygpkgs. (The setup.exe program will probably select the right default directory.) +

    +

  11. The next window will allow you to select packages to install. You should see that most of the packages have an X-ed box next to them; these are the packages that are to be installed. +

    +

  12. Click install. Some notes: + +
+ + +

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 '. +On +windows, 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'. +(We have xscale +compiler tools online at +http://www.tinyos.net/dist-1.2.0/tools/ +but they have not yet been extensively tested by a large community.) + + +

Atmel AVR Tools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ToolWindows/CygwinLinux
avr-binutilsavr-binutils-2.15tinyos-3.cygwin.i386.rpmavr-binutils-2.15tinyos-3.i386.rpm
avr-gccavr-gcc-3.4.3-1.cygwin.i386.rpm avr-gcc-3.4.3-1.i386.rpm
avr-libcavr-libc-1.2.3-1.cygwin.i386.rpmavr-libc-1.2.3-1.i386.rpm
avariceavarice-2.4-1.cygwin.i386.rpmavarice-2.4-1.i386.rpm
insight (avr-gdb)avr-insight-6.3-1.cygwin.i386.rpmavr-insight-6.3-1.i386.rpm
+If you receive an rpm error that indicates that you have a newer version already installed, try rpm -Uvh --force + + +

TI MSP430 Tools + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ToolWindows/CygwinLinux
basemsp430tools-base-0.1-20050607.cygwin.i386.rpmmsp430tools-base-0.1-20050607.i386.rpm
python toolsmsp430tools-python-tools-1.0-1.cygwin.noarch.rpmmsp430tools-python-tools-1.0-1.noarch.rpm
binutils msp430tools-binutils-2.16-20050607.cygwin.i386.rpmmsp430tools-binutils-2.16-20050607.i386.rpm
gccmsp430tools-gcc-3.2.3-20050607.cygwin.i386.rpmmsp430tools-gcc-3.2.3-20050607.i386.rpm
libcmsp430tools-libc-20050308cvs-20050608.cygwin.i386.rpmmsp430tools-libc-20050308cvs-20050608.i386.rpm
jtagNot yet availablemsp430tools-jtag-lib-20031101cvs-20050610.i386.rpm
gdbNot yet availablemsp430tools-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. + +

TinyOS-specific Tools + + + + + + + + + + + + + + + + + + + + + + +
ToolWindows/CygwinLinuxCommand
NesCnesc-1.2.7a-1.cygwin.i386.rpmnesc-1.2.7a-1.i386.rpm rpm -Uvh
tinyos-toolstinyos-tools-1.2.2-1.cygwin.i386.rpmtinyos-tools-1.2.2-1.i386.rpmrpm -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 '. +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'. + + + +

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.

+ + +