Difference between revisions of "OpenOCD for IMote2 Wiggler"
(New page: === Build OpenOCD === * check out OpenOCD svn repository svn checkout http://svn.berlios.de/svnroot/repos/openocd/trunk openocd-svn * build OpenOCD with parallel port wiggler cd openo...) |
(→Build OpenOCD) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | == OpenOCD JTAG programming for IMote2 using pc parallel port Wiggler cable== | ||
+ | Wiggler cable is generically available and can also be made easily. The below instructions are for [http://www.diygadget.com/store/jtag-test-tool/wiggler-buffered-all-in-one-jtag-programmer-version-2/prod_33.html wiggler cable from Diy gadgets]. Instructions to make wiggler cable can be found [http://wiki.openwrt.org/OpenWrtDocs/Customizing/Hardware/JTAG_Cable here]. | ||
+ | |||
=== Build OpenOCD === | === Build OpenOCD === | ||
Line 16: | Line 19: | ||
sudo chmod 755 /usr/local/etc/arm-wiggler.cfg | sudo chmod 755 /usr/local/etc/arm-wiggler.cfg | ||
− | Get the arm-wiggler.cfg [ | + | Get the arm-wiggler.cfg [http://enl.usc.edu/~nilmish/arm-wiggler.cfg here] |
− | + | These instructions will install openocd to /usr/local/bin. Be sure this is on your PATH. | |
+ | |||
+ | === Program iMote2 with OpenOCD === | ||
+ | |||
+ | * Connect iMote2 to the debug board. | ||
+ | * Connect JTAG interface to debug board and then connect to PC parallel port. | ||
+ | * Press the reset button on the iMote2. | ||
+ | * compile binary: | ||
+ | cd /opt/tinyos-2.x/apps/Blink | ||
+ | make intelmote2 install.100 openocd | ||
+ | |||
+ | Note that this will try to run "imote2-ocd-program-wiggler.py" with the executable as an argument. This program is assumed to be in $TOSROOT/tools/platforms/intelmote2/openocd/; The script can be found at [http://enl.usc.edu/~nilmish/imote2-ocd-program-wiggler.py here]. Alternately, you can manually install the binary on the mote by running: | ||
+ | |||
+ | $TOSROOT/tools/platforms/intelmote2/openocd/imote2-ocd-program-wiggler.py build/intelmote2/main.exe | ||
+ | ==== Manual programming method. ==== | ||
+ | |||
+ | The above uses our custom "imote2-ocd-program-wiggler.py" program that is a wrapper for running openocd and programming the mote. You can also run openocd by hand: | ||
+ | |||
+ | openocd -f /usr/local/etc/arm-wiggler.cfg | ||
+ | and then connect to it with: | ||
+ | telnet localhost 3333 | ||
+ | |||
+ | Various commands you can use: | ||
+ | halt | ||
+ | poll | ||
+ | reset | ||
+ | resume | ||
+ | flash info 0 |
Latest revision as of 12:58, 11 August 2008
Contents
OpenOCD JTAG programming for IMote2 using pc parallel port Wiggler cable
Wiggler cable is generically available and can also be made easily. The below instructions are for wiggler cable from Diy gadgets. Instructions to make wiggler cable can be found here.
Build OpenOCD
- check out OpenOCD svn repository
svn checkout http://svn.berlios.de/svnroot/repos/openocd/trunk openocd-svn
- build OpenOCD with parallel port wiggler
cd openocd-svn ./bootstrap ./configure --enable-parport make
- install OpenOCD
sudo make install sudo chmod 4755 /usr/local/bin/openocd sudo mkdir -p /usr/local/etc sudo cp arm-wiggler.cfg /usr/local/etc sudo chmod 755 /usr/local/etc/arm-wiggler.cfg
Get the arm-wiggler.cfg here These instructions will install openocd to /usr/local/bin. Be sure this is on your PATH.
Program iMote2 with OpenOCD
- Connect iMote2 to the debug board.
- Connect JTAG interface to debug board and then connect to PC parallel port.
- Press the reset button on the iMote2.
- compile binary:
cd /opt/tinyos-2.x/apps/Blink make intelmote2 install.100 openocd
Note that this will try to run "imote2-ocd-program-wiggler.py" with the executable as an argument. This program is assumed to be in $TOSROOT/tools/platforms/intelmote2/openocd/; The script can be found at here. Alternately, you can manually install the binary on the mote by running:
$TOSROOT/tools/platforms/intelmote2/openocd/imote2-ocd-program-wiggler.py build/intelmote2/main.exe
Manual programming method.
The above uses our custom "imote2-ocd-program-wiggler.py" program that is a wrapper for running openocd and programming the mote. You can also run openocd by hand:
openocd -f /usr/local/etc/arm-wiggler.cfg
and then connect to it with:
telnet localhost 3333
Various commands you can use:
halt poll reset resume flash info 0