November 23, 2024, 02:47:26 AM

Problem with ARM-USB-TINY-H a OpenOCD

Started by Agent, August 24, 2014, 01:09:53 AM

Previous topic - Next topic

Agent

I use:
  Microsoft Windows 7 64bit
  Olimex ARM-USB-TINY-H
  OpenOCD 0.8.0
  Atmel AT91SAM7S512


I try to connect to Olimex ARM-USB-TINY-H via OpenOCD 0.8.0. More precisely I try for several months. I didn't find any clear manual from Olimex, how to connect Olimex via OpenOCD. Maybe it would be better idea to buy JTAG adapter from other company with better manual.

---

This is my first attempt of OpenOCD config:

# Olimex ARM-USB-TINY-H
set VID_OLIMEX          0x15BA
set PID_ARM_USB_TINY_H  0x002A

echo                    [format "Message: Adapter has VID = %04X" ${VID_OLIMEX}]
echo                    [format "Message: Adapter has PID = %04X" ${PID_ARM_USB_TINY_H}]

# Interface
interface               ft2232
ft2232_layout           olimex-jtag
ft2232_device_desc      "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ft2232_vid_pid          ${VID_OLIMEX} ${PID_ARM_USB_TINY_H}

echo                    [format "Message: Current adapter is %s" [adapter_name]]
echo                    [format "Message: Current transport is %s" [transport select]]

init


with error:

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: ftdi_usb_reset failed




This is my second attempt of OpenOCD script:

# Olimex ARM-USB-TINY-H
set VID_OLIMEX          0x15BA
set PID_ARM_USB_TINY_H  0x002A

echo                    [format "Message: Adapter has VID = %04X" ${VID_OLIMEX}]
echo                    [format "Message: Adapter has PID = %04X" ${PID_ARM_USB_TINY_H}]

# Interface
interface               ftdi
ftdi_device_desc        "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ftdi_vid_pid            ${VID_OLIMEX} ${PID_ARM_USB_TINY_H}

echo                    [format "Message: Current adapter is %s" [adapter_name]]
echo                    [format "Message: Current transport is %s" [transport select]]

ftdi_layout_init        0x0c08 0x0f1b
ftdi_layout_signal      nSRST -oe 0x0200
ftdi_layout_signal      nTRST -data 0x0100 -noe 0x0400
ftdi_layout_signal      LED -data 0x0800

init


with error:

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




I have tried to install FTDI drivers from Olimex, next libusb drivers from zadig. And third attempt for installing WinUSB from zadig failed. Zadig told me: ,,Installation of winusb driver failed".

Before every attempt for driver installation I deleted previous drives and I started with clear computer.

None of driver were functional.

Please help me. Where is error? What I am doing wrong? I am very desprite.

Thank you very nuch for every help.

JohnS

#1
Much better idea would be to ask on OpenOCD mailing list / support site!

I use OpenOCD and TINY-H no problems but not with the board you have.  I found OpenOCD already had files so just used them.

(I'm also not using Windows so life is easier for me.  Avoid Microsoft would be my strongest advice!)

John

EmEn

I'm having the same issue, tried pretty much the same steps as you did except for Zdiag because I read it messes up other USB drivers.

I still can't get OpenOCD to connect to ARM-USB-TINY. ( Others seem to have this issue as well: https://www.olimex.com/forum/index.php?topic=3318.0 )

Tried installing and uninstalling different old and new versions of drivers FT2232/FTDI/libUSB etc etc etc).

I'm including the config files with trial and errors that I've made to it,
The complete OpenOCD error is below. [open_matching_device(): libusb_open() failed with LIBUSB_ERROR_NOT_FOUND]

Can support guys at Olimex please help, maybe an updated document how to install this JTAG on a Win8.1 PC without trial and errors and using obscure third party tools?
The above post says someone fixed it by un-installing libusb and letting Windows install drivers automatically (posted by Divergence) but I can't figure out what exactly it means. How do I uninstall libUSB and let Windows install it automatically? From where? I also read Zadig can mess up my other USB drivers so I rather not run some un-known tool like this on my registry and obscurely mess up more stuff.
Any ideas would be greatly appreciated.
Thanks!




OS: Win8.1 (64bit)

Config file:

#
# Olimex ARM-USB-TINY
#
# http://www.olimex.com/dev/arm-usb-tiny-h.html
#

interface ftdi
debug_level 3
ftdi_serial "COM11"
ftdi_vid_pid 0x15ba 0x0004
ftdi_layout olimex-jtag
#ft2232_device_desc "ARM-USB-TINY USB Serial Port"
#ftdi_device_desc "Olimex OpenOCD JTAG TINY Interface"
#ftdi_device_desc "USB Serial Converter B"



OpenOCD Error:


C:\temp\openocd-0.8.0\bin-x64>openocd.exe -f olimex-arm-usb-tiny.cfg -f "C:\temp\openocd-0.8.0\scripts\cpu\arm\cortex_m4.tcl"
Open On-Chip Debugger 0.8.0 (2014-04-28-08:42)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
User : 15 26 command.c:546 command_print(): debug_level: 3
Debug: 16 41 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_ftdi_serial COM11
Debug: 17 65 command.c:145 script_debug(): command - ftdi_serial ocd_ftdi_serial COM11
Debug: 19 85 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_ftdi_vid_pid 0x15ba 0x0004
Debug: 20 114 command.c:145 script_debug(): command - ftdi_vid_pid ocd_ftdi_vid_pid 0x15ba 0x0004
Debug: 22 138 configuration.c:84 find_file(): found C:\temp\openocd-0.8.0\scripts\cpu\arm\cortex_m4.tcl
User : 23 163 command.c:691 command_run_line(): 32User : 24 173 command.c:693 command_run_line():
Debug: 25 186 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 26 209 command.c:145 script_debug(): command - init ocd_init
Debug: 28 224 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 29 247 command.c:145 script_debug(): command - ocd_target ocd_target init
Debug: 31 266 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 32 284 command.c:145 script_debug(): command - ocd_target ocd_target names
Debug: 33 296 target.c:1285 handle_target_init_command(): Initializing targets...
Debug: 34 308 ftdi.c:599 ftdi_initialize(): ftdi interface using shortest path jtag state transitions
Error: 35 446 mpsse.c:140 open_matching_device(): libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: 36 471 mpsse.c:161 open_matching_device(): no device found
Error: 37 486 mpsse.c:304 mpsse_open(): unable to open ftdi device with vid 15ba, pid 0004, description '*' and serial 'COM11'
Debug: 38 516 command.c:628 run_command(): Command failed with error code -100
User : 39 534 command.c:666 command_run_line(): in procedure 'init'

C:\temp\openocd-0.8.0\bin-x64>

JohnS

#3
You can see device not found by OpenOCD... much better to ask where I already posted.

It's Windows being a pain.  The OOCD people will know what their software needs Windows to do / not do.  Olimex made the hardware and it's working fine.  They don't make OpenOCD and I doubt they track its versions and which works how with each Windows version.

In effect you're asking how to use a USB device with Windows.  And specifically FTDI / libusb with Windows.

You won't have too much trouble finding workarounds for Windows to let you do it.  I'd use zadig...

John