Tmote Macintosh install
From TinyWiki
Contents |
[edit]
Getting Tmotes and TinyOS to work on Mac OS X
[edit]
Useful links
- http://www.allthingsalceste.com/tinyos-on-mac-os-x/
- http://www.eecs.harvard.edu/~mdw/proj/tinyos-macos/
[edit]
Instructions
- install the Apple Developer Tools that are on your install DVD
- if you don't have your DVD they can be found here
- Install wget
fink install wget
- Install textutils (for
sha1sum)fink install textutils
- Download TinyOS must be version tos-1-1-15Dec2005cvs-release
- First log in anonymously:
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
- The checkout the cvs release
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -r tos-1-1-15Dec2005cvs-release tinyos-1.x/
- Install FTDI drivers for MacOS from here
- Plug in a TMote Sky mote and verify that it is detected as
/dev/tty.usbserial-M4A444LX(or something similar). - Apply the following patch to
tools/src/mspgcc/build-mspgcc - Install the
msp-gcccd tools/src/mspgcc./build-mspgcc install
- Download
nesc-1.2.4.tar.gzfrom the NesC sourceforge page. - Unpack
nesc-1.2.4.tar.gz - Edit
nesc-1.2.4/src/libcompat/pages.cand comment out line 184/* #define USE_MMAP */
- Build and install NesC with:
DEFAULT_TARGET=telos ./configuremakesudo make install
- Install
ncccd tools/src/nccDEFAULT_TARGET=telos ./Bootstrap./configuremakesudo make install
- Add the following to the
~/.bash_profilefileexport MSPGCCROOT=/opt/msp430export TOSROOT=$HOME/Documents/tinyos-1.xexport TOSDIR=$TOSROOT/tosexport MAKERULES=$TOSROOT/tools/make/Makerulesexport PATH="$MSPGCCROOT/bin:$PATH
- Make a slight change to
tools/src/sf/sfsource.c:saferead(). After the return fromread(), change the next line toif (n == -1 && (errno == EINTR || errno == EAGAIN))- This allows the C-based SerialForwarder to work. Build it by typing
make. - This change has been commited to CVS
- Replace
tools/java/net/tinyos/packet/SerialByteSource.javawith the version found here- This version is a stub that will not actually attempt to access the serial port, but also does not depend on javax.comm (which does not appear to be available for MacOS/Intel). You must use the C-based serial forwarder. Alternately you can try to install tinyos-1.x/beta/TOSComm but I have not tried this option.
- Install msp430-bsl
sudo ln -sf $TOSDIR/../tools/src/mspgcc-pybsl/bsl.py /usr/local/bin/msp430-bsl
- Apply the following patch to
tools/make/msp/bsl.extra- bsl.extra.patch
- This allows for calling
make telosb/tmote installwithout having to specify the/dev/tty.usbserial-<serial> everytime
- Download the Mac OS X version of motelist
- Put it in
/usr/local/bin sudo chmod +x /usr/local/bin/motelist-macosln -sf /usr/local/bin/motelist-macos /usr/local/bin/motelist
- Put it in
[edit]
Testing
You should now be able to install TinyOS binaries on motes
- Try building the Blink application
cd apps/Blinkmake telosb install
- You should also be able to talk to motes over the serial port by starting up the C-based serialforwarder:
cd tools/src/sf./sf 9001 /dev/tty.usbserial-<serial>57600 telos &./sflisten localhost 9001
