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().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@478 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2005-06-19 21:38:03 +00:00
parent efc820b82d
commit 2d236ed812
10 changed files with 430 additions and 47 deletions

View File

@@ -488,6 +488,15 @@ used. See Appendix A, Platform Dependent Information, to find out the
default port names for your platform. If you need to use a different
parallel or serial port, use this option to specify the alternate port name.
For the JTAG ICE mkII, if AVRDUDE has been built with libusb support,
@var{port} may alternatively be specified as
@var{usb}[:@var{serialno}]. In that case, the JTAG ICE mkII will be
looked up on USB. If @var{serialno} is also specified, it will be
matched against the serial number read from any JTAG ICE mkII found on
USB. The match is done after stripping any existing colons from the
given serial number, and right-to-left, so only the least significant
bytes from the serial number need to be given.
@item -q
Disable (or quell) output of the progress bar while reading or writing
to the device.
@@ -594,6 +603,7 @@ should not be used.
@end table
@page
@c
@c Node
@c
@@ -642,6 +652,7 @@ avrdude done. Thank you.
@end cartouche
@end example
@page
@noindent
Upload the flash memory from the ATmega128 connected to the STK500
programmer and save it in raw binary format in the file named
@@ -670,6 +681,7 @@ avrdude done. Thank you.
@end cartouche
@end example
@page
@noindent
Using the default programmer, download the file @code{diag.hex} to
flash, @code{eeprom.hex} to EEPROM, and set the Extended, High, and Low
@@ -718,6 +730,29 @@ avrdude done. Thank you.
@end cartouche
@end example
@page
@noindent
Connect to the JTAG ICE mkII which serial number ends up in 1C37 via
USB, and enter terminal mode:
@example
@cartouche
% avrdude -c jtag2 -p m649 -P usb:1c:37 -t
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9603
[ ... terminal mode output skipped for brevity ... ]
avrdude done. Thank you.
@end cartouche
@end example
@c