I just added native USB support for the JTAG ICE mkII, done via libusb. Find the CVS commit message below.
I saw on SourceForge, there's also a Win32 implementation of libusb, so perhaps this would even help the Win32 users. Inclusion of USB support is being auto-configured, provided usb_open() could be found in an existing instance of libusb. Alternatively, someone understanding USB on Win32 might clone my libusb implementation, and come up with a different Win32 implementation as well. Note for *BSD users: the current port of libusb contains an error for control transfers that causes a short reply to be ignored. Consequently, the serial number matching won't work there as the serial number is a string attribute that needs to be fetched from the ICE by means of a control transfer. Find a patch attached (already supplied to the maintainer of the FreeBSD port). It takes me about 13 seconds to read the full flash area of an ATmega128 via USB. CVS log message: Implement and document a libusb-based USB transport for the JTAG ICE mkII. The serial transport methods have been moved out into a record of function pointers for that purpose, defaulting to the actual serial connection that natively applies to the hosting system. Iff inside the JTAG ICE mkII handler a port name starting with "usb" has been detected, the record of function pointers is switched to USB. Optionally, a serial number might be specified, so only the JTAG ICE mkII matching the given serial number will be opened. The match is done right-to-left, so only the least significant bytes of the serial number need to be given. In order to make the change as least intrusive to existing drivers as possible, the entire naming scheme of the serial_foo() function entry points has been maintained as access macros that encapsulate these into the respective indirect function calls via serdev->foo(). -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
--- bsd.c.orig Wed Feb 18 07:34:52 2004 +++ bsd.c Thu Jun 16 22:08:00 2005 @@ -457,7 +457,7 @@ USETW(req.ucr_request.wLength, size); req.ucr_data = bytes; - req.ucr_flags = 0; + req.ucr_flags = USBD_SHORT_XFER_OK; ret = ioctl(dev->fd, USB_SET_TIMEOUT, &timeout); #if (__NetBSD__ || __OpenBSD__)
_______________________________________________ avrdude-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avrdude-dev
