I'm finally back to my VET6 project after taking care of few other things and I received my first batch of boards back this week from the fab house and have gotten one assembled.
I'm trying to get OpenOCD running under Fedora and having a few problems. I'm using the Olimex ARM-OCD-USB-H and I see it as a USB device after I plug it in using dmesg and lsusb. I suspect I have something wrong in the openocd.cfg file.
I'm wondering if someone can share their openocd.cfg file or take a look at the one below?
This is how I start openocd and the error I get:
openocd -f openocd.cfg
Open On-Chip Debugger 0.5.0 (2011-12-23-12:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
500 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Runtime Error: openocd.cfg:27: invalid command name "jtag_device"
in procedure 'script'
at file "embedded:startup.tcl", line 58
at file "openocd.cfg", line 27
#################################
my openocd.cfg:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
#cat /usr/lib/openocd/interface/olimex-arm-usb-ocd.cfg >> openocd.cfg
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0003
# target configuration
# cat /usr/lib/openocd/target/stm32.cfg >> openocd.cfg
# script for stm32
# jtag speed
jtag_khz 500
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e
target create target0 cortex_m3 -endian little -chain-position 0
[new_target_name] configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
#flash bank str7x <base> <size> 0 0 <target#> <variant>
flash bank stm32x 0 0 0 0 0
# For more information about the configuration files, take a look at:
# openocd.texi
At this point I just want to connect to the Olimex and see if it is able to
access the new board.