Difference between revisions of "Installing Blink on the Imote2"

From Cyber-Physical Systems Laboratory
Jump to navigationJump to search
(New page: This page displays the output of a successful compilation and installation of Blink, an application that periodically blinks the red LED. It is here to serve as a reference for what correc...)
 
 
Line 1: Line 1:
 
This page displays the output of a successful compilation and installation of Blink, an application that periodically blinks the red LED. It is here to serve as a reference for what correct output should look like. There are actually two commands. The first compiles Blink for the Imote2 platform. The second command uses USBLoaderHost.exe to program the binary image onto the mote.  
 
This page displays the output of a successful compilation and installation of Blink, an application that periodically blinks the red LED. It is here to serve as a reference for what correct output should look like. There are actually two commands. The first compiles Blink for the Imote2 platform. The second command uses USBLoaderHost.exe to program the binary image onto the mote.  
  
 +
== Compiling Blink ==
 
<pre>
 
<pre>
 
Liang Fok@liang-mbp /opt/tinyos-1.x/apps/Blink
 
Liang Fok@liang-mbp /opt/tinyos-1.x/apps/Blink
Line 40: Line 41:
 
make: dwarf2bd: Command not found
 
make: dwarf2bd: Command not found
 
make: *** [bin] Error 127
 
make: *** [bin] Error 127
 +
</pre>
 +
 +
== Installing Blink ==
 +
Installing Blink uses the USBLoaderHost.exe program, which is found in /opt/tinyos-1.x/contrib/imote2/tools/bin/USBLoaderHost.exe.
 +
 +
<pre>
 +
Liang Fok@liang-mbp /opt/tinyos-1.x/apps/Blink
 +
$ USBLoaderHost -p build/imote2/main.bin.out
 +
Program Mode, File name = build/imote2/main.bin.out
 +
File Size 135604
 +
Device detected
 +
Device detected
 +
GET_IMAGE_DETAILS Received.
 +
ImgSize=135604, Num Packets= 2224
 +
Total Packets Uploaded = 0, 0.00% completed
 +
Sending CRC Check command 8275
 +
Total Packets Uploaded = 546, 24.00% completed
 +
Sending CRC Check command 55726
 +
Total Packets Uploaded = 1092, 49.00% completed
 +
Sending CRC Check command 29262
 +
Total Packets Uploaded = 1638, 73.00% completed
 +
Sending CRC Check command 15570
 +
Total Packets Uploaded = 2184, 98.00% completed
 +
Sending CRC Check command 31793
 +
Image Download Completed
 +
CRC of the Image = 5099, Total Size = 135604
 +
Time taken for Upload 7474 Milli Seconds
 +
Image Verification Completed.
 +
Loading Image to boot location and marking it as golden.
 +
Time Elapsed till IMG_VERIFY 10318 Milli Seconds
 +
Time Elapsed 16272 Milli Seconds
 +
Successfully copied image to boot location.
 +
 +
Mapped Boot Image to golden. Booting New Image.
 +
 +
Overall Time Elapsed 18866 Milli Seconds
 
</pre>
 
</pre>

Latest revision as of 02:11, 25 August 2009

This page displays the output of a successful compilation and installation of Blink, an application that periodically blinks the red LED. It is here to serve as a reference for what correct output should look like. There are actually two commands. The first compiles Blink for the Imote2 platform. The second command uses USBLoaderHost.exe to program the binary image onto the mote.

Compiling Blink

Liang Fok@liang-mbp /opt/tinyos-1.x/apps/Blink
$ make imote2
mkdir -p build/imote2
xscale-elf-as -mcpu=iwmmxt -mfpu=softfpa -defsym BOOTLOADER=1 /opt/tinyos-1.x/to
s/platform/pxa27x/../imote2/flash.s /opt/tinyos-1.x/tos/platform/pxa27x/../imote
2/binarymover.s /opt/tinyos-1.x/tos/platform/pxa27x/barecrt.s /opt/tinyos-1.x/to
s/platform/pxa27x/mmu_table.s /opt/tinyos-1.x/tos/platform/pxa27x/util.s  -o bui
ld/imote2/asms.o
cd /opt/tinyos-1.x/tos/platform/pxa27x/lib; make; cd /opt/tinyos-1.x/tos/platfor
m/imote2/devices/USB/lib; make;
make[1]: Entering directory `/opt/tinyos-1.x/beta/platform/pxa27x/lib'
make[1]: `libimote2.a' is up to date.
make[1]: Leaving directory `/opt/tinyos-1.x/beta/platform/pxa27x/lib'
make[1]: Entering directory `/opt/tinyos-1.x/beta/platform/imote2/devices/USB/li
b'
make[1]: `libusb.a' is up to date.
make[1]: Leaving directory `/opt/tinyos-1.x/beta/platform/imote2/devices/USB/lib
'
    compiling Blink to a imote2 binary
ncc -o build/imote2/main.exe -O1 -g -I/opt/tinyos-1.x/tos/lib/CC2420Radio -I/opt
/tinyos-1.x/tos/lib/Flash -I/opt/tinyos-1.x/tos/platform/imote2/devices/USB/ -I/
opt/tinyos-1.x/tos/platform/imote2/devices/USB/lib  -DAUTO_BATTERY_MONITORING=1
-Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=imote2 -fnesc-cfile=bu
ild/imote2/app.c -board= -DBOOTLOADER -DIDENT_PROGRAM_NAME=\"Blink\" -DIDENT_USE
R_ID=\"LiangFok\" -DIDENT_HOSTNAME=\"liang-mbp\" -DIDENT_USER_HASH=0x2e273585L -
DIDENT_UNIX_TIME=0x4a934635L -DIDENT_UID_HASH=0xf4073381L Blink.nc -lm  build/im
ote2/asms.o /opt/tinyos-1.x/tos/platform/pxa27x/lib/libimote2.a /opt/tinyos-1.x/
tos/platform/pxa27x/../imote2/devices/USB/lib/libusb.a
    compiled Blink to build/imote2/main.exe
          135604 bytes in ROM
           11940 bytes in RAM
            9216 bytes in STACK
          240988 bytes available in HEAP
xscale-elf-objcopy --output-target=binary build/imote2/main.exe build/imote2/mai
n.bin.out
dwarf2bd -nc build/imote2/main.exe
make: dwarf2bd: Command not found
make: *** [bin] Error 127

Installing Blink

Installing Blink uses the USBLoaderHost.exe program, which is found in /opt/tinyos-1.x/contrib/imote2/tools/bin/USBLoaderHost.exe.

Liang Fok@liang-mbp /opt/tinyos-1.x/apps/Blink
$ USBLoaderHost -p build/imote2/main.bin.out
Program Mode, File name = build/imote2/main.bin.out
File Size 135604
Device detected
Device detected
GET_IMAGE_DETAILS Received.
ImgSize=135604, Num Packets= 2224
Total Packets Uploaded = 0, 0.00% completed
Sending CRC Check command 8275
Total Packets Uploaded = 546, 24.00% completed
Sending CRC Check command 55726
Total Packets Uploaded = 1092, 49.00% completed
Sending CRC Check command 29262
Total Packets Uploaded = 1638, 73.00% completed
Sending CRC Check command 15570
Total Packets Uploaded = 2184, 98.00% completed
Sending CRC Check command 31793
Image Download Completed
CRC of the Image = 5099, Total Size = 135604
Time taken for Upload 7474 Milli Seconds
Image Verification Completed.
Loading Image to boot location and marking it as golden.
Time Elapsed till IMG_VERIFY 10318 Milli Seconds
Time Elapsed 16272 Milli Seconds
Successfully copied image to boot location.

Mapped Boot Image to golden. Booting New Image.

Overall Time Elapsed 18866 Milli Seconds