My setup:

Common) CPU: at91sam7x512, JTAG: olimex-arm-usb-tiny-h, proprietary single-CPY board
1) Windows 7, OpenOCD 0.0.4 <- works 2) Ubuntu 13.04, OpenOCD 0.7.0 <- strange error

There are some config files written in past times and the windows version works. Now I am trying to make things work under linux.

The manufacturer's page doesn't seem to have a ready config file, although they have instructions for building OpenOCD.

I built it with ft2232 support. OpenOCD seems to locate the JTAG, but not the device:

sw3@pc90313-sw3:~/ocd_conf$ openocd -f ocdconfig.cfg 
Open On-Chip Debugger 0.7.0 (2013-08-16-13:27)
Licensed under GNU GPL v2
For bug reports, read
Info : only one transport option; autoselect 'jtag'
adapter speed: 20 kHz
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : device: 6 "2232H"
Info : deviceID: 364511274
Info : SerialNumber: OLWKRKY?A
Info : Description: Olimex OpenOCD JTAG ARM-USB-TINY-H A
Info : max TCK change to: 30000 kHz
Info : clock speed 20 kHz
fError: couldn't read enough bytes from FT2232 device (70 < 81)
Error: couldn't read from FT2232
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 1
Info : sam7x512.cpu: hardware has 2 breakpoint/watchpoint units

Here is my config file:

sw3@pc90313-sw3:~/ocd_conf$ cat ocdconfig.cfg 
source [find interface/olimex-arm-usb-tiny-h.cfg]

adapter_khz 20

source [find target/at91sam7x512.cfg]

This error Error: couldn't read enough bytes from FT2232 device (70 < 81) seems to be the give-away. Other people in Googleland have experienced similar problems, but with (0 < 81) in which case it is clear that communication is not working at all. In my case, the number oscillates at 69-79-71.



The FT2232H uses High Speed USB, and the error translates into "problem in USB communication". I`d recommend trying another USB cable first - but this seems not to be a problem here, as it works in other configurations.

You should use the newer ftdi driver in OpenOCD 0.7.0:

source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg]

You can ignore the warning, the interface was tested to be OK, but after the 0.7.0 release.

Updating the OpenOCD windows binaries might be a good idea, too - the 0.4.0 release is getting rusty.

  • \$\begingroup\$ I ... am not sire if this worked. There are no errors with the new interface. Is openocd supposed to run as a deamon so that I can connect to it from e.g. gdb, or is it supposed to enter interactive mode and expect commands? \$\endgroup\$ – Vorac Aug 19 '13 at 12:39
  • \$\begingroup\$ Deamon mode: Use telnet localhost 4444 in another console. You might also want to RTFM. \$\endgroup\$ – Turbo J Aug 19 '13 at 12:47
  • \$\begingroup\$ OK, thanks. TFM is 150 pages ... I'm going through it, but am not understanding everything at the first run. \$\endgroup\$ – Vorac Aug 19 '13 at 12:51
  • \$\begingroup\$ Thanks, changing the interface eliminated the error. I was suspecting my libftd2xx.so and looping in circles until your answer. l \$\endgroup\$ – Vorac Aug 19 '13 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.