Xiaofan Chen wrote: > On Sun, Jun 13, 2010 at 8:22 AM, Stacey Sheldon <[email protected]> > wrote: >> This patch provides a way to use their unique usb bus address to >> distinguish them from one another. I've been using it successfully >> for a few days. This concept is probably generalizable for other >> inexpensive USB JTAGs without serial numbers but I've only got FT2232 >> based ones to work with so this patch only applies to FT2232 devices. > > The patch probably will not work under Windows. Have you > tested it under Windows? >
I don't have a windows machine so I'm unable to test my changes in that environment. This has been tested on ubuntu 9.10 (karmic). If it doesn't work on windows, I can try to adapt the changes so that it does but I'll probably need some help from someone who can test/provide feedback. Were there specific parts of the patch that definitely won't work on windows? >From reading the docs, I had concluded that the existing strategy for dealing with windows/linux compatibility for usb device access was to use libusb. If that's not the case then there's probably no chance that this patch will work on windows. Wherever possible, I've used publicly exported APIs from libftdi and whenever I needed to dig into struct usb_device and struct usb_bus, I only used struct members that are defined in both libusb[1] and libusb-win32[2]. I'd say there's at least a decent chance that it's portable anywhere libusb is available. At least anything in the libusb 0.1.x release stream which appears to be the suggested one for openocd according to README.Win32. In the libusb 1.0 release stream, it looks like the bus number and the device address are formally exposed through these API functions: libusb_get_bus_number() libusb_get_device_address() The 1.0 libraries are available on ubuntu but I didn't see any mention of the 1.0 series being available on windows. What version of libusb are you using? Stacey. [1] http://www.libusb.org/browser/libusb-compat-0.1/libusb/usb.h [2] http://sf.net/apps/trac/libusb-win32/browser/trunk/libusb/src/usb.h _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
