Bus Blaster OpenOCD guide
From DP
Contents |
Download
Setup
- Install a driver (libUSB)
- Connect the Bus Blaster to a USB port
- Connect the Bus Blaster to a target board
- 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:
- Download OpenOCD 0.5.0 source
- Download libftdi-0.19 source
- For Windows only: Download & Install lib-usb windows and attach it to USB Serial Converter A(Interface0)
- Download & Install Yagarto ARM Tool chain for debug
- 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 JTAG connection:
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:
Alternative: ARM20TI14 JTAG adapter board including a ribbon cable
Step3) Start OpenOCD 0.5.0:
- Power ON PandaBoard (without SD Card) & BusBlaster V2.
- Launch mintty or standard cygwin shell.
- 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.