November 07, 2024, 10:36:38 PM

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!

spencer

Quote from: KarlL on January 09, 2020, 08:36:26 PMJust 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!

Hi, Karl,

I met same problem with you, could not find the solution for a while, could you please share your experience?

I have Olimex OpenOCD JTAG ARM-USB-TINY-H too, tried to install driver using Zadig 2.5, and I chose WinUSB (v6.1.7600.16385).

After installation, I can see 2 Olimex OpenOCD JTAG ARM-USB-TINY-H under "Universal Serial Bus devices", but nothing under Ports (COM LPT).  Without a port number, I can not upload program to the board under Arduno.

Did I do anything wrong?

Thanks

Spencer


LubOlimex

Maybe try - right click on "USB Serial Converter A", go to "Advanced" tab and select "Load VCP". This would show COM port. Try the same for "USB Serial Converter B" if the first one was not the debug interface.

Maybe you can find some helpful information in that thread, no matter that it is for PlatformIO, it should apply for Arduino too:

https://community.platformio.org/t/esp32-pio-unified-debugger/4541/20
Technical support and documentation manager at Olimex