Here's a record of my experience with using Intel iMotes.
I first installed TinyOS v1.1.13, the iMote platform (cvs checkout tinyos-1.x/beta/platform/imote and tinyos-1.x/contrib/imote from TinyOS's CVS server), the GNU cross compiler (arm-thumb-elf-gcc-3.2-1.cygwin.i386.rpm), and the ADS tool chain (I'm using the evaluation version of the RealView Developer Suite, get a free CD here). To do this, I more-or-less followed the instructions in the README within <tos>/contrib/imote except I used the latest version of TinyOS (1.1.13).
After installing everything, I went into <tos>/contrib/imote/apps/Blink and tried to install it using "make install imote". I got the following error:
uisp -dprog=mib510 -dserial=/dev/ttyS5 --erase --upload if=build/imote/main.srec No part specified, supported devices are: AT90S4414 AT90S2313 AT90S1200 AT90S2323 AT90S2343 AT90S2333 AT90S4433 AT90S4434 AT90S8515 AT90S8535 AT90S8534 ATmega8515 ATmega8535 ATtiny11 ATtiny12 ATtiny15 ATtiny22 ATtiny26 ATtiny28 ATmega8 ATmega323 ATmega32 ATmega161 ATmega163 ATmega16 ATmega162 ATmega169 ATmega103 ATmega128
I fixed that by removing <tos>/apps/Makelocal. This file was left over from a previous project; it is not there by default.
Unfortunately, I ran into another problem:
Mobilab@PLUTO /opt/tinyos-1.x/contrib/imote/apps/Blink
$ make reinstall imote
installing imote binary
Licence found.
Your trial started at: Sat Jun 04 00:00:00 2005
Your trial will end at: Tue Jul 19 23:59:59 2005
cd build/imote; ./DynamicScriptConverter.exe; ./ZvDosFlashTool.exe -p2 -f -a -c -h;
Converting ZvDynamicScript script file.
Successfully read script file
Converting AppDynamicScript script file.
Successfully read script file
Successfully combined the image with dynamic configuration!!
====================================================================
= =
= Zeevo Bluetooth Flash Loader =
= =
= Development/Manufacturing Version =
= =
= Version Date: Feb 28 2003 =
= =
= Copyright 2001-2003 Zeevo, Inc. All Rights Reserved =
====================================================================
Using com2*** Can't Open COM? ***
The problem is the serial port specified within <tos>/contrib/imote/apps/Makerules is not correct. There is a line within Makerules that contains "ZvDosFlashTool.exe -p2 -f -a -c -h;". In my file, it is on line 512. The "-p2" attribute specifies COM2. If you're sure the serial port is set correctly, sometimes just disconnecting and reconnecting the iMote fixes the problem.
According to my Windows Device Manager, the iMote has two USB serial ports: 6 & 7. Unfortunately, neither -p6 or -p7 worked. I got the following error:
Mobilab@PLUTO /opt/tinyos-1.x/contrib/imote/apps/Blink
$ make reinstall imote
installing imote binary
Licence found.
Your trial started at: Sat Jun 04 00:00:00 2005
Your trial will end at: Tue Jul 19 23:59:59 2005
cd build/imote; ./DynamicScriptConverter.exe; ./ZvDosFlashTool.exe -p6 -f -a -c -h;
Converting ZvDynamicScript script file.
Successfully read script file
Converting AppDynamicScript script file.
Successfully read script file
Successfully combined the image with dynamic configuration!!
Invalid com port (6)
Press any key to exit.
The problem is ZvDosFlashTool.exe only supports COM1-4.
I went into Device Manager and changed COM6 to COM2. I couldn't move
COM7 because COM3-4 were in use, but having one serial port is enough to program
the iMotes with.
I
was
able
to
successfully
program
the
mote
by switching to "-p2" within Makerules. Here is the final
output:
Mobilab@PLUTO /opt/tinyos-1.x/contrib/imote/apps/Blink
$ make reinstall imote
installing imote binary
Licence found.
Your trial started at: Sat Jun 04 00:00:00 2005
Your trial will end at: Tue Jul 19 23:59:59 2005
cd build/imote; ./DynamicScriptConverter.exe; ./ZvDosFlashTool.exe -p2 -f -a -c -h;
Converting ZvDynamicScript script file.
Successfully read script file
Converting AppDynamicScript script file.
Successfully read script file
Successfully combined the image with dynamic configuration!!
====================================================================
= =
= Zeevo Bluetooth Flash Loader =
= =
= Development/Manufacturing Version =
= =
= Version Date: Feb 28 2003 =
= =
= Copyright 2001-2003 Zeevo, Inc. All Rights Reserved =
====================================================================
Using com2
Please reset the board.
Got reset signal.
Waiting for response...
Asking target changes baud rate to 921600
Data Length= 228
....
Got Baudrate Change Signal.
WinLoader changes baud rate to 921600
Sending UartFlashManager
Data Length= 372c
..............................
Wait for UartFlashManager response...
Target response received.
Updating Firmware
Converting ZvDynamicScript script file.
Successfully read script file
Converting AppDynamicScript script file.
Successfully read script file
Successfully combined the image with dynamic configuration!!
Save Database.
Erasing firmware area.
The file size is 315820 bytes
Programming the new firmware...
..49384 bytes programmed...
..82384 bytes programmed...
..115384 bytes programmed...
..148384 bytes programmed...
..181384 bytes programmed...
..214384 bytes programmed...
..247384 bytes programmed...
..280384 bytes programmed...
..313384 bytes programmed...
..
Firmware update complete.
make: *** [reinstall] Error 1
Ignore the alarming error message at the end; the mote was successfully programmed.
Mobilab@PLUTO /opt/tinyos-1.x/contrib/imote/apps/Blink
$ make install imote
compiling Blink to a imote binary
ncc -c -fshort-enums -mstructure-size-boundary=8 -mthumb-interwork -mcpu=arm7tdmi -o build/imote/main.exe.o -Os -board=i
motesb -target=imote -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -I/opt/tinyos-1.x/beta/platform/imote -I/opt/tin
yos-1.x/beta/platform/imote/imotelib -I/usr/local/include/ -finline-limit=100000 -fnesc-cfile=build/imote/app.c -DTINY_O
S -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipBase/\BlueOS -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipB
ase/\Common -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipBase/\StartUp -I/opt/tinyos-1.x/beta/platform/imote/zeev
o1.2/\ChipBase/\TargetManager -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipBase/\TargetSupervisor -I/opt/tinyos-1
.x/beta/platform/imote/zeevo1.2/\ChipBase/\Utilities -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\BTLLStack/\LinkMana
ger -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\BTLLStack/\LinkManager -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.
2/\LMU -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ULS -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\HCI -I/opt/ti
nyos-1.x/beta/platform/imote/zeevo1.2/\CountLED Blink.nc -lm
arm-thumb-elf-gcc: -lm: linker input file unused because linking not done
/cygdrive/c/Program\ Files/ARM/RVCT/Programs/2.1/350/eval2-sc/win_32-pentium/armlink -symdefs tmp.o -o build/imote/main.
exe -remove "(zi/dbg)" -scatter C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/ScatterFile.txt -map -list
fred.txt C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/Dfu_JumpTbl.sym C:/tinyos/cygwin//opt/tinyos-1.x
/beta/platform/imote/imotelib/RM_Rom1.sym C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/RM_Rom2.sym C:/t
inyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/SU_PatchVects.sym C:/tinyos/cygwin//opt/tinyos-1.x/beta/platfo
rm/imote/imotelib/SU_FlashBoot.o C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/motelib.a C:/tinyos/cygwi
n//opt/tinyos-1.x/beta/platform/imote/imotelib/GCCStub.o build/imote/main.exe.o C:/tinyos/cygwin//opt/tinyos-1.x/beta/pl
atform/imote/libgcc/libgcc.a
Licence found.
Your trial started at: Sat Jun 04 00:00:00 2005
Your trial will end at: Tue Jul 19 23:59:59 2005
Fatal error: L6579E: Cannot obtain license for Linker (feature eval_armlink_D97137A7) with license version >= 2.1:
Invalid host
The hostid of this system does not match the hostid
specified in the license file
Feature: eval_armlink_D97137A7
Hostid: 00054e4063c9
License path: C:\Program Files\ARM\Licenses\license.dat
FLEXlm error: -9,57
For further information, refer to the FLEXlm End User Manual,
available at "www.macrovision.com".
Not enough information to produce a SYMDEFs file.
Not enough information to list the image map.
Finished: 2 information, 0 warning, 0 error and 1 fatal error messages.
make: *** [build/imote/main.exe] Error 1
This is caused by not having the network interface that the license file is mapped to enabled. I got around it by re-enabling the network interface used by my license file (in this case, it was my laptop's wireless interface). Here's the final output:
Mobilab@PLUTO /opt/tinyos-1.x/contrib/imote/apps/Blink
$ make install imote
compiling Blink to a imote binary
ncc -c -fshort-enums -mstructure-size-boundary=8 -mthumb-interwork -mcpu=arm7tdmi -o build/imote/main.exe.o -Os -board=i
motesb -target=imote -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -I/opt/tinyos-1.x/beta/platform/imote -I/opt/tin
yos-1.x/beta/platform/imote/imotelib -I/usr/local/include/ -finline-limit=100000 -fnesc-cfile=build/imote/app.c -DTINY_O
S -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipBase/\BlueOS -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipB
ase/\Common -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipBase/\StartUp -I/opt/tinyos-1.x/beta/platform/imote/zeev
o1.2/\ChipBase/\TargetManager -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ChipBase/\TargetSupervisor -I/opt/tinyos-1
.x/beta/platform/imote/zeevo1.2/\ChipBase/\Utilities -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\BTLLStack/\LinkMana
ger -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\BTLLStack/\LinkManager -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.
2/\LMU -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\ULS -I/opt/tinyos-1.x/beta/platform/imote/zeevo1.2/\HCI -I/opt/ti
nyos-1.x/beta/platform/imote/zeevo1.2/\CountLED Blink.nc -lm
arm-thumb-elf-gcc: -lm: linker input file unused because linking not done
/cygdrive/c/Program\ Files/ARM/RVCT/Programs/2.1/350/eval2-sc/win_32-pentium/armlink -symdefs tmp.o -o build/imote/main.
exe -remove "(zi/dbg)" -scatter C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/ScatterFile.txt -map -list
fred.txt C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/Dfu_JumpTbl.sym C:/tinyos/cygwin//opt/tinyos-1.x
/beta/platform/imote/imotelib/RM_Rom1.sym C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/RM_Rom2.sym C:/t
inyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/SU_PatchVects.sym C:/tinyos/cygwin//opt/tinyos-1.x/beta/platfo
rm/imote/imotelib/SU_FlashBoot.o C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/motelib.a C:/tinyos/cygwi
n//opt/tinyos-1.x/beta/platform/imote/imotelib/GCCStub.o build/imote/main.exe.o C:/tinyos/cygwin//opt/tinyos-1.x/beta/pl
atform/imote/libgcc/libgcc.a
Licence found.
Your trial started at: Sat Jun 04 00:00:00 2005
Your trial will end at: Tue Jul 19 23:59:59 2005
C:/tinyos/cygwin//opt/tinyos-1.x/beta/platform/imote/imotelib/ScatterFile.txt(line 93, col 5) Warning: L6312W: Empty Exe
cution region description for region BRamNI
Creating requested ZI section 'TOSH_sched_free' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TOSH_sched_full' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TimerM$mState' (size = 4 bytes, alignment = 32).
Creating requested ZI section 'TimerM$mTimerList' (size = 12 bytes, alignment = 32).
Creating requested ZI section 'TimerM$mInterval' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'HPLClock$gmInterval' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TimerM$setIntervalFlag' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TOSH_queue' (size = 1024 bytes, alignment = 32).
Creating requested ZI section 'TimerM$queue_head' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TimerM$queue_tail' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TimerM$queue_size' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'TimerM$mScale' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'HPLClock$gmScale' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'HPLClock$gmCounter' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'LedsC$ledsOn' (size = 1 bytes, alignment = 8).
Creating requested ZI section 'HPLClock$systemTime' (size = 4 bytes, alignment = 32).
Creating requested ZI section 'TimerM$queue' (size = 1 bytes, alignment = 8).
Warning: L6332W: Undefined symbol __16__rt_sdiv (referred from BTLLStack_Link.o). Resolved to symbol __rt_sdiv.
Warning: L6332W: Undefined symbol __16__rt_memcpy (referred from BTLLStack_Link.o). Resolved to symbol __rt_memcpy.
Warning: L6332W: Undefined symbol __16__rt_udiv (referred from BTLLStack_Link.o). Resolved to symbol __rt_udiv.
Warning: L6332W: Undefined symbol __16__rt_memcpy_w (referred from BTLLStack_Link.o). Resolved to symbol __rt_memcpy_w.
Warning: L6332W: Undefined symbol __16_dflt (referred from BTLLStack_Link.o). Resolved to symbol _dflt.
Warning: L6332W: Undefined symbol __16_dmul (referred from BTLLStack_Link.o). Resolved to symbol _dmul.
Warning: L6332W: Undefined symbol __16_dfixu (referred from BTLLStack_Link.o). Resolved to symbol _dfixu.
Warning: L6332W: Undefined symbol __16__rt_divtest (referred from BTLLStack_Link.o). Resolved to symbol __rt_divtest.
Warning: L6332W: Undefined symbol __16_dfltu (referred from BTLLStack_Link.o). Resolved to symbol _dfltu.
Warning: L6332W: Undefined symbol __16_dcmpge (referred from BTLLStack_Link.o). Resolved to symbol _dcmpge.
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol TOS_post.
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol TOS_post.
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: main.exe.o(.text) contains branch to a non-code symbol [Anonymous Symbol].
Warning: L6318W: TOSClock.o(.text) contains branch to a non-code symbol RTOSClockInterrupt.
Warning: L6318W: ArmStub.o(.text) contains branch to a non-code symbol tinyos_run_task.
Warning: L6318W: ArmStub.o(.text) contains branch to a non-code symbol tinyos_main.
Finished: 17 information, 44 warning and 0 error messages.
compiled Blink to build/imote/main.exe
0 bytes in ROM
0 bytes in RAM
arm-thumb-elf-objcopy.exe --output-target=srec build/imote/main.exe build/imote/main.srec
make[1]: Entering directory `/opt/tinyos-1.x/contrib/imote/apps/Blink'
installing imote binary
Licence found.
Your trial started at: Sat Jun 04 00:00:00 2005
Your trial will end at: Tue Jul 19 23:59:59 2005
cd build/imote; ./DynamicScriptConverter.exe; ./ZvDosFlashTool.exe -p4 -f -a -c -h;
Converting ZvDynamicScript script file.
Successfully read script file
Converting AppDynamicScript script file.
Successfully read script file
Successfully combined the image with dynamic configuration!!
====================================================================
= =
= Zeevo Bluetooth Flash Loader =
= =
= Development/Manufacturing Version =
= =
= Version Date: Feb 28 2003 =
= =
= Copyright 2001-2003 Zeevo, Inc. All Rights Reserved =
====================================================================
Using com4
Please reset the board.
Got reset signal.
Waiting for response...
Asking target changes baud rate to 921600
Data Length= 228
....
Got Baudrate Change Signal.
WinLoader changes baud rate to 921600
Sending UartFlashManager
Data Length= 372c
..............................
Wait for UartFlashManager response...
Target response received.
Updating Firmware
Converting ZvDynamicScript script file.
Successfully read script file
Converting AppDynamicScript script file.
Successfully read script file
Successfully combined the image with dynamic configuration!!
Save Database.
Erasing firmware area.
The file size is 315532 bytes
Programming the new firmware...
..49384 bytes programmed...
..82384 bytes programmed...
..115384 bytes programmed...
..148384 bytes programmed...
..181384 bytes programmed...
..214384 bytes programmed...
..247384 bytes programmed...
..280384 bytes programmed...
..313384 bytes programmed...
..
Firmware update complete.
make[1]: *** [reinstall] Error 1
make[1]: Leaving directory `/opt/tinyos-1.x/contrib/imote/apps/Blink'
make: *** [install] Error 2
Again, ignore the last two errors.
I got the above error when trying to compile UartRelay. It was followed by a "Not enough information to produce a SYMDEFs file" error. The problem is due to a stack alignment problem with the object code. To fix the problem, I had to add "--diag_suppress 6238" to the armlink call within <tos>/contrib/imote/apps/Makerules. Specifically, line 562 of the Makerules file was changed from
$(LD) -symdefs tmp.o -o $(MAIN_EXE) . . .to:
$(LD) -symdefs tmp.o --diag_suppress 6238 -o $(MAIN_EXE) . . .
The iMote has two USB serial ports. I simply switched which serial port the Zeevo Bluetooth Flash Loader used. Click here to see how to switch serial ports. Also, sometimes just disconnecting and reconnecting the iMote solves the problem.