Installing TinyOS Developing Environment Test Program: Blink
Installing TinyOS Execute “setup.exe” in the CD which is in the ZigbeX box. It will take about min. When the setup is done, the icon of “cygwin” is shown on the front page. Copy “hanback_zigbex.zip” and “install.sh” of the folder “hanback_zigbex” in the CD to c:/Program Files/UCB/cygwin/opt. Click “cygwin” and do the following. cd /opt./install.sh
Installed programs TinyOS –TinyOS tools –nesC –cygwin Support tools –Java 1.4 JDK –Java COMM2.0 –Graphviz AVRtools –avr-binutils –avr-libc –avr-gcc
Installing ISP program Execute “setup.exe” in the ISP folder of the CD and install “PonyProg.” PonyProg –Serial device programmer
PonyProg Open PonyProg. Select “interface setup” of the setup menu. After installing, press OK in the I/O port setup menu. If probe fails, change the printer port to ECP or ECP+EPR mode. After that, do calibration. –Press yes.
Compiling Test Program: Blink Start cygwin. Do the following –cd /opt/tinyos-1.x/apps/ –cd Blink –make zigbex The Blink program is written in nesC, and is compiled, generating “main.hex” file which is a binary code for the device.
Modifying bash_profile Open bash_profile using vi editor. –vi ~/.bash_profile Add the following lines. –export DBG=led –export –export tinyviz=/opt/tinyos- 1.x/tools/java/net/tinyos/sim/tinyviz –export main=build/pc/main Save the file and exit.
Programming Blink Execute PonyProg. Open the “main.hex” of Blink file. –C:/Program Files/UCB/cygwin/opt/tinyos- 1.x/apps/Blink/build/zigbex –In the menu, select “AVR micro” and “ATmega128.” –In the “command” menu, select “write program(flash).”
Result of Blink program The Blink program will keep turning a LED on and off.