ENALAB Resources for Intel's iMote2 Node
This page contains links to documentation and software for using the Intel Mote2 with the SOS operating system. This page is work in progress and continuously updated. Please re-visit frequently for additional information and updates.
ENALAB Users iMote2 Quick Start Guide
(assuming that you are already familiar with using SOS)
To get started with iMote2 you need to download/install the following:
- If you are running Windows you need Cygwin with gcc, make, Python and Perl
- SOS head - a good place to install SOS is inside Cygwin, under /opt. This means SOS will be at /opt/sos-1.x.
- Wasabi-3.3.1 Toolchain - unzip it into the Cygwin folder.
- McGaigor's Raven JTAG - you need to set you parallel port to ECP mode and set the parallel port's IO range 0x378 - 0x37F for the JTAG to work properly. On some computers, this is set in the BIOS.
If you going to use the Intel JTAG, you should set the PXA27X_JTAG_DEV variable to "INTEL(R) JTAG CABLE" (either by exporting it from your .bashrc or .profile, or by adding it inline when you make imote2). - To program the FLASH using the JTAG you also need to use the XFLASH utility. This is found in the Intel C++ Software Development Toolsuite -- click on Get Evaluation. (the toolsuite comes with a 30-day evaluation, XFLASH will continue to work after the evaluation expiration - refer to the internal site for more details). The Intel C++ Software Development Suite also includes a graphic debugging environement called xdb that you can use for debugging. Alternatively, you can you the JTAG with gdb or Insight - you need to setup the gdb.init file to configure.
Note: the Intel installation program may ask you to close Netscape (whether or not it is running) and automatically close itself. Or it may just decompress some files but not execute anything. If any such thing happens, go to the temporary folder where the installation files where decompressed (usually C:\DOCUME~1\<username>\LOCALS~1\Temp\w_xisdt_u_2.0.052, unless you selected another directory) and run setup.exe manually. - Download the hardware support package for the RAVEN JTAG from Macraigor.
- Download the iMote drivers and unzip them to a temporary folder. Connect the USB cable onto the iMote programming daughter-board and use the downloaded drivers when prompted by Windows' hardware detection wizard.
- Download xflash_imote2.zip and unzip into the xflash folder, c:\Program Files\Intel\SDT2.0.1\xflash, overwriting files as needed.
Once you have all the software installed, you are ready to use iMote2 with SOS.
$ cd config/blink
$ make clean
$ make imote2
If your toolchain is installed properly this should compile into a binary image. The binary image that you will be programming in the iMote2 FLASH is blink_app.bin.out
To program the FLASH with the binary file you generated you can use the XFLASH utility. XFLASH is found at Intel's website.
To program the FLASH you need to update 2 files in your XFLASH utility (these are typically found at C:\Program Files\Intel\SDT2.0.1\xflash). These are boards.ini and imote2.fcf, which you copied into your xflash folder in step 8, above. The two files specify the memory locations for RAM, FLASH & Monitor program where programs will be loaded.
To burn your program to FLASH type:
$ make imote2 install
If the node blinks then your toolchain is up & running!!!
Debugging with GDB or Insight
Assuming that you are using a RAVEN JTAG, first you need to start a demon program
$ ocdremote.exe -c pxa27x -d RAVEN -s 1
Then go into your project's folder and make sure it has a .gdbinit file which points to the correct .elf file under symbol-file. If the file does not exist, download it here and rename it from _gdbinit.txt to .gdbinit. From that folder, run the command:
$ xscale-elf-insight &
If your setup is correct, you should be able to see that ocdremote has accepted a connection from the debugger. Note: you have to resize the insight window to see the options for opening source files.
In case you get an error message about the size of the packet when running the insight debugger make sure you uncomment the corresponding two lines in the .gdbinit file.
Boot-up power hack
To have the iMote2 automatically boot up without the need to manually press it's reset button, you must short two pins as shown in this diagram.
For more details on toolchains refer to: Resources
| Attachment | Size |
|---|---|
| FTDI_Drivers_R2176.zip | 152.88 KB |
| build_imote2_toolchain.sh.txt | 1.62 KB |
| imote2_pinout.pdf | 872.33 KB |
| imote2_power_hack.png | 137.1 KB |