OpenOCD for FPGA

Project: OpenOCD

back to FPGA page.

links

OpenOCD, docs,

other links

Getting Started with OPENOCD Using FT2232H Adapter for SWD Debugging, Altera CPLD programming with Bus Pirate and OpenOCD, Programming a Spartan 6 with a Raspberry Pi, Kosagi wiki: FPGA getting started,

local links

Bus Pirate, FT2232 breakout board,

History

2021-08-01: I re-created this page on my self-hosted web server.

2018-07-21: c1 - try to program a bitstream via OpenOCD, using the FT223H adapter

tingo@kg-core1$ openocd -f ft2232h.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 ./bitstreams/barrel_shifter.bit; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 30000 kHz
jtag
xc6s_print_dna
Warn : libusb_detach_kernel_driver() failed with LIBUSB_ERROR_OTHER, trying to continue anyway
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 30000 kHz
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
loaded file ./bitstreams/barrel_shifter.bit to pld device 0 in 0s 326055us

yes, it worked. Nice! This is the demo bitstream that is programmed into the configuration device

tingo@kg-core1$ openocd -f ft2232h.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 ./bitstreams/pwm_led.bit; exit"   Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 30000 kHz
jtag
xc6s_print_dna
Warn : libusb_detach_kernel_driver() failed with LIBUSB_ERROR_OTHER, trying to continue anyway
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 30000 kHz
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
loaded file ./bitstreams/pwm_led.bit to pld device 0 in 0s 107961us

ok

2018-07-21: c1 - try OpenOCD with the FT2232H adapter on my FreeBSD workstation too.

tingo@kg-core1$ uname -a
FreeBSD kg-core1.kg4.no 10.4-STABLE FreeBSD 10.4-STABLE #1 r329982: Sun Feb 25 20:35:06 CET 2018     root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

where

tingo@kg-core1$ pwd
/home/tingo/doc/Xilinx/fpga/Xilinx_XC6SLX9_Mini_Board

config file

tingo@kg-core1$ cat ft2232h.cfg
# OpenOCD cfg file for FT2232H
interface ftdi
#ftdi_device_desc "FT2232H breakout board"
ftdi_vid_pid 0x0403 0x6010
# channel 1 is for custom purpose by users (like uart, fifo etc)
ftdi_channel 0
# just TCK TDI TDO TMS, no reset
ftdi_layout_init 0x0008 0x000b
#reset_config none
reset_config srst_only
adapter_khz 30000
transport select jtag

start OpenOCD

tingo@kg-core1$ openocd -f ft2232h.cfg -f cpld/xilinx-xc6s.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 30000 kHz
jtag
xc6s_print_dna
Warn : libusb_detach_kernel_driver() failed with LIBUSB_ERROR_OTHER, trying to continue anyway
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 30000 kHz
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined

telnet to OpenOCD

tingo@kg-core1$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> scan_chain
   TapName             Enabled  IdCode     Expected   IrLen IrCap IrMask
-- ------------------- -------- ---------- ---------- ----- ----- ------
 0 xc6s.tap               Y     0x24001093 0x*4000093     6 0x01  0x03
                                           0x*4001093
                                           0x*4002093
                                           0x*4004093
                                           0x*4024093
                                           0x*4008093
                                           0x*4028093
                                           0x*400e093
                                           0x*402e093
                                           0x*4011093
                                           0x*4031093
                                           0x*401d093
                                           0x*403d093
> shutdown
shutdown command invoked
Connection closed by foreign host.

works.

2018-07-20: e1 - try to program a bitstream via OpenOCD, using the FT223H adapter

[tingo@kg-elitebook XC6SLX9_mini_board]$ openocd -f ft2232h.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 ./bitstreams/barrel_shifter.bit; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 30000 kHz
jtag
xc6s_print_dna
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 30000 kHz
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
loaded file ./bitstreams/barrel_shifter.bit to pld device 0 in 0s 105076us

and it worked! Nice!

2018-07-20: e1 - OpenOCD with the FT2232H breakout board config file

[tingo@kg-elitebook XC6SLX9_mini_board]$ pwd
/home/tingo/doc/Xilinx/fpga/XC6SLX9_mini_board
[tingo@kg-elitebook XC6SLX9_mini_board]$ cat ft2232h.cfg
# OpenOCD cfg file for FT2232H
interface ftdi
#ftdi_device_desc "FT2232H breakout board"
ftdi_vid_pid 0x0403 0x6010
# channel 1 is for custom purpose by users (like uart, fifo etc)
ftdi_channel 0
# just TCK TDI TDO TMS, no reset
ftdi_layout_init 0x0008 0x000b
#reset_config none
reset_config srst_only
adapter_khz 30000
transport select jtag

run OpenOCD

[tingo@kg-elitebook XC6SLX9_mini_board]$ openocd -f ft2232h.cfg -f cpld/xilinx-xc6s.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 30000 kHz
jtag
xc6s_print_dna
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 30000 kHz
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined

connect to it via telnet

[tingo@kg-elitebook XC6SLX9_mini_board]$ telnet localhost 4444
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> shutdown
shutdown command invoked
Connection closed by foreign host.

ok.

2018-07-20: e1 - try to program a bitstream via OpenOCD

[tingo@kg-elitebook XC6SLX9_mini_board]$ openocd -f buspirate.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 ./bitstreams/barrel_shifter.bit; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
xc6s_print_dna
Info : Buspirate switched to FAST mode
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
Segmentation fault (core dumped)

ouch!

2018-07-20: e1 - start OpenOCD

[tingo@kg-elitebook XC6SLX9_mini_board]$ openocd -f buspirate.cfg -f cpld/xilinx-xc6s.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
xc6s_print_dna
Info : Buspirate switched to FAST mode
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined

and telnet to it (from another shell)

[tingo@kg-elitebook XC6SLX9_mini_board]$ telnet localhost 4444
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
>

yes, works.

2018-07-20: e1 - created a buspirate.cfg for my Fedora laptop

[tingo@kg-elitebook XC6SLX9_mini_board]$ pwd
/home/tingo/doc/Xilinx/fpga/XC6SLX9_mini_board
[tingo@kg-elitebook XC6SLX9_mini_board]$ cat buspirate.cfg
# Bus Pirate config file for OpenOCD
interface buspirate
transport select jtag
buspirate_port /dev/ttyUSB0
buspirate_speed fast
#buspirate_speed normal
buspirate_vreg 1; # enable, so the board get 3.3V via JTAG
buspirate_mode normal
buspirate_pullup 0
reset_config srst_only

ok.

2018-07-20: c1 - what if I power the Spartan-6 board via usb instead of via the Bus Pirate? Does that change anything?

tingo@kg-core1$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> xc6s_program xc6s.tap
> pld load 0 /home/tingo/doc/Xilinx/fpga/Xilinx_XC6SLX9_Mini_Board/bitstreams/barrel_shifter.bit
Error reading data
error reading
tap_chain overflow, bad things will happen
Connection closed by foreign host.

no change.

2018-07-20: c1 - another try, this time via telnet and with absolute paths

tingo@kg-core1$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> xc6s_program xc6s.tap
> pld load 0 /home/tingo/doc/Xilinx/fpga/Xilinx_XC6SLX9_Mini_Board/bitstreams/barrel_shifter.bit
Error reading data
error reading
tap_chain overflow, bad things will happen
Connection closed by foreign host.

something is wrong here.

2018-07-20: c1 - try to load a bitstream: (the .bit files are in current directory)

tingo@kg-core1$ openocd -f ../buspirate.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 barrel_shifter.bit; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
xc6s_print_dna
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
Error: Error reading data
Error: error reading
Error: tap_chain overflow, bad things will happen

try again

tingo@kg-core1$ openocd -f ../buspirate.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 ./barrel_shifter.bit; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
xc6s_print_dna
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
Error: Error reading data
Error: error reading
Error: tap_chain overflow, bad things will happen

nope. Try a different bitstream

tingo@kg-core1$ openocd -f ../buspirate.cfg -f cpld/xilinx-xc6s.cfg -c "init; xc6s_program xc6s.tap; pld load 0 freq_divider.bit; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
xc6s_print_dna
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined
Error: Error reading data
Error: error reading
Error: tap_chain overflow, bad things will happen

no go.

2018-07-19: c1 - test OpenOCD

tingo@kg-core1$ openocd -f buspirate.cfg -f cpld/xilinx-xc6s.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
xc6s_print_dna
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x24001093 (mfg: 0x049 (Xilinx), part: 0x4001, ver: 0x2)
Warn : gdb services need one or more targets defined

ok, so that works. Start a telnet session in another shell

tingo@kg-core1$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
>

works too. Try it out

> version
Open On-Chip Debugger 0.10.0
> adapter_name
buspirate
> jtag names
xc6s.tap
> pld devices
#0: virtex2
> scan_chain
   TapName             Enabled  IdCode     Expected   IrLen IrCap IrMask
-- ------------------- -------- ---------- ---------- ----- ----- ------
 0 xc6s.tap               Y     0x24001093 0x*4000093     6 0x01  0x03
                                           0x*4001093
                                           0x*4002093
                                           0x*4004093
                                           0x*4024093
                                           0x*4008093
                                           0x*4028093
                                           0x*400e093
                                           0x*402e093
                                           0x*4011093
                                           0x*4031093
                                           0x*401d093
                                           0x*403d093
> transport list
The following transports are available:
    jtag
    aice_jtag
    swd
    stlink_swim
    hla_jtag
> usage xsvf
xsvf (tapname|'plain') filename ['virt2'] ['quiet']

ok

2018-07-19: c1 - I had to change the buspirate.cfg file. new file

tingo@kg-core1$ cat buspirate.cfg
# Bus Pirate config file for OpenOCD
interface buspirate
transport select jtag
buspirate_port /dev/ttyU0
#buspirate_speed fast
buspirate_speed normal
buspirate_vreg 1; # enable, so the board get 3.3V via JTAG
buspirate_mode normal
buspirate_pullup 0
reset_config srst_only

ok

2018-07-19: c1 - config file for Spartan-6 is here: /usr/local/share/openocd/scripts/cpld/xilinx-xc6s.cfg

2018-07-19: c1 - create a buspirate.cfg file for OpenOCD.

tingo@kgsh-core1$ pwd
/home/tingo/doc/Xilinx/fpga/Xilinx_XC6SLX9_Mini_Board
tingo@kg-core1$ cat buspirate.cfg
# Bus Pirate config file for OpenOCD
interface buspirate
buspirate_port /dev/ttyU0
buspirate_speed fast
buspirate_vreg 1 # enable, so the board get 3.3V via JTAG
buspirate_mode normal
buspirate_pullup 0
reset_config srst_only

ok.

2018-07-19: c1 - my FreeBSD workstation also has OpenOCD installed

tingo@kg-core1$ uname -a
FreeBSD kg-core1.kg4.no 10.4-STABLE FreeBSD 10.4-STABLE #1 r329982: Sun Feb 25 20:35:06 CET 2018     root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64

OpenOCD version

tingo@kg-core1$ openocd -v
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html

supported adapters

tingo@kg-core1$ openocd -c interface_list
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
The following debug interfaces are available:
1: parport
2: dummy
3: ftdi
4: usb_blaster
5: presto
6: usbprog
7: openjtag
8: jlink
9: vsllink
10: rlink
11: ulink
12: arm-jtag-ew
13: buspirate
14: remote_bitbang
15: hla
16: osbdm
17: opendous
18: aice
Error: Debug Adapter has to be specified, see "interface" command

ok.

2018-07-19: e1 - supported adapters - another way

[tingo@kg-elitebook ~]$ openocd -c interface_list
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
The following debug interfaces are available:
1: parport
2: dummy
3: ftdi
4: usb_blaster
5: jtag_vpi
6: amt_jtagaccel
7: gw16012
8: presto
9: usbprog
10: openjtag
11: jlink
12: vsllink
13: rlink
14: ulink
15: arm-jtag-ew
16: buspirate
17: remote_bitbang
18: hla
19: osbdm
20: opendous
21: sysfsgpio
22: aice
23: cmsis-dap
Error: Debug Adapter has to be specified, see "interface" command

ok

2018-07-19: e1 - supported adapters

[tingo@kg-elitebook ~]$ l /usr/share/openocd/scripts/interface
./             at91rm9200.cfg       cmsis-dap.cfg  jlink.cfg         osbdm.cfg              rlink.cfg             ti-icdi.cfg
../             buspirate.cfg          dummy.cfg      jtag_vpi.cfg    parport.cfg          stlink-v1.cfg         ulink.cfg
altera-usb-blaster2.cfg  buspirate_org.cfg    estick.cfg     nds32-aice.cfg  parport_dlc5.cfg          stlink-v2-1.cfg         usb-jtag.cfg
altera-usb-blaster.cfg     calao-usb-a9260.cfg  flashlink.cfg  opendous.cfg    raspberrypi2-native.cfg  stlink-v2.cfg         usbprog.cfg
arm-jtag-ew.cfg         chameleon.cfg          ftdi/         openjtag.cfg    raspberrypi-native.cfg   sysfsgpio-raspberrypi.cfg  vsllink.cfg

FTDI-based adapters

[tingo@kg-elitebook ~]$ l /usr/share/openocd/scripts/interface/ftdi
./             dlp-usb1232h.cfg        hilscher_nxhx50_etm.cfg    lisa-l.cfg        olimex-arm-usb-ocd.cfg       redbee-usb.cfg      turtelizer2-revC.cfg
../             dp_busblaster.cfg        hilscher_nxhx50_re.cfg     luminary.cfg        olimex-arm-usb-ocd-h.cfg   rowley-cc-arm-swd.cfg  um232h.cfg
100ask-openjtag.cfg     dp_busblaster_kt-link.cfg  hitex_lpc1768stick.cfg     luminary-icdi.cfg    olimex-arm-usb-tiny-h.cfg  sheevaplug.cfg      vpaclink.cfg
axm0432.cfg         flossjtag.cfg            hitex_str9-comstick.cfg    luminary-lm3s811.cfg    olimex-jtag-tiny.cfg       signalyzer.cfg      xds100v2.cfg
calao-usb-a9260-c01.cfg  flossjtag-noeeprom.cfg     icebear.cfg               m53evk.cfg        oocdlink.cfg           signalyzer-lite.cfg      xds100v3.cfg
calao-usb-a9260-c02.cfg  flyswatter2.cfg        iotlab-usb.cfg           mbftdi.cfg        opendous_ftdi.cfg       stm32-stick.cfg
cortino.cfg         flyswatter.cfg            jtagkey2.cfg           minimodule.cfg        openocd-usb.cfg           swd-resistor-hack.cfg
digilent-hs1.cfg     gw16042.cfg            jtagkey2p.cfg           minispartan6.cfg        openocd-usb-hs.cfg       ti-icdi.cfg
digilent-hs2.cfg     hilscher_nxhx10_etm.cfg    jtagkey.cfg               neodb.cfg        openrd.cfg           tumpa.cfg
digilent_jtag_hs3.cfg     hilscher_nxhx500_etm.cfg   jtag-lock-pick_tiny_2.cfg  ngxtech.cfg        pipistrello.cfg           tumpa-lite.cfg
digilent_jtag_smt2.cfg     hilscher_nxhx500_re.cfg    kt-link.cfg               olimex-arm-jtag-swd.cfg    redbee-econotag.cfg       turtelizer2-revB.cfg

ok. openocd-usb

[tingo@kg-elitebook ~]$ more /usr/share/openocd/scripts/interface/ftdi/openocd-usb.cfg
#
# Hubert Hoegl's USB to JTAG
#
# http://www.hs-augsburg.de/~hhoegl/proj/usbjtag/usbjtag.html
#

interface ftdi
ftdi_device_desc "Dual RS232"
ftdi_vid_pid 0x0403 0x6010

ftdi_layout_init 0x0508 0x0f1b
ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400

openocd-usb-hs

[tingo@kg-elitebook ~]$ more /usr/share/openocd/scripts/interface/ftdi/openocd-usb-hs.cfg
#
# embedded projects openocd usb adapter v3
#
# http://shop.embedded-projects.net/index.php?module=artikel&action=artikel&id=14
#

interface ftdi
ftdi_device_desc "Dual RS232-HS"
ftdi_vid_pid 0x0403 0x6010

ftdi_layout_init 0x0508 0x0f1b
ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400

stm32-stick

[tingo@kg-elitebook ~]$ more /usr/share/openocd/scripts/interface/ftdi/stm32-stick.cfg
#
# Hitex STM32-PerformanceStick
#
# http://www.hitex.com/index.php?id=340
#

interface ftdi
ftdi_device_desc "STM32-PerformanceStick"
ftdi_vid_pid 0x0640 0x002d

ftdi_layout_init 0x0388 0x038b
ftdi_layout_signal nTRST -data 0x0100
ftdi_layout_signal nSRST -data 0x0080 -noe 0x200

ok

2018-07-19: e1 - I installed OpenOCD on my Fedora laptop. version

[tingo@kg-elitebook ~]$ openocd -v
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html

help

[tingo@kg-elitebook ~]$ openocd -h
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Open On-Chip Debugger
Licensed under GNU GPL v2
--help       | -h    display this help
--version    | -v    display OpenOCD version
--file       | -f    use configuration file <name>
--search     | -s    dir to search for config files and scripts
--debug      | -d    set debug level <0-3>
--log_output | -l    redirect log output to file <name>
--command    | -c    run <command>

ok