On Sat, May 2, 2015 at 12:00 AM, Eugene Sh. <[email protected]> wrote:
>
> Just a note, it is not my patch :) Anyway, you'll find the requested output in
>  the attached file. The drivers are the official TI distributed drivers 
> (actually
> I've tried the standalone drivers bundle and these supplied with Code
> Composer studio - the behavior is the same). As far as I understand the
> drivers ARE WinUsb drivers. Find the attached Zadig screenshots. I
> have tried to replace the drivers with the Zadig ones, but still getting the
> same behaviour.

You are not installing the WinUSB driver as I told you. But I understand
that is an advance option in Zadig. You need to install WinUSB driver
on the USB Composite Parent. Currently you use WinUSB driver to
replace the three individual drivers. That is not what the original codes
want, the original codes are more suitable for Linux where the USB
composite device is treated as a single device.

+++++++++++++
https://github.com/pbatard/libwdi/wiki/Zadig

Fine control over devices listed (Options → List All Devices / Options
→ Ignore Hubs or Composite Parents):
By default, Zadig only lists devices that don't have a driver installed.
In some situations however, you might want to replace an existing
driver, including the ones for USB hubs (usbhub.sys) or Composite
Parent (usbccgp.sys). These options allow you to do just that.
++++++++++++++

Once you do that, you will only see one device using WinUSB
as the driver. I believe then the original code should work.

> And the final point is that applying this patch is **actually making
> openocd work**. Again, I am not a developer (well, sort of, but far
> from USB stuff), so I am not fully understanding what I am talking
> about, but hopefully you do.

I do. The original OpenOCD code is flawed. Since the default TI driver
(or in general how Windows treats USB Composite device -- as
individual device) treats the device as three individual device (USB
serial port for Interface 0/1; JTAG for Interface 2, DFU for Interface 3).
So using the libusb_open_device_with_vid_pid() will find the first
device which is subject to the OS's enumeration order (not so sure
whether it is Windows 7 versus Windows 8/8.1, or really the USB
chipsets or things like that).

When you use WinUSB to replace the USB Composite Parent,
Windows will treat the device as a single device and the original
code will work.

I am not a programmer myself and I have not looked into the
patch in detail. But I believe there is a way to patch the
existing code without the need to replacing the TI drivers with
single WinUSB driver. It needs to list all the device associated
with the vid/pid combination and determine which is the right one
to use (eg: using bInterfaceClass) and then open that one and
claim the relevant interface (Interface 2).



-- 
Xiaofan

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to