How to Work with TinyOS

This page shows how to compile a TinyOS program and install it on mote.

Typing motelist will display which nodes are currently plugged in:

node1-2:~# motelist
Reference  Device           Description
---------- ---------------- ---------------------------------------------
XBON3L3C   /dev/ttyUSB0     XBOW Crossbow Telos Rev.B

Compiling and Installing

We compile TinyOS applications with the program make The make command to compile a TinyOS application is make [platform], executed from the application's directory.

For example: To compile the Orbit traffic generator written for tinyos follow these steps

node1-2:cd /opt/tinyos-2.1.0/apps/OrbitMain

node1-2: make telosb install,[id] bsl,/dev/ttyUSB0

The output looks like

node1-2:/opt/tinyos-2.1.0/apps/OrbitMain# make telosb
mkdir -p build/telosb
    compiling OrbitMainC to a telosb binary
ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"root\" -DIDENT_HOSTNAME=\"node1-2.sb7.orb\" -DIDENT_USERHASH=0xabf5e143L -DIDENT_TIMESTAMP=0x495155d8L -DIDENT_UIDHASH=0xde29f8c9L -lm 
    compiled OrbitMainC to build/telosb/main.exe
            2650 bytes in ROM
              55 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
    writing TOS image
Last modified 12 years ago Last modified on Feb 18, 2009, 11:10:00 PM
Note: See TracWiki for help on using the wiki.