On Fri, Jul 10, 2009 at 2:51 AM, Zach Welch<z...@superlucidity.net> wrote: > On Thu, 2009-07-09 at 22:51 +0800, Xiaofan Chen wrote: >> Another issue with the TODO file. >> >> >@subsection thelistjtaginterfaces JTAG Interfaces >> > >> >The following tasks have been suggeted for improving OpenOCD's JTAG >> >interface support: >> > >> >- rework USB communication to be more robust. Two possible options are: >> > -# use libusb-1.0.1 with libusb-compat-0.1.1 (non-blocking I/O wrapper) >> > -# rewrite implementation to use non-blocking I/O >> >> I agree with the 2nd part (to use non-blocking I/O). I believe the >> first one is wrong. If you use libusb-compat-0.1, it would not help >> too much as it is still using the synchronous API of libusb-0.1. >> There may be some slight speed difference but you would not >> gain too much. > > Has anyone tried this to measure the performance difference?
The author of libusb 1.0 and libusb-compat has a benchmark last time. http://libusb.wiki.sourceforge.net/LibusbCompat0.1 http://article.gmane.org/gmane.comp.lib.libusb.devel.general/5364 But a new benchmark for OpenOCD needs to be done. >> Instead, the above should have been. >> - rework USB communication to be more robust. One possible option is: >> -# use libusb-1.0 and asynchronous I/O. This will work for the operating >> systems which support libusb 1.0 (currently Linux and Mac OS X). >> -# use libusb-win32 0.1 asynchronous I/O under Windows > > So, there are really two projects. libusb != libusb-win32. This is a > serious problem for the free software community; it's forked itself. > That is a serious _bug_ by design; their maintainers need to be spanked > and then made to work out their differences. > As David mentioned, they are never the same project to begin with. Initially there was libusb as a usbfs wrapper, later Sun adopted the API for Solaris, Mac OS X backend and BSD ugen backend were added later. libusb-win32 started as a separate project and aims to be API compatible with libusb. The implementation is totally different and it adds some features (asynchronous I/O, isochronous transfer). Stefan Meyer starts the libusb-win32 1.0 efforts before Daniel Drake's libusb 1.0 (which was based on his fpusb). Its aim is to bring WinUSB and HID backend to libusb-win32 to solve some Windows specific issues (64bit Windows, HID device). OpenUSB (Sun's efforts of a thread-safe libusb) also started earlier than libusb 1.0. Unfortunately, during the libusb 1.0 API and OpenUSB (Sun's efforts of a thread-safe libusb) API discussions, Stefan did not participate. Therefore we ended up with three API incompatible USB libraries for the successors of libusb 0.1: libusb 1.0 (Linux, Mac OS X) OpenUSB (Sun Solaris, Linux, and Mac OS X ?) libusb-win32 1.0 (Windows) -- Xiaofan http://mcuee.blogspot.com _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development