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