FX3 JTAG with Olimex ARM-USB-OCD-H

Discussions related to embedded firmware, driver, and user mode application software development

Moderator: robert.ghilduta

Post Reply
kb3gtn
Posts: 10
Joined: Sat Aug 03, 2013 10:46 pm

FX3 JTAG with Olimex ARM-USB-OCD-H

Post by kb3gtn » Fri Aug 23, 2013 9:55 pm

The following is a openocd script to use the Olimex ARM-USB-OCD-H with the cypress FX3 chip.
This script is tested with Open On-Chip Debugger 0.6.1 (2012-12-06-17:15) (Ubuntu 13.04 dist package)

fx3.cfg
---------------------------------------------------------------------------------
interface ft2232

ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x002b

######################################

# Target: CYPRESS FX3 ARM926-ejs

######################################
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME fx3
}

if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}

if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x07926069
}

#delays on reset lines
adapter_nsrst_delay 200
adapter_khz 1000
reset_config trst_and_srst srst_pulls_trst
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
#target create arm920t $_CHIPNAME
jtag_rclk 3

######################
# Target configuration
######################
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm926ejs
adapter_khz 1000
---------------------------------------------------------------


OpenOCD quick start with GDB:

Run this in a terminal. It starts a network servers you use:
openocd -f fx3.cfg

You can telnet on port 4444 and get a interactive jtag command console (if you want it)
It also has remote GDB capabilities on port 3333:

GDB Getting started with openOCD
Assuming you have already started openOCD, you can now running the following on another terminal.
From the fx3_firmware directory you should have built a bladeRF.elf file.
<path to cypress arm toolchain>/arm-none-eabi-gdb bladeRF.elf

At the prompt:
(gdb) target remote localhost:3333
then
(gdb) monitor reset halt
Now load the image to the cpu
(gdb) load
Set break points as needed here...
Now start the image
(gdb) continue

cde
Posts: 7
Joined: Sat Aug 24, 2013 3:01 am

Re: FX3 JTAG with Olimex ARM-USB-OCD-H

Post by cde » Sat Aug 24, 2013 3:03 am

Thanks! I have made a similar script based on the example from the cypress fx3 programmer's manual, using a flyswatter2 as the jtag adapter (the latest openocd git provides a flyswatter2.cfg which I used as well).

Code: Select all

set _CHIPNAME fx3
set _ENDIAN little
set _CPUTAPID 0x07926069
#jtag_nsrst_delay 200
#jtag_ntrst_delay 200
jtag_khz 1000
reset_config trst_and_srst srst_pulls_trst
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm926ejs

Post Reply