TinyOS Installation TinyOS Installation on MS-Windows Tools Description TinyOS Directories and Environment Aliases and Customization SMARTER SENSORS IN SILICON 1
What You Need Crossbow's TinyOS Support Tools CD-ROM MS Windows (XP, 2k, 98, NT) 1 GB or more of free space in destination drive 550 MB or more of space in C drive, regardless of destination drive or set the TEMP directory to your destination drive WinZip Acrobat PDF Reader Hardware MIB510CA or 500CA, 2 MICA2s, AA batteries; AC wall power adaptor Parallel printer (MIB500 only) and serial port cable SMARTER SENSORS IN SILICON 2
Changing the TEMP Directory Start>Settings>Control Panel>System Click on Advanced Tab Click on Environment Variables Select TEMP in the User Variables area; click on Edit Edit the Variable value box to the drive with > 1 GB of space. Example: Change the default (as shown here) to D:\TEMP Click OK when done SMARTER SENSORS IN SILICON 3
Installation Flow Log on with administrator privileges For Windows NT you must log on as administrator Time to complete TinyOS installation: 40 to 90 minutes for most Pentium III and faster systems Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up aliases and Makelocal file SMARTER SENSORS IN SILICON 4
Uninistalling Previous Versions of TinyOS on Windows Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases TinyOS 1.0 or earlier If you installed using the Installshield Wizard, use the Remove option under Add/Remove Programs, but save your work first. Don't worry about incomplete removal, but do delete any left over files. If you didn't use an InstallShield, remove manually the following files: Cygwin (Windows only); avr-gcc, avr-binutils, avr-libc (possibly the WinAVR package on Windows, possibly some rpms); previous versions of nesc; previous versions of uisp Then do Start>Run... Then type regedit Look for a folder labeled Cygnus Solutions under HKEY_LOCAL_MACHINE\SOFTWARE If it exists, select and delete the folder SMARTER SENSORS IN SILICON 5
Xbow's TinyOS Support CD-ROM Click on TinyOS Install folder Double click on tinyos-1.1.0-1is.exe This window opens when you put in the CD-ROM This is the first level structure of the CD-ROM SMARTER SENSORS IN SILICON 6
IS Wizard (1): Disk Space Check If you see this, you don't have enough disk space Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases Then you can select for another drive or cancel the installation. SMARTER SENSORS IN SILICON 7
IS Wizard (2): Setup Type This step may take 3-5 minutes Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases A) Choose Complete or Custom ( Complete is recommended) B) Select Destination Folder (default is recommended) C) Select Next> SMARTER SENSORS IN SILICON 8
IS Wizard (3): Java License, File Copy A) Click Yes or No to Java License Agreement ( Yes recommended) Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases B) Click on Next to Start Copying Files SMARTER SENSORS IN SILICON 9
InstallShield Wizard (4) A) Wait for copying to complete Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases B) Click on Continue SMARTER SENSORS IN SILICON 10
InstallShield Wizard (5) Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM A) Cygwin setup (no action required) Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases B) Cygwin window opens: Wait for RPMs to install SMARTER SENSORS IN SILICON 11
What's Being Installed? TinyOS & Tools: event-driven OS for wireless sensor networks; tools for debugging nesc: a extension of C-language designed for TinyOS Converts the various TinyOS componets to C code and merges them into one big C file called app.c Cygwin: a Linux-like environment for Windows AVR Tools: a suite of software development tools for Atmel's AVR processors Java 1.4 JDK & Java COMM 2.0: for host PC applications and port communications Graphviz (from AT&T Labs): to view files made from make docs SMARTER SENSORS IN SILICON 12
Directory Structure (1): to tinyos-1.x Local Disk (C:) or install drive tinyos ATT cygwin cygwin-installation jdk_1.4.1_02 bin etc home lib opt tmp usr var tinyos-1.x SMARTER SENSORS IN SILICON 13
Directory Structure (2): tinyos-1.x tinyos-1.x apps contrib doc tools tos Standard TinyOS applications and test programs User contributions Documentation and On-line Tutorial Development utilities and programs TinyOS modules and interfaces SMARTER SENSORS IN SILICON 14
Directory Structure (3): tos Subdirectory tos interfaces lib platform sensorboards system types Interfaces for TinyOS component Libraries, including TinyDB, Route Drivers for mote hardware Drivers for sensor boards Drivers for the mote system EEPROM, UART Special type definitions SMARTER SENSORS IN SILICON 15
TinyOS 1.1.0 Install Complete Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up aliases and Makelocal file Installation done? Open a Cygwin window (an icon should be on the desktop) Type in toscheck The last line should say, toscheck completed without errors. Problems? Notify a Crossbow Trainer SMARTER SENSORS IN SILICON 16
Aliases Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up aliases and Makelocal file Edit the file in C:\tinyos\cygwin\etc\profile Two useful aliases are alias cdjava="cd /opt/tinyos-1.x/tools/java" alias cdapps="cd /opt/tinyos-1.x/apps" Create aliases for faster navigation in TinyOS and for command shortcuts SMARTER SENSORS IN SILICON 17
TinyOS Applications Developement Create Application by wiring interfaces Build (compile) Application with make Install the executable (binary file) on target hardware via MIB nesc locates & precompiles all required components avr-gcc gnu compiles / assembles modules for specified platform avr-ld gnu links into an executable for a specific target required components Debug Application using LEDs and/or JTAG SMARTER SENSORS IN SILICON 18
TinyOS make Command (1) make (re)install.<nodeid> <platform> This command line sets the node address during a program load.<nodeid> to assign a decimal number to a mote Use numbers 0 through 255 install to compile, download binary to hardware platform; reinstall to download binary to hardware only. This option is significantly faster SMARTER SENSORS IN SILICON 19
TinyOS make Command (2) For <platform> select from mica2 or mica2dot or mica for MICA2, MICA2DOT, or MICA, respectively all for all platforms make clean to erase all built files, cleanup. make docs to generate documentation make pc to similuate on PC SMARTER SENSORS IN SILICON 20
Programming Interface Boards (1) TinyOS supports a variety of programming hardware devices MIB510CA: serial port programming board E.g.: $ MIB510=/dev/ttyS0 make install mica2 where S0 is for COM1, S2 for COM2, etc. For users of USB to DB9 Serial converters, you must know port (COM) number assigned to the USB port. MIB500CA: parallel port programmer w/ serial output This is the default programming device. No additional parameters needed SMARTER SENSORS IN SILICON 21
Mote Transciever Frequency Both MICA2 and MICA2DOT support multiple frequencies Motes have base frequencies of 315 MHz, 433 MHz, and 916 MHz Multiple channels can be programmed within each Radio tuning coefficients need to be edited in the file /tos/platform/mica2/cc1000const.h. SMARTER SENSORS IN SILICON 22
The makelocal file Uninstall previous TinyOS installations Set-up IS Wizard for TinyOS 1.1.0 from the Xbow CD-ROM Wait for IS Wizard to complete Run toscheck Set-up Makelocal and aliases For many TinyOS applications, the user may use certain build parameters for specific needs The Makelocal file is useful to customize your build environment. (See example below) Sets your local group under to 0x33 (51 in decimal) # Makelocal file DEFAULT_LOCAL_GROUP = Ox33 PFLAGS += -DCC1K_DEF_FREQ=915988000 MIB510=/dev/ttyS0 Sets your mote frequency to 915.988 MHz Sets the default programmer to be an MIB510 on COM1 SMARTER SENSORS IN SILICON 23
Summary for Session 2, Day 1 TinyOS 1.1.0 installation completed toscheck ran to confirm the correct installation Brief description of what and where files were installed Aliases setup for faster navigation to common TinyOS directories Programming (build) environment configured with Makelocal file SMARTER SENSORS IN SILICON 24