TinyOS on iMote's

Intro

This tentative guide intends to go on how to install TinyOs for the iMotes from Intel. These sensors have been dropped by Intel in favour of iMote2. In that sense no support is available and the latest TinyOS (2.x) does not support them (only iMote2).

So we’ll go through some steps to get TinyOS 1.1.15 with the iMote contrib working on Windows.

This guide had some input from the README in the iMote dir on TinyOS.

Requirements

  • Windows: the tools for flashing and interfacing the iMote are provided solely on windows by ARM

    • XP is the one used in this setup but may work with others
  • ADS tool: The final step of the build process requires the use of the ADS tool chain’s linker. This tool can be purchased from ARM. There is also an evaluation version (30 days) that can be ordered.

  • Cygwin: the TinyOS install above uses an old cygwin that does not work with the NesC compiler

  • TinyOS install executable: we first install the lower version and then updated it to 1.1.15.

    • although we used the 1.1.0 version others can also work (as stated here), this one is smaller in size than the others, though
  • TinyOS update rpm: to update to the 1.1.15 version

    • As part of this update the gcc cross compiler for arm should be installed. In case it isn’t, you can get it.
  • NesC compiler: this also needs to be updated

  • Beta and Contrib directories for iMote: these will be downloaded using cvs

  • Zeevo chip code: These files are related with chipset of the iMote. They are not available on the CVS version of TinyOS. Don’t know for what reason (the license does not state anything). They are available online on Harvard.

  • USB-Serial driver: it may not be needed as Windows can find it on windows.update for you, but in case it’s needed: FT2232.

Install

All commands below are done in a cygwin shell.

  1. Install TinyOS 1.1.0. It needs around 300MB for installation + 140MB for the install files

  2. Update the TinyOS to version 1.1.15 by installing the TinyOS update rpm and the NesC compiler using:

    $ rpm -Uvh --force tinyos-1.1.15Dec2005cvs-1.cygwin.noarch.rpm nesc-1.1.2b-1.cygwin.i386.rpm
    

you may need to add --ignoreos if it complains about the operating system target being NT_51.

  1. You should have the arm-thumb-elf-gcc-3.2-1 rpm installed (check with rpm -qa | grep arm) if you haven’t download it and install it:
$ rpm -ivh --ignoreos arm-thumb-elf-gcc-3.2-1.cygwin.i386.rpm
  1. Add the beta and contrib dirs to the TinyOS structure. This is done downloading the CVS snapshot. In a nutshell (using the cygwin shell):
$ cd $TOSROOT  
$ cd .. 
$ cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login

when prompted for a password give a blank one (hit enter)

$ cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-1.x/beta  
$ cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-1.x/contrib/imote

Note that the last command only gets the imote dir of contrib (it is very big to get everything). 4. Update the Cygwin environment. Just download the setup file and aim at only updating the cygwin specific packages. The gcc should be avoided, although the compilation of the TinyOS tools has been done in previous steps. If you do install the gcc opt for the 3.3 version. You may need to choose the make package as some dependencies may uninstall it. 5. Install the ADS tool form ARM. 1. After installing the license it is possible that a reboot may be needed. 6. Install the Zeevo files in the $TOSROOT/beta/platform/imote/zeevo1.2/ directory. In a nutshell (cygwin shell):

$ cd $TOSROOT/beta/platform/imote/  
$ wget -r -N -l inf -np -nH --cut-dirs=6 http://senseless.eecs.harvard.edu/repos/mainland-tinyos/tinyos-1.x/beta/platform/imote/zeevo1.2/
  1. Install the USB-Serial adapter for the iMote. After plugging the adapter with the programming board Windows should be able to find online the needed driver.If it doesn’t you can download the driver from FTDI site choosing the D2XX driver, more specifically the FT2232 device. Then point the windows installer to the unzipped directory.

    1. After this point check the COM ports that Windows used for the adapter as they are used in the flashing. (You can use the Device Manager through Start -> Control Panel -> Performance and Maintenance -> System -> Hardware tab -> Device Manager). The COM ports list should have the USB-Serial for the iMote. Note that two ports are instantiated, use one (lower ?).
  2. Test the installation. Connect a mote to the program board and

    $ cd $TOSROOT/contrib/imote/apps/Blink  
    $ make imote install
    

    You may be asked for the port to use (by default it uses COM2) use the value you found when installing the USB adapter above. You may change this default setting in the file $TOSROOT/contrib/imote/apps/Makerules, where ZvDosFlashTool.exe -p2 appears. The -p2 says it to use the 2nd COM port.

    1. You should now have the mote blinking different colours.
    2. If you didn’t install TinyOS or the ADS tools in the default location see the note on the iMote Make Rules.

Extra Notes

iMote Makerules

The $TOSROOT/contrib/imote/apps/Makerules that holds the rules to make the imotes firmware assumes the default location for the TinyOS and ADS tool. If you didn’t install some of them in the default places the make won’t work. Change the following variables in that file to point to the correct location:

  • TOS_ROOT
    • changing it to the correct path to the root of TinyOS (should be the same value as the environment $TOSROOT
  • IMOTE_LIB_DIR_ADS
    • changing it to the correct path to cygwin
  • LIBGCC_DIR
    • changing it to the correct path to cygwin
  • PFLAGS
    • this flag has a hard coded include instead of refereeing.

HyperTerminal Settings

The windows HyperTerminal program can be used to get/send the output/input on the imote’s COM port.The settings should be:

  • Connectt Using: The lowest COM port that is used by the imote (see point 7.1 above)
  • Bps: 115200
  • Data Bits: 8
  • Parity: None
  • Stop Bits: 1
  • Flow Control: Hardware
Previous
Next