October 25, 2020, 10:21:35 am

Another problem with ARM-USB-OCD

Started by rousea, June 09, 2014, 03:14:36 pm

Previous topic - Next topic

rousea

For several years I have used an ARM-USB-OCD to develop software via Eclipse and OpenOCD on a 64-bit Dell computer running Windows 7.  However, the hard drive failed so I had to re-install Windows and all applications and drivers.  The new version of Windows 7 seems to be different from the original, so I suspect Dell had their own variant.  One difference is that the original appeared to work with 32-bit drivers which don't work on the new version. This includes the Olimex driver.

I had copied drivers from the distribution CD onto a data partition on a second hard drive.  I have tried installing them from the folder named CDM20808.  However, although the driver appears to install correctly when I run OpenOCD via Eclipse the console shows:

Open On-Chip Debugger 0.8.0 (2014-04-28-08:39)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m reset_config sysresetreq
Warn : Using DEPRECATED interface driver 'ft2232'
Info : Consider using the 'ftdi' interface driver, with configuration files in interface/ftdi/...
Error: unable to open ftdi device: usb_open() failed
Runtime Error: openocd.cfg:14:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'init' called at file "openocd.cfg", line 14


My openocd.cfg file is:

# Configuration file to initialise openocd for a Mega_Link target
# via an Olimex ARM-USB-OCD

#debug_level 3

# source interface
#source [find interface/olimex-arm-usb-ocd-h.cfg]
source [find interface/olimex-arm-usb-ocd.cfg]

# source target
source [find target/stm32f1x.cfg]
#source [find target/stm32.cfg]

init
reset


Line 14 is init.

I have tried cleaning and re-installing the driver following the instructions in Repair-Procedure-for-OpenOcd-Rev.G-drivers.pdf (downloaded from https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD/.  I note that while cleaning a window stating that FTDI Uninstaller has stopped working opens briefly a number of times.

If I then plug in ARM-USB-OCD Windows automatically installs the driver (it doesn't prompt me for the driver as described on page 21 of Repair-Procedure-for-OpenOcd-Rev.G-drivers.pdf).  It then says there was a problem with the driver.  Device Manager shows 'Olimex OpenOCD JTAG' and 'USB Serial Port' under Other devices, both with warning markers.  If I update the drivers from the CDM20808 I have 'USB Serial Port' under Ports (not ARM-USB-OCD Serial Port as described in the instrictions) and two instances of 'USB Serial Converter B' under Universal Serial Bus controllers.  OpenOCD gives the same error message as described above.

What am I doing wrong?

rousea

PS I should also add that I have two ARM-USB-OCD dongles which both do the same, and both of them work correctly on another PC running Windows XP.

LubOlimex

Hello rousea,

Make sure the automatic installation of the driver is disabled. This might be configured in the Windows options. Manually point the unrecognized device by right-clicking its entry in "Windows Device Manager" and selecting "Update Device Driver". The folder where you should point the dialog window to search is the folder where you extracted this archive: https://www.olimex.com/Products/ARM/JTAG/_resources/DRIVERS-(libusb-1.2.2.0-CDM20808).zip

Make sure that you have disabled the "Windows Signature Enforcement". It is enabled by default in some Windows 7 versions and blocks the installation of unsigned drivers. Olimex-made drivers are unsigned.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Divergence

I also have a problem with:
64 bit Windows 7 laptop,
Olimex ARM-USB-TINY,
OpenOCD 0.7.0 and 0.8.0


Drivers seem to install fine but OpenOCD gives error message:

Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 0004, description 'Olimex OpenOCD JTAG TINY' and serial '*'

When viewing with usbview, I checked that vid, pid and desc are exactly as above.


I have tried drivers from these packages:
DRIVERS-(libusb-1.2.2.0-CDM20808).zip
ARM-USB-OCD-DRIVER.zip

and followed instructions in:
Installing-OpenOcd-Rev.G-drivers-for-Windows-7.pdf

Drivers seem to have installed correctly in Windows. I have also viewed them to check ID:s with usbview.

I have also tried to hack newest FTDI 64bit drivers (D2XX/ 2.10.00/ 2014-02-21) to Olimex by changing IDs and descriptors in .inf.
Seems to install fine but not detected by OpenOCD.


I also tried the non-ftdi interface version: interface\olimex-jtag-tiny.cfg
Also did not work:

Warn : Using DEPRECATED interface driver 'ft2232'
Info : Consider using the 'ftdi' interface driver, with configuration files in interface/ftdi/...
Error: unable to open ftdi device: usb_open() failed


I'm running out of ideas here.

Is some of the Olimex JTAG flasher properly kept up-to-date and working with OpenOCD?
I would gladly just buy that instead of wasting days fumbling with this driver mess.


Divergence

By the way, rousea, have you tried specifying the ftdi version of the interface?

by changing:

source [find interface/olimex-arm-usb-ocd.cfg]

to:

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

?

JohnS

Worth trying an up to date OpenOCD as 0.7 is old.

Possibly one from Freddie Chopin site.

John

Divergence

I uninstalled the drivers and let the
Windows install drivers automatically  (libusb-win 32 / 2.1.2010 / 1.2.2.0).

Now I don't get error messages with interface\olimex-jtag-tiny.cfg on OpenOCD 0.7.0

I don't have the TAP chain working yet but I really did not expect that anyways, this was just the first obstacle :)

LubOlimex

Hello guys,

OpenOCD 0.8.0 introduced a big change that affected the default driver installation for Olimex OpenOCD JTAG tools. LibUSB is no longer the default driver - WinUSB is. You would need to uninstall any drivers related to the debugger and then install WinUSB drivers.

Where you can get WinUSB drivers?

For now the easiest way is to use a program called "Zadig" - after removing all drivers, start the program and select WinUSB driver and click the install button. Please refer to the picture below:



Then when establishing connection with the board make sure you are loading the configuration file from the interface/ftdi/ folder. A sample line for the connection would be:

openocd-x64-0.8.0.exe -f ./interface/ftdi/olimex-arm-usb-ocd-h.cfg -f ./target/stm32f1x.cfg

, assuming you are in the folder of the proper for your operating system OpenOCD executable and your target matches stm32f1x configuration.

The program might be downloaded from here:

http://zadig.akeo.ie/

Quoting Freddie Chopin entry on the subject (and crediting him for the great work he's been doing): "One important information from my side - currently all interfaces using libftdi library require WinUSB driver (previously libusb-win32 was required) - this change is related to switching to the new version of library - libftdi1. The easiest way to install the driver is to use zadig software, and a short description of the process can be found in "drivers\libusb-1.0 drivers.txt" file, which is a part of the package."

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

Stupido

Thanks!
This solved the insalling issues in windows 10 as well...

KarlL

Just confirming that this solution worked for me in 2020 using Windows 10 Professional, ARM-USB-TINY-H.  I was worried that a solution from 2014 might not still work.

I tried many other attempts to install drivers that all failed, so it was a relief to find something that worked!