Dangerous Prototypes

Other projects => Past projects => Breakout boards => Topic started by: paulreimer on September 13, 2012, 12:21:54 am

Title: Using FT2232H Breakout Board with JTAG/OpenOCD
Post by: paulreimer on September 13, 2012, 12:21:54 am
Hi all,

I am trying to use OpenOCD to program/flash my STM32F4 Discovery board. Instead of using the ST-LINK interface, I would like to confirm JTAG/SWD programming for this board, before moving on to JTAG programming of LPC1114 ARM DIP chips. I have many FT2232H breakout boards on-hand, which I already use with AVRdude to program my AVR chips (SPI/ISP).

My question is: how can I configure the FT2232H breakout board with openocd, and what pinout should I use for JTAG programming over the SWD debug bus? Is the Bus Blaster really required for this, and the FT2232H breakout is not enough to do this?

I have started followed a guide so far:
http://dangerousprototypes.com/2011/11/ ... s-blaster/ (http://dangerousprototypes.com/2011/11/03/programming-the-stm32f4-discovery-with-the-bus-blaster/)

, which uses the Bus Blaster, and openocd configuration files to match the default Bus Blaster buffer configuration (which I understand to be the JTAGkey layout?) Why are the programmable CPLD buffers needed on the Bus Blaster, and would I need to add similar (or more basic) components in order to talk JTAG to the Discovery?

Thanks for the help,
Paul
Title: Re: Using FT2232H Breakout Board with JTAG/OpenOCD
Post by: paulreimer on September 13, 2012, 07:41:19 pm
I was able to successfully program my STM32F4 Discovery using standard JTAG pins on the FT2232H (e.g. GND, ADBUS0-3), with TRST connected to ACBUS0. The guide I linked above works for me using the FT2232H breakout as a JTAG programmer, without the buffering of the Bus Blaster. Great!

Two important things I had to re-read the guide for:
1. For STM32 Discovery, the FT2232 JTAG DI pin goes to pin PA15 on header P2, and is *not* on the SWD jumper pins.
2. I was unable to debug after loading the code, and received "remote 'g' packet reply is too long" for any JTAG actions. I had to manually apply the patch (it does not apply cleanly the latest openocd git source):
https://github.com/esden/summon-arm-too ... sters.diff (https://github.com/esden/summon-arm-toolchain/blob/master/patches/patch-openocd-arm7m-registers.diff)
After applying this patch I can now debug the target and have no gdb warnings when doing so.
Title: Re: Using FT2232H Breakout Board with JTAG/OpenOCD
Post by: ian on September 21, 2012, 05:23:32 pm
Glad you got it, thanks for sharing your solution.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01052059280session_write_close ( )...(null):0
20.01082190872ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01082191648Database_MySQL->query( ).../DatabaseHandler.php:119
40.05502330384Database_MySQL->error( ).../Db-mysql.class.php:273