4141.Op Fl i Ar delay
4242.Op Fl l, \- logfile Ar logfile
4343.Op Fl n, \- test-memory
44- .Op Fl O, \- osccal
44+ .Op Fl O, \- osccal
4545.Op Fl P, \- port Ar port
4646.Op Fl r, \- reconnect
4747.Op Fl q, \- quell
607607from the configuration file are used. If you need to use a different port,
608608use this option to specify the alternate port name.
609609.Pp
610+ USB-only programmers normally do not need the port option be specified as
611+ they are automatically identified via their vendor and product IDs from
612+ avrdude.conf or .avrduderc. Only when there are multiple programmers of
613+ the same type plugged into the host computer is the -P option needed, see
614+ below. Some -c programmers, however, ignore the -P option altogether, eg,
615+ teensy, ch341a or avrftdi; these cannot distinguish multiple plugged-in
616+ programmers.
617+ .Pp
610618If
611619.Nm
612620has been configured with libserialport support, a serial port can be specified
@@ -663,20 +671,38 @@ The match is done after stripping any existing colons from the given
663671serial number, and right-to-left, so only the least significant bytes
664672from the serial number need to be given.
665673.Pp
674+ avrdude -v -P usb:xyz -c jtag2 -p ... 2>&1 | grep ^Found
675+ .Pp
676+ lists all JTAG ICEs
677+ attached to USB, see the section
678+ .Em Example Command Line Invocations
679+ in the detailed pdf documentation.
680+ .Pp
666681As the AVRISP mkII device can only be talked to over USB, the very
667682same method of specifying the port is required there.
668683.Pp
669- For the USB programmer " AVR-Doper" running in HID mode, the port must
684+ For the USB programmer AVR-Doper running in HID mode, the port must
670685be specified as
671686.Ar avrdoper.
672687Libhidapi support is required on Unix and Mac OS but not on Windows. For more
673688information about AVR-Doper see https://www.obdev.at/products/vusb/avrdoper.html.
674689.Pp
675- For the USBtinyISP, which is a simplistic device not implementing
676- serial numbers, multiple devices can be distinguished by their
677- location in the USB hierarchy. See the respective
690+ For the USBtinyISP, which is a simplistic device not implementing serial
691+ numbers, multiple devices can be distinguished by their location in the
692+ USB hierarchy using -P usb:<busdir>:<devicefile>.
693+ .Pp
694+ For USBasp, multiple devices can also be also distinguished using -P
695+ usb:<busdir>:<devicefile> or using the serial number -P usb:<serialno>.
696+ For examples, see the respective
678697.Em Troubleshooting
679- entry in the detailed documentation for examples.
698+ entry in the detailed pdf documentation.
699+ .Pp
700+ The -c pickit5 programmer allows overriding the product ID with a
701+ hexadecimal number <pid> using -P usb::<pid> and the vendor and product
702+ IDs with hexadecimal numbers <vid> and <pid> using -P usb:<vid>:<pid>. The
703+ form -P usb:<serialno> requests AVRDUDE select the PICkit5 programmer with
704+ a serial number that ends in <serialno> (and with vid/pid from the
705+ configuration files).
680706.Pp
681707For the XBee programmer the target MCU is to be programmed wirelessly over a
682708ZigBee mesh using the XBeeBoot bootloader. The ZigBee 64-bit address for the
@@ -968,10 +994,13 @@ The
968994.Ar addr
969995and
970996.Ar len
971- parameters of the dump, read, disasm, write, save and erase commands can be
972- negative with the same syntax as substring computations in perl or python.
973- The table below details their meaning with respect to an example memory of size
974- sz=0x800 (2048 bytes).
997+ parameters of the dump, read, disasm, write, save and erase commands can
998+ be negative with the same syntax as substring computations in perl or
999+ python. The table below defines the effective memory interval
1000+ .Ar [start ,
1001+ .Ar end],
1002+ given the memory size
1003+ .Ar sz :
9751004.Pp
9761005.nf
9771006addr len Memory interval Comment
@@ -982,13 +1011,31 @@ addr len Memory interval Comment
9821011 sz+addr+len-1]
9831012 neg neg [sz+addr, sz+len] Combining above two cases
9841013 any 0 empty set No action
1014+ .fi
1015+ .Pp
1016+ Note that addr must be in the range [-sz, sz-1]. After computing the memory interval
1017+ [start, end] as per above table, the effective length end-start + 1 must not be negative; if
1018+ the effective length is zero then no action is carried out. End may be beyond the available
1019+ memory for the dump, read or disasm commands, in which case the operation wraps around
1020+ the memory end, but the effective length is always limited to the memory size.
1021+ .Pp
1022+ Here some examples for a memory with size sz of 0x800 (2048) bytes:
1023+ .Pp
1024+ .nf
1025+ addr len Memory interval Comment
1026+ ------------------------------------------------------------------------
98510270x700 12 [0x700, 0x70b] Conventional use
9861028 1024 -257 [0x400, 0x6ff] Size of memory is 2048 or 0x800
9871029 -512 512 [0x600, 0x7ff] Last 512 bytes
9881030 -256 -1 [0x700, 0x7ff] Last 256 bytes
9891031 0 49 [0, 48] First 49 bytes
9901032 0 -49 [0, 1999] All but the last 48 = |len+1| bytes
9911033 0 -1 [0, 0x7ff] All memory without knowing its size
1034+ 2046 4 [0x7fe, 0x801] Wrap around for read but error for write
1035+ 2046 4096 [0x7fe, 0x17fe] Read wrap around stops at 0x7fd
1036+ -1 -1 [0x7ff, 0x7ff] One byte at 0x7ff is addressed
1037+ -1 -2 [0x7ff, 0x7fe] No action: effective length is zero
1038+ -1 -3 [0x7ff, 0x7fd] Error: effective length is negative
9921039.fi
9931040.Pp
9941041The following commands are implemented for all programmers:
@@ -1639,7 +1686,7 @@ to the target. If there is already a valid voltage applied to the VTG Pin,
16391686this setting will be ignored. When AVRDUDE detects an external voltage outside
16401687of this range, it will terminate the operation. You can disable this check by
16411688setting the voltage to 0 V. If an XMEGA part was selected, a requested voltage
1642- above 3.49 V will lead to an abort of operation.
1689+ above 3.49 V will lead to an abort of operation.
16431690.It Ar hvupdi
16441691High-voltage UPDI programming is used to enable a UPDI pin that has previously
16451692been set to RESET or GPIO mode. Use -x hvupdi to enable high-voltage UPDI
0 commit comments