November 25, 2024, 09:01:31 AM

Help using OpenOCD with Win10

Started by Cowboy, December 07, 2022, 01:10:45 PM

Previous topic - Next topic

Cowboy

We use the Olimex-USB-OCD to program an at91sam7x256 on our Mainbord via JTAG, which is working well with Win7. There we use the DriverVer=03/13/2008,2.04.06 which can not installed with Win10.
So I tried to setup the OpenOCD with new Drivers which work with Win10. I used the package OpenOCD 0.9.0 rc1 compiled for Windows which you provide at https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD.
In the ReadMe.txt file of this package I tried the steps to establish a OpenOCD connection with our target. At first I used the Zadig installer to install the WinUSB driver for Interface #0. I tried both driver WinUSB (v6.1.7600.16385) and libusb-win32 (v1.2.6.0).
I created a openocd.cfg file:

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

#daemon configuration
telnet_port 4444
gdb_port 3333

reset_config srst_only

#target configuration
init
reset

when starting .\bin-x64\openocd.exe openocd.cfg I get the following response:

Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: libusb_get_string_descriptor_ascii() failed with LIBUSB_ERROR_IO
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 0003, description 'Olimex OpenOCD JTAG' and serial '*'

The target is connected properly and powered up!

The installed driver is libusb-win32 version 1.2.6.0 from 01.11.2021.

Any idea why the libusb_open() failed?

LubOlimex

What does it say if you install the WinUSB drivers via Zadig?

Technical support and documentation manager at Olimex

Cowboy

#2
With the following WINUSB driver installed from Zadig:
Driverdate: 06.06.2012, Driverversion: 6.1.7600.16385
I got the follwing response, which looks similar:

Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: libusb_get_string_descriptor_ascii() failed with LIBUSB_ERROR_PIPE
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 0003, description 'Olimex OpenOCD JTAG' and serial '*'

Then I changed my openocd.cfg file:

#target configuration
init ocd_init
reset ocd_reset

With the next try I got the following response:

Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
  flash init
ftdi_layout_init data direction
init
  jtag arp_init
  jtag arp_init-reset
  jtag init
  mflash init
  nand init
noinit
  pld init
power_restore
srst_deasserted
  target init
  transport init

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: libusb_get_string_descriptor_ascii() failed with LIBUSB_ERROR_PIPE
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 0003, description 'Olimex OpenOCD JTAG' and serial '*'

The WIN10 PC's in our company have the kernel-isolation memory-integrity setting activated in Windows-security settings. So I tried the same with my private Laptop without this memory-integrity setting activated and get the following result:

Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
  flash init
ftdi_layout_init data direction
init
  jtag arp_init
  jtag arp_init-reset
  jtag init
  mflash init
  nand init
noinit
  pld init
power_restore
srst_deasserted
  target init
  transport init

Error: libusb_get_string_descriptor_ascii() failed with LIBUSB_ERROR_PIPE
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 0003, description 'Olimex OpenOCD JTAG (Interface 0)' and serial '*'

Here the line "Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED" is missing!

JohnS

Maybe get a cheap used PC / laptop, install Linux & use OpenOCD that way.

John

LubOlimex

USB OCD has two serial interfaces. Did you install the Zadig drivers to both of them? One after the other? You can select each interface from drop down menu.

Maybe try with newer version of OpenOCD, from here:

https://gnutoolchains.com/arm-eabi/openocd/
Technical support and documentation manager at Olimex