Thursday, November 17, 2011

Pin Mappings Fiasco

The TelosB platform can be programmed using the bootstrap loader (msp430-bsl). This is the method that TinyOS uses in order to download a program onto the telosB platform.

During my course of changing the pin mappings in nanoRK to fit the telosB platform, I accidentally changed the pin mappings that are responsible for the boot strap loader (BSL) and uploaded a copy of this faulty program onto the telosB platform.

Programming via the BSL stopped working after I uploaded the faulty program. The telosB mote timeouts whenever I tried to program it using the BSL.


user@user-Vostro-1400:~$ motelist
Reference  Device           Description
---------- ---------------- ---------------------------------------------
XBTO6HS3   /dev/ttyUSB0     XBOW Crossbow Telos Rev.B

     
user@user-Vostro-1400:/opt/tinyos-2.1.1/apps/Blink$ make telosb install
mkdir -p build/telosb
   compiling BlinkAppC to a telosb binary
ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"tleong\" -DIDENT_HOSTNAME=\"tleong-Vostro-1\" -DIDENT_USERHASH=0xf6d09153L -DIDENT_TIMESTAMP=0x4ed53eceL -DIDENT_UIDHASH=0x3c06c8f9L  BlinkAppC.nc -lm
   compiled BlinkAppC to build/telosb/main.exe
           2648 bytes in ROM
             54 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
   writing TOS image
cp build/telosb/main.ihex build/telosb/main.ihex.out
   found mote on /dev/ttyUSB0 (using bsl,auto)
   installing telosb binary using bsl
tos-bsl --telosb -c /dev/ttyUSB0 -r -e -I -p build/telosb/main.ihex.out
MSP430 Bootstrap Loader Version: 1.39-telos-8
Mass Erase...

An error occurred:
Timeout
make: *** [program] Error 1

      
It actually took me a while to figure out that the pin mappings of the BSL was causing this problem. I first thought the mote was faulty but my the second telosB mote also showed the same symptom after being reprogrammed with the faulty program.

Therefore, programming via the BSL was not a viable option anymore. I had to resort to using the JTAG debugger/programmer to do so. I will talk more about this in my next posting.

No comments:

Post a Comment