Skip to content
Hussein Marah edited this page Sep 13, 2024 · 6 revisions

Welcome to the Installing TinyOS wiki!

Installation

  1. JDK 1.7: Install jdk-7u7-windows-i586.exe
  2. Cygwin Version 2.774:
  • Open cygWinSetup.exe
  • Choose c:\cygwin as the root directory
  • Accept all default package and start the installation.
  • Search rpm package and install its 3 component from util package. (Note: don’t install entire util package).
  • Search python package and install its 4 component from devel package. (Don’t install entire devel package).
  • Search gcc package and install it from base and devel packages. (From devel package just install those which start with gcc4).
  • Finish installation.
  1. Copy AVR files, nesC and TinyOS rpm(s) files from «TinyOS Packages» folder in the Repository to your local path c:\cygwin\home\
  2. Start Cygwin.
  3. Type cd .. to change the current directory to the home directory. Now you have to see a command prompt like this: “Username@Username-PC” /home
  4. Install all rpm files by using the following command: rpm -ivh --ignoreos *.rpm
  5. After finishing the installation, repeat the command to ensure that the installation has succeeded. You have to see the following output:

snip_20200225140959

Setting Environment Variables

  1. We must set some environment variables in windows and Cygwin.
  • To set the Windows environment variable to go to: Control Panel > System > Advanced system setting > Environment Variables > New
  • And set the following variables:

  • Variable Value
  • CLASSPATH C:\cygwin\opt\tinyos-2.x\support\sdk\java\tinyos.jar;.\;..\;
  • MAKERULES C:/cygwin/opt/tinyos-2.x/support/make/Makerules
  • PATH C:\Program Files\Java\jdk1.7.0_07\bin

  • To set CygWin environment variable open the next file:
  • c:\cygwin\home\your user\.bash_profile
  • Now add the following lines to the end of it:
  • export MAKERULES=/opt/tinyos-2.x/support/make/Makerules
  • export TOSDIR=C:/cygwin/opt/tinyos-2.x/tos
  • CLASSPATH="$CLASSPATH;"

Now you have to copy some files to your Cygwin directory

  1. Unfortunately, TinyOS v2 is designed for JDK 1.6 and it cannot find the right path of JDK1.7 to copy the necessary files, and you should copy these files manually.
  2. Copy the files getenv-32.dll and toscomm-32.dll from CygWinSetup folder in the repository to C:\ProgramFiles\Java\jdk1.7.0_07\bin
  3. Also don't forget to copy cygmpfr-4.dll from CygWinSetup folder in the repository to c:\cygwin\bin
  4. Finally, open the "sim.extra" file in this path: cygwin\opt\tinyos-2.x\support\make and change line 10 as PYTHON_VERSION=2.7 since we are using Python version 2.7.
Clone this wiki locally