Difference between revisions of "Verdex JTAG"

From Gumstix User Wiki
Jump to: navigation, search
Line 1: Line 1:
 
This page explains one way to use OpenOCD JTAG software with verdex pro.  This is useful for hardware debugging and reflashing verdex boards.
 
This page explains one way to use OpenOCD JTAG software with verdex pro.  This is useful for hardware debugging and reflashing verdex boards.
 +
 +
==Up To Date Instructions==
 +
 +
The instructions below have recently been updated to include user experiences using more recent versions of the software involved in flashing. This document is available [http://gumstix.org/images/pdfs/reflash_verdex_pro.pdf on the Gumstix Developer Center].
  
 
== Get OpenOCD ==
 
== Get OpenOCD ==

Revision as of 14:27, 27 June 2014

This page explains one way to use OpenOCD JTAG software with verdex pro. This is useful for hardware debugging and reflashing verdex boards.

Up To Date Instructions

The instructions below have recently been updated to include user experiences using more recent versions of the software involved in flashing. This document is available on the Gumstix Developer Center.

Get OpenOCD

Start by downloading OpenOCD. To get the latest features and support for your particular JTAG adapter, build from source. If you are using a JTAG adapter that connects to your computer via USB, you'll likely need to enable libftdi support.

$ git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
$ cd openocd
$ ./bootstrap
$ ./configure --enable-ft2232_libftdi
$ make -j2

At this point, you can install it with a sudo make install. I just ran in place:

$ ./src/openocd -s tcl -f tcl/interface/flyswatter.cfg -f tcl/board/verdex.cfg

Three important notes:

  • your verdex should be powered and connected via JTAG
  • replace -f tcl/interface/flyswatter.cfg with the configuration for your particular JTAG adapter

If all goes well, you should see something like this:

Open On-Chip Debugger 0.6.0-dev-00084-gdaa4147 (2011-09-26-16:43)
Licensed under GNU GPL v2
For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 260
jtag_ntrst_delay: 250
Info : verdex.cpu: hardware has 2 breakpoints and 2 watchpoints
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
50000 kHz
Info : clock speed 6000 kHz
Info : JTAG tap: verdex.cpu tap/device found: 0x89265013 (mfg: 0x009, part: 0x9265, ver: 0x8)

Using JTAG

With the OpenOCD daemon running, open a new terminal window and fire up a telnet (or gdb) session:

$ telnet localhost 4444

You can now play with JTAG. Hint: the help command is pretty useful.

Reflashing

These are the steps I followed to reflash my board starting from a telnet session:

reset halt
flash write_image erase unlock /home/ash/u-boot.bin
flash write_image erase unlock /home/ash/rootfs.jffs2 0x00040000
flash write_image erase unlock /home/ash/uImage 0x01e00000

Notes:

  • you need to specify absolute ('~' doesn't count) paths to your files ('u-boot.bin', 'rootfs.jffs2', 'uImage')
  • for XM4 boards, change '0x01e00000' to '0x00e00000'
  • for debugging/unbricking, it certainly isn't necessary to flash all three components---just u-boot.bin is sufficient