Olimex Support Forum

ARM => JTAG => Topic started by: smithbone on June 21, 2018, 09:04:48 PM

Title: Example config file with ARM-USB-OCD-H and ARM-JTAG-SWD adapter?
Post by: smithbone on June 21, 2018, 09:04:48 PM
Anyone using this combination to do SWD successfully? 

I have board that does SWD only.  I currently use a JLink to program it but I'd like to use one of hte ARM-USB-OCD-H's we have.  I've got an ARM-JTAG-SWD adapter and I took my working openocd config file and changed the interface over to ARM-USB-OCD-H.  I then needed to set SWD_EN.  I've done so with:

ftdi_layout_signal SWD_EN -nalias nSRST

Our target config file connects to the system under reset with the following:

reset_config srst_only srst_nogate connect_assert_srst

It seems to talk to the adapter correctly  but fails to talk to the target.  Here's some of the openocd debug log with the failure code.

Debug: 247 93 command.c:143 script_debug(): command - ocd_transport ocd_transport init
Debug: 249 93 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 250 93 core.c:643 swd_add_reset(): SRST line asserted
Debug: 251 93 ftdi.c:1225 ftdi_swd_switch_seq(): JTAG-to-SWD
Debug: 252 94 command.c:626 run_command(): Command failed with error code -4
User : 253 94 command.c:687 command_run_line(): in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 495
in procedure 'ocd_bouncer'

The command in question is: program <file> verify reset exit

Anyone have an example of a working SWD setup with ARM-USB-OCD-H and ARM-JTAG-SWD?
_
Title: Re: Example config file with ARM-USB-OCD-H and ARM-JTAG-SWD adapter?
Post by: LubOlimex on June 25, 2018, 10:12:43 AM
Did you try with the basic connection from the command line?

openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f interface/ftdi/olimex-arm-jtag-swd.cfg
-f target/stm32f1x.cfg

After that open a telnet to the OpenOCD server and try to enter the commands from the script manually to see at which command the setup fails.