OpenOCD - Bus Blaster v1

OpenOCD [18] is a widely used on-chip debugger for ARM based processors. It requires an adapter, often USB, connected to the workstation. The other side, JTAG, is connected to the hardware to be debugged. In this section, the Bus Blaster v1 dongle from DangerousePrototypes is used to debug the Stellaris EKK-LM3S811 evaluation board over JTAG.

The first step is to download OpenOCD. To use with the Bus Blaster V1 dongle, the OpenOCD 0.4.0 binary version from here can be installed. Once the installation is completed, unzip the USB driver located in: C:\Program Files\OpenOCD\0.4.0\drivers\ Plug the USB Bus Blaster v1 dongle, and install the USB driver freshly unzipped. The next step is to create the interface configuration file as described here. The busblaster.cfg file can be saved as OpenOCD\0.4.0\interface\busblaster.cfg:

# Bus Blaster Interface

interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010

Finally, create the board configuration file. In this case, the easiest way is to copy and rename the existing Stellaris EKK-LM3S811 evaluation board configuration (copy OpenOCD\0.4.0\board\ek-lm3s811.cfg to OpenOCD\0.4.0\board\ek-lm3s811_2.cfg). Open the configuration file (ek-lm3s811_2.cfg), and set the interface configuration to use the busblaster.cfg file:

# TI/Luminary Stellaris LM3S811 Evaluation Kits

# include the FT2232 interface config for on-board JTAG interface
source [find interface/busblaster.cfg]

# include the target config
source [find target/lm3s811.cfg]

# jtag speed
jtag_khz 500

jtag_nsrst_delay 100

#LM3S811 Evaluation Board has only srst
reset_config srst_only

Connect the adapter to the remote target and start OpenOCD: openocd -f board/ek-lm3s811_2.cfg

To access the target using GDB, the remote port number 3333 must be used.
> arm-eabi-gdb
(gdb) target remote :3333
(gdb) mon reset
(gdb) c

Programming the binary application to the embedded flash can be done from GDB as following:
(gdb) monitor flash write_image erase harness.bin 0x0 bin

or using a telnet session to OpenOCD (telnet localhost 4444)

All commands available from OpenOCD are documented in the official PDF document. This wiki from DangerousePrototypes explains how to compile OpenOCD on Windows.