Xiaofan Chen wrote: > On Sun, Jun 13, 2010 at 10:54 AM, Stacey Sheldon <[email protected]> > wrote: >> 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). > > I see. Ubuntu (as well as Debian) still ships libusb-0.1 and not > libusb-compat-0.1. I remember the vanilla libftdi did not work > with libusb-compat-0.1.
Yeah, I linked to the libusb-compat-0.1 source because I couldn't find a web link to the 0.1 code. I confirmed that the usb.h file and the relevant structs are identical to the one on installed on my machine. >> 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. > > Agreed. Maybe I was wrong and your patch will work. But testing under > Windows would still be good to have. I do not have the hardware > to test though. The OpenPilot project has quite a few developers using these JTAGs on windows. I think they're all using pre-built binary versions of OpenOCD so they're not really in a position to pick up my patch. If you could build a new binary of OpenOCD against libusb-0.1 that included my patch and make it available to us, I'm sure I could find testers on various versions of windows to provide you with a report. Would that be possible? >> The 1.0 libraries are available on ubuntu but I didn't see any mention >> of the 1.0 series being available on windows. > > It is in the process of integration. > http://www.libusb.org/ > http://www.libusb.org/wiki/windows_backend Thanks for the pointer. That should make things easier once it gets widely adopted. > libftdi-1.0 is using libusb-1.0. But I have some problems > to build the git tree under Cygwin due to Cmake issues. If we get an OpenOCD 0.4 build against the old libusb-win32 (0.1) and the old libftdi, that would give us a way of testing if this works on windows. Porting this functionality to work against the new libusb-1.0 library shouldn't be too difficult once we know the general idea works on windows. Ultimately, I think there might be value in having libusb provide formal high-level APIs to select devices by their bus address. Obviously, you would want to be using that only as a last resort (after basically everything that shows up in a descriptor) but I'm sure there are other simple devices without a serial number. This is the last resort method of uniquely specifying a device when they have identical descriptors. I could see this being used by inexpensive HID devices. The new get_bus_number and get_device_address functions in 1.0 may be sufficient to accomplish this so maybe that's good enough. >> What version of libusb are you using? > I use all major versions, under Linux and Windows. I am > one of the admins of libusb-win32 project and one of the > contributing testers of libusb-1.0 under Linux/Windows. Wow, all of them. That's not quite the answer I was expecting :) Thanks for taking the time to comment on my patch. Stacey. _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
