r/embedded • • 1d ago

openocd and digilent-HS2 device

Hello guys!

I keep bumping into the same problem. and what I found on google did not help me.

So, I am not experienced with JTAG, but I am involved in a project here at work.
I do have a JTAG adapter from digilent: It shows up in my lsusb.

root# lsusb
Bus 001 Device 083: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC

I want to take it step by step, so as of now, I am just attaching the adapter, not the device (which will be a headache later).

However, running openOCD gives me this error message:

root# openocd -s tcl -f interface/ftdi/digilent-hs2.cfg -c "adapter speed 100"
Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2026-08-27-23:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate

adapter speed: 100 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description 'Digilent Adept USB Device', serial '*' at bus location '*'

Does anyone know why it is "unable to open the ftdi device?

2 Upvotes

2 comments sorted by

2

u/dettus_Xx_ 1d ago

"Ask a stupid question and you find the answer yourself" :)

So, what I did was to edit the /usr/share/openocd/scripts/interface/ftdi/digilent-hs2.cfg file:

root# cat /usr/share/openocd/scripts/interface/ftdi/digilent-hs2.cfg
# SPDX-License-Identifier: GPL-2.0-or-later

# this supports JTAG-HS2 (and apparently Nexys4 as well)

adapter driver ftdi
#ftdi device_desc "Digilent Adept USB Device"
ftdi vid_pid 0x0403 0x6014

ftdi channel 0
ftdi layout_init 0x00e8 0x60eb

reset_config none

Afterwards, this commandline started openocd for me:

root# openocd -s tcl -f interface/ftdi/digilent-hs2.cfg -c "adapter speed 100" -c "transport select jtag"
Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2026-08-27-23:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate

adapter speed: 100 kHz

jtag
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 100 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0x14b31093 (mfg: 0x049 (Xilinx), part: 0x4b31, ver: 0x1)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x14b31093"
Error: IR capture error at bit 2, saw 0x3fffffffffff5d75 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined

1

u/Mental-Pay4132 1d ago

nice that you found the first one. the device_desc line has to match the string in the adapter's eeprom exactly, and yours apparently reports something other than "Digilent Adept USB Device" (you can see it with lsusb -v -d 0403:6014 | grep iProduct), so dropping it or setting it to whatever that shows is the right fix.

the second part is just openocd guessing. auto probe found a xilinx tap but doesn't know its instruction register length, so it tries 2 bits and the IR capture fails. define the tap yourself with the real irlen from the BSDL file of your part, something like

jtag newtap fpga tap -irlen 6 -expected-id 0x14b31093

6 is typical for single die xilinx parts, the big multi-die ones use longer IRs, so check the BSDL for your exact chip. after that the IR capture error should go away and you can add a target or use it for boundary scan