Bus Blaster OpenOCD guide

From DP

Jump to: navigation , search

Bus-blaster-v2-inuse .jpg

Contents

Download

Setup

  1. Install a driver (libUSB)
  2. Connect the Bus Blaster to a USB port
  3. Connect the Bus Blaster to a target board
  4. Power the target board

Configuration

busblaster.cfg file for OpenOCD

#
# Bus Blaster
#
# http://dangerousprototypes.com/docs/Bus_Blaster
#

interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010
openocd -f busblaster.cfg

Example usage.

openocd.cfg for OpenOCD

source [find busblaster.cfg]
jtag_khz 2000
openocd -f openocd.cfg

Example usage (required busblaster.cfg).

Configuration for TI PandaBoard and OpenOCD 0.5.0

Before to start, you need to download OpenOCD 0.5.0 and built it with libftdi support, tested on windows XP SP3 & Ubuntu 10.10. For information default BusBlasterV2 JTAG Key v1.3 buffer logic just work fine.

Step 1) Download & Build OpenOCD 0.5.0 for windows/linux:

  1. Download OpenOCD 0.5.0 source
  2. Download libftdi-0.19 source
  3. For Windows only: Download & Install lib-usb windows and attach it to USB Serial Converter A(Interface0)
  4. Download & Install Yagarto ARM Tool chain for debug
  5. How To Build OpenOCD on Windows cygwin or Linux (You can also build it with mingw like described in References).

Step2) Connect JTAG BusBlaster v2 to PandaBoard:

Pandaboard connected to BusBlasterv2: Pandaboard BusBlasterv2.jpg

Pandaboard JTAG connection:

Bus Blaster v2 vs Panda Board
BusBlasterV2 JTAG PandaBoard JTAG
VTG VIO_1V8 (Pin 5)
GND DGND (Pin 4)
TRST H_JTAG_NTRST (Pin 2)
TDI H_JTAG_TDI (Pin 3)
TMS H_JTAG_TMS (Pin 1)
TCK H_JTAG_TCK (Pin 11)
RTCK H_JTAG_RTCK (Pin 9)
TDO H_JTAG_TDO (Pin 7)

Other JTAG pins are not connected.

Extract of PandaBoard JTAG pinout from OMAP(TM) 4 PandaBoard System Reference Manual Revision 0.4 September 22, 2010 DOC-21010: Pandaboard JTAG.png

Alternative: ARM20TI14 JTAG adapter board including a ribbon cable

Step3) Start OpenOCD 0.5.0:

  1. Power ON PandaBoard (without SD Card) & BusBlaster V2.
  2. Launch mintty or standard cygwin shell.
  3. Launch openocd
openocd -f interface\busblaster.cfg -f board\ti_pandaboard.cfg

Example error if libftdi is not installed with libusb:

openocd -f interface/busblaster.cfg -f board/ti_pandaboard.cfg
Open On-Chip Debugger 0.5.0 (2011-08-13-19:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
RCLK - adaptive
Using dbgbase = 0x80000000
force hard breakpoints
trst_only separate trst_push_pull
Error: unable to open ftdi device: device not found
in procedure 'init'

If you have such type of error go in libusb-win32-bin-1.2.5.0\bin Launch inf-wizard.exe and attach all devices with VendorID=0x0403 & ProductID=0x6010.

You should obtain such log when all work fine:

openocd -f interface/busblaster.cfg -f board/ti_pandaboard.cfg
Open On-Chip Debugger 0.5.0 (2011-08-13-19:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
RCLK - adaptive
Using dbgbase = 0x80000000
force hard breakpoints
trst_only separate trst_push_pull
Info : max TCK change to: 30000 kHz
Info : RCLK (adaptive clock speed)
Info : JTAG tap: omap4430.jrc tap/device found: 0x3b95c02f (mfg: 0x017, part: 0xb95c, ver: 0x3)
Info : JTAG tap: omap4430.dap enabled
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Info : JTAG tap: omap4430.m30_dap enabled
Polling target failed, GDB will be halted. Polling again in 700ms
Info : JTAG tap: omap4430.m31_dap enabled
Info : omap4430.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : omap4430.m30: hardware has 6 breakpoints, 4 watchpoints
Info : omap4430.m31: hardware has 6 breakpoints, 4 watchpoints
Polling succeeded again

Now you can start to debug you PandaBoard with ARM GDB commands(using Yagarto or other):

arm-none-eabi-gdb.exe
target remote localhost:3333
monitor halt

You should obtain such log if all work fine:

GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses /gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show  copying" and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=arm- none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x00000000 in ?? ()
(gdb) monitor halt
target state: halted
target halted in Thumb state due to debug-request, current mode:  Supervisor
cpsr: 0x60000173 pc: 0x0002dc92
MMU: disabled, D-Cache: disabled, I-Cache: enabled

For other gdb commands type help. For openocd commands help type monitor help.

References