Difference between revisions of "OpenOCD for IMote2 Wiggler"
(→Build OpenOCD) |
(→Build OpenOCD) |
||
Line 16: | Line 16: | ||
sudo chmod 755 /usr/local/etc/arm-wiggler.cfg | sudo chmod 755 /usr/local/etc/arm-wiggler.cfg | ||
− | Get the arm-wiggler.cfg [[http://enl.usc.edu/~nilmish/arm-wiggler.cfg | + | Get the arm-wiggler.cfg [[http://enl.usc.edu/~nilmish/arm-wiggler.cfg here]] |
This will install openocd to /usr/local/bin. Be sure this is on your PATH. | This 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 |
Revision as of 11:49, 11 August 2008
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] This 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