diff --git a/src/arduino.c b/src/arduino.c index 5bbff7769..fe3ac72fe 100644 --- a/src/arduino.c +++ b/src/arduino.c @@ -155,7 +155,7 @@ static void arduino_close(PROGRAMMER *pgm) { pgm->fd.ifd = -1; } -const char arduino_desc[] = "Arduino programmer"; +const char arduino_desc[] = "Arduino programmer for bootloading"; void arduino_initpgm(PROGRAMMER *pgm) { /* This is mostly a STK500; just the signature is read diff --git a/src/avr910.c b/src/avr910.c index a7a19ed27..ada92b389 100644 --- a/src/avr910.c +++ b/src/avr910.c @@ -644,7 +644,7 @@ static int avr910_read_sig_bytes(const PROGRAMMER *pgm, const AVRPART *p, const return 3; } -const char avr910_desc[] = "Serial programmers using protocol described in application note AVR910"; +const char avr910_desc[] = "Serial programmer using protocol from appnote AVR910"; void avr910_initpgm(PROGRAMMER *pgm) { strcpy(pgm->type, "avr910"); diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in index ac113515a..227911305 100644 --- a/src/avrdude.conf.in +++ b/src/avrdude.conf.in @@ -495,7 +495,7 @@ programmer # bsd programmer # stk200 id = "stk200"; - desc = "STK200"; + desc = "STK200 starter kit"; type = "par"; prog_modes = PM_TPI | PM_ISP; buff = 4, 5; @@ -612,7 +612,7 @@ programmer # sp12 programmer # picoweb id = "picoweb"; - desc = "Picoweb Programming Cable, http://www.picoweb.net/"; + desc = "Picoweb Programming Cable"; type = "par"; prog_modes = PM_TPI | PM_ISP; reset = 2; @@ -651,7 +651,7 @@ programmer # abcmini programmer # futurlec id = "futurlec"; - desc = "Futurlec.com programming cable."; + desc = "Futurlec.com programming cable"; type = "par"; prog_modes = PM_TPI | PM_ISP; reset = 3; @@ -821,7 +821,7 @@ programmer # 89isp # # programmer # id = "linuxgpio"; -# desc = "Use the Linux sysfs interface to bitbang GPIO lines"; +# desc = "Linux sysfs/libgpiod to bitbang GPIO lines"; # type = "linuxgpio"; # prog_modes = PM_ISP; # connection_type = linuxgpio; @@ -837,7 +837,7 @@ programmer # 89isp programmer # raspberry_pi_gpio id = "raspberry_pi_gpio"; - desc = "Bitbang Raspberry Pi GPIO via linuxgpio (sysfs or libgpiod)"; + desc = "Raspberry Pi GPIO via sysfs/libgpiod"; type = "linuxgpio"; prog_modes = PM_ISP; connection_type = linuxgpio; @@ -928,7 +928,7 @@ programmer # dryboot programmer # wiring id = "wiring"; - desc = "Wiring for bootloader using STK500 v2 protocol"; + desc = "Wiring bootloader using STK500 v2 protocol"; type = "wiring"; prog_modes = PM_SPM; connection_type = serial; @@ -947,7 +947,7 @@ programmer # wiring programmer # arduino id = "arduino"; - desc = "Arduino for bootloader using STK500 v1 protocol"; + desc = "Arduino bootloader using STK500 v1 protocol"; type = "arduino"; prog_modes = PM_SPM; connection_type = serial; @@ -976,7 +976,7 @@ programmer # arduino programmer # urclock id = "urclock"; - desc = "Urclock programmer for urboot bootloaders using urprotocol"; + desc = "Urboot bootloaders using urprotocol"; type = "urclock"; prog_modes = PM_SPM; connection_type = serial; @@ -994,7 +994,7 @@ programmer # urclock programmer # xbee id = "xbee"; - desc = "XBee for Series 2 Over-The-Air (XBeeBoot) bootloader using STK500 v1 protocol"; + desc = "XBeeBoot Over-The-Air bootloader (STK500 v1)"; type = "xbee"; prog_modes = PM_SPM; connection_type = serial; @@ -1158,7 +1158,7 @@ programmer parent "2232h" # 4232h programmer # jtagkey id = "jtagkey"; - desc = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2"; + desc = "Amontec JTAGKey/JTAGKey-Tiny/JTAGKey2"; type = "avrftdi"; prog_modes = PM_TPI | PM_ISP; connection_type = usb; @@ -1350,7 +1350,7 @@ programmer parent "tumpa" # tumpa-b programmer parent "ft2232h_jtag" # tumpa_jtag id = "tumpa_jtag"; - desc = "TIAO USB Multi-Protocol Adapter (JTAG)"; + desc = "TIAO USB Multi-Protocol Adapter in JTAG mode"; usbpid = 0x8a98; usbvendor = "TIAO"; buff = ~11; @@ -1384,7 +1384,7 @@ programmer parent "ft2232h_jtag" # tumpa_jtag programmer # ktlink id = "ktlink"; - desc = "KT-LINK FT2232H interface with IO switching and voltage buffers"; + desc = "KT-LINK FT2232H: IO switching, voltage buffers"; type = "avrftdi"; prog_modes = PM_TPI | PM_ISP; connection_type = usb; @@ -1495,7 +1495,7 @@ programmer # serprog programmer # avrisp id = "avrisp"; - desc = "Atmel AVR ISP"; + desc = "Serial Atmel AVR ISP using STK500"; type = "stk500"; prog_modes = PM_ISP; connection_type = serial; @@ -1507,7 +1507,7 @@ programmer # avrisp programmer # avrispv2 id = "avrispv2"; - desc = "Atmel AVR ISP v2"; + desc = "Serial Atmel AVR ISP using STK500v2"; type = "stk500v2"; prog_modes = PM_TPI | PM_ISP; connection_type = serial; @@ -1523,7 +1523,7 @@ programmer # avrispv2 programmer # avrispmkII id = "avrispmkII", "avrisp2"; - desc = "Atmel AVR ISP mkII"; + desc = "USB Atmel AVR ISP mkII"; type = "stk500v2"; prog_modes = PM_TPI | PM_ISP | PM_PDI; extra_features = HAS_VTARG_READ; @@ -1554,7 +1554,7 @@ programmer # avrispmkII programmer # buspirate id = "buspirate"; - desc = "The Bus Pirate"; + desc = "The Bus Pirate in AVR programming mode"; type = "buspirate"; prog_modes = PM_ISP; connection_type = serial; @@ -1568,7 +1568,7 @@ programmer # buspirate programmer # buspirate_bb id = "buspirate_bb"; - desc = "The Bus Pirate (bitbang interface, supports TPI)"; + desc = "The Bus Pirate in bitbang mode"; type = "buspirate_bb"; prog_modes = PM_TPI | PM_ISP; connection_type = serial; @@ -1592,7 +1592,7 @@ programmer # buspirate_bb programmer # stk500 id = "stk500"; - desc = "Atmel STK500 (probes STK500v2 first then STK500v1)"; + desc = "Atmel STK500 (probes v2 first then v1)"; type = "stk500generic"; prog_modes = PM_ISP; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ; @@ -1609,7 +1609,7 @@ programmer # stk500 programmer # stk500v1 id = "stk500v1"; - desc = "Atmel STK500 version 1.x firmware"; + desc = "Atmel STK500 v1"; type = "stk500"; prog_modes = PM_ISP; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ; @@ -1627,7 +1627,7 @@ programmer # stk500v1 programmer # arduino_as_isp id = "arduino_as_isp"; - desc = "Arduino board as programmer using arduino as ISP firmware"; + desc = "AVR as programmer with Arduino-as-ISP FW"; type = "stk500"; prog_modes = PM_ISP; connection_type = serial; @@ -1659,7 +1659,7 @@ programmer # mib510 programmer # stk500v2 id = "stk500v2", "scratchmonkey"; - desc = "Atmel STK500 version 2.x firmware"; + desc = "Atmel STK500 v2"; type = "stk500v2"; prog_modes = PM_TPI | PM_ISP; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ; @@ -1685,7 +1685,7 @@ programmer # stk500pp programmer # stk500hvsp id = "stk500hvsp", "scratchmonkey_hvsp"; - desc = "Atmel STK500 v2 in high-voltage serial programming mode"; + desc = "Atmel STK500 v2 in HV serial programming mode"; type = "stk500hvsp"; prog_modes = PM_HVSP; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ; @@ -1732,7 +1732,7 @@ programmer # stk600pp programmer # stk600hvsp id = "stk600hvsp"; - desc = "Atmel STK600 in high-voltage serial programming mode"; + desc = "Atmel STK600 in HV serial programming mode"; type = "stk600hvsp"; prog_modes = PM_HVSP; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ; @@ -2047,7 +2047,7 @@ programmer # arduino_gemma programmer # adafruit_gemma id = "adafruit_gemma"; - desc = "Adafruit Trinket Gemma bootloader disguised as USBtiny"; + desc = "Trinket Gemma bootloader disguised as USBtiny"; type = "usbtiny"; prog_modes = PM_SPM; connection_type = usb; @@ -2064,7 +2064,7 @@ programmer # adafruit_gemma programmer # arduinoisp id = "arduinoisp"; - desc = "Arduino ISP Programmer"; + desc = "Arduino-branded USBtiny ISP Programmer"; type = "usbtiny"; prog_modes = PM_TPI | PM_ISP; connection_type = usb; @@ -2081,7 +2081,7 @@ programmer # arduinoisp programmer # arduinoisporg id = "arduinoisporg"; - desc = "Arduino ISP Programmer"; + desc = "Arduino-branded USBtiny ISP Programmer"; type = "usbtiny"; prog_modes = PM_TPI | PM_ISP; connection_type = usb; @@ -2137,7 +2137,7 @@ programmer # iseavrprog programmer # micronucleus id = "micronucleus"; - desc = "Micronucleus for bootloader"; + desc = "Micronucleus bootloader"; type = "micronucleus"; prog_modes = PM_SPM; connection_type = usb; @@ -2155,7 +2155,7 @@ programmer # micronucleus programmer # teensy id = "teensy"; - desc = "Teensy for bootloader"; + desc = "Teensy bootloader"; type = "teensy"; prog_modes = PM_SPM; connection_type = usb; @@ -2184,7 +2184,7 @@ programmer # teensy programmer # ch341a id = "ch341a"; - desc = "ch341a programmer (AVR must have minimum F_CPU of 6.8 MHz)"; + desc = "CH341A programmer: note AVR F_CPU > 6.8 MHz"; type = "ch341a"; prog_modes = PM_ISP; is_serialadapter = yes; @@ -2207,7 +2207,7 @@ programmer # ch341a programmer # butterfly id = "butterfly"; - desc = "Atmel for bootloader (Butterfly Development Board)"; + desc = "Atmel bootloader (Butterfly Development Board)"; type = "butterfly"; prog_modes = PM_SPM; connection_type = serial; @@ -2222,7 +2222,7 @@ programmer # butterfly programmer # avr109 id = "avr109", "avr911"; - desc = "Atmel for bootloader using AppNote AVR109/911"; + desc = "Atmel bootloader (AVR109, AVR911)"; type = "butterfly"; prog_modes = PM_SPM; connection_type = serial; @@ -2236,7 +2236,7 @@ programmer # avr109 programmer # butterfly_mk id = "butterfly_mk", "mkbutterfly"; - desc = "Mikrokopter.de Butterfly for bootloader"; + desc = "Mikrokopter.de Butterfly bootloader"; type = "butterfly_mk"; prog_modes = PM_SPM; connection_type = serial; @@ -2255,7 +2255,7 @@ programmer # butterfly_mk programmer # jtagmkI id = "jtagmkI", "jtag1"; - desc = "Atmel JTAG ICE (mkI)"; + desc = "Atmel JTAG ICE mkI"; type = "jtagmki"; prog_modes = PM_JTAGmkI; extra_features = HAS_VTARG_READ; @@ -2603,7 +2603,7 @@ programmer # jtag3isp programmer # xplainedpro id = "xplainedpro", "xplainedpro_jtag"; - desc = "Atmel AVR XplainedPro in JTAG mode"; + desc = "Atmel XplainedPro in JTAG mode"; type = "jtagice3"; prog_modes = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG; extra_features = HAS_VTARG_READ; @@ -2618,7 +2618,7 @@ programmer # xplainedpro programmer # xplainedpro_pdi id = "xplainedpro_pdi"; - desc = "Atmel AVR XplainedPro in PDI mode"; + desc = "Atmel XplainedPro in PDI mode"; type = "jtagice3_pdi"; prog_modes = PM_PDI; extra_features = HAS_VTARG_READ; @@ -2634,7 +2634,7 @@ programmer # xplainedpro_pdi programmer # xplainedpro_updi id = "xplainedpro_updi"; - desc = "Atmel AVR XplainedPro in UPDI mode"; + desc = "Atmel XplainedPro in UPDI mode"; type = "jtagice3_updi"; prog_modes = PM_UPDI; extra_features = HAS_VTARG_READ; @@ -2667,7 +2667,7 @@ programmer # xplainedpro_updi programmer # xplainedmini id = "xplainedmini", "xplainedmini_isp"; - desc = "Atmel AVR XplainedMini in ISP mode"; + desc = "Atmel XplainedMini in ISP mode"; type = "jtagice3_isp"; prog_modes = PM_ISP; extra_features = HAS_SUFFER | HAS_VTARG_SWITCH; @@ -2687,7 +2687,7 @@ programmer # xplainedmini programmer # xplainedmini_dw id = "xplainedmini_dw"; - desc = "Atmel AVR XplainedMini in debugWIRE mode"; + desc = "Atmel XplainedMini in debugWIRE mode"; type = "jtagice3_dw"; prog_modes = PM_debugWIRE; extra_features = HAS_SUFFER | HAS_VTARG_SWITCH; @@ -2705,7 +2705,7 @@ programmer # xplainedmini_dw programmer # xplainedmini_updi id = "xplainedmini_updi"; - desc = "Atmel AVR XplainedMini in UPDI mode"; + desc = "Atmel XplainedMini in UPDI mode"; type = "jtagice3_updi"; prog_modes = PM_UPDI; extra_features = HAS_SUFFER | HAS_VTARG_SWITCH; @@ -2721,7 +2721,7 @@ programmer # xplainedmini_updi programmer # xplainedmini_tpi id = "xplainedmini_tpi"; - desc = "Atmel AVR XplainedMini in TPI mode"; + desc = "Atmel XplainedMini in TPI mode"; type = "jtagice3_tpi"; prog_modes = PM_TPI; connection_type = usb; @@ -2749,7 +2749,7 @@ programmer # xplainedmini_tpi programmer # atmelice id = "atmelice", "atmelice_jtag"; - desc = "Atmel-ICE (ARM/AVR) in JTAG mode"; + desc = "Atmel-ICE in JTAG mode"; type = "jtagice3"; prog_modes = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG; extra_features = HAS_VTARG_READ; @@ -2764,7 +2764,7 @@ programmer # atmelice programmer # atmelice_pdi id = "atmelice_pdi"; - desc = "Atmel-ICE (ARM/AVR) in PDI mode"; + desc = "Atmel-ICE in PDI mode"; type = "jtagice3_pdi"; prog_modes = PM_PDI; extra_features = HAS_VTARG_READ; @@ -2779,7 +2779,7 @@ programmer # atmelice_pdi programmer # atmelice_updi id = "atmelice_updi"; - desc = "Atmel-ICE (ARM/AVR) in UPDI mode"; + desc = "Atmel-ICE in UPDI mode"; type = "jtagice3_updi"; prog_modes = PM_UPDI; extra_features = HAS_VTARG_READ; @@ -2795,7 +2795,7 @@ programmer # atmelice_updi programmer # atmelice_dw id = "atmelice_dw"; - desc = "Atmel-ICE (ARM/AVR) in debugWIRE mode"; + desc = "Atmel-ICE in debugWIRE mode"; type = "jtagice3_dw"; prog_modes = PM_debugWIRE; extra_features = HAS_VTARG_READ; @@ -2810,7 +2810,7 @@ programmer # atmelice_dw programmer # atmelice_isp id = "atmelice_isp"; - desc = "Atmel-ICE (ARM/AVR) in ISP mode"; + desc = "Atmel-ICE in ISP mode"; type = "jtagice3_isp"; prog_modes = PM_ISP; extra_features = HAS_VTARG_READ; @@ -2825,7 +2825,7 @@ programmer # atmelice_isp programmer # atmelice_tpi id = "atmelice_tpi"; - desc = "Atmel-ICE (ARM/AVR) in TPI mode"; + desc = "Atmel-ICE in TPI mode"; type = "jtagice3_tpi"; prog_modes = PM_TPI; extra_features = HAS_VTARG_READ; @@ -2859,7 +2859,7 @@ programmer # atmelice_tpi programmer # powerdebugger id = "powerdebugger", "powerdebugger_jtag"; - desc = "Atmel PowerDebugger (ARM/AVR) in JTAG mode"; + desc = "Atmel PowerDebugger in JTAG mode"; type = "jtagice3"; prog_modes = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ; @@ -2874,7 +2874,7 @@ programmer # powerdebugger programmer # powerdebugger_pdi id = "powerdebugger_pdi"; - desc = "Atmel PowerDebugger (ARM/AVR) in PDI mode"; + desc = "Atmel PowerDebugger in PDI mode"; type = "jtagice3_pdi"; prog_modes = PM_PDI; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ; @@ -2889,7 +2889,7 @@ programmer # powerdebugger_pdi programmer # powerdebugger_updi id = "powerdebugger_updi"; - desc = "Atmel PowerDebugger (ARM/AVR) in UPDI mode"; + desc = "Atmel PowerDebugger in UPDI mode"; type = "jtagice3_updi"; prog_modes = PM_UPDI; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ; @@ -2905,7 +2905,7 @@ programmer # powerdebugger_updi programmer # powerdebugger_dw id = "powerdebugger_dw"; - desc = "Atmel PowerDebugger (ARM/AVR) in debugWire mode"; + desc = "Atmel PowerDebugger in debugWire mode"; type = "jtagice3_dw"; prog_modes = PM_debugWIRE; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ; @@ -2920,7 +2920,7 @@ programmer # powerdebugger_dw programmer # powerdebugger_isp id = "powerdebugger_isp"; - desc = "Atmel PowerDebugger (ARM/AVR) in ISP mode"; + desc = "Atmel PowerDebugger in ISP mode"; type = "jtagice3_isp"; prog_modes = PM_ISP; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ; @@ -2935,7 +2935,7 @@ programmer # powerdebugger_isp programmer # powerdebugger_tpi id = "powerdebugger_tpi"; - desc = "Atmel PowerDebugger (ARM/AVR) in TPI mode"; + desc = "Atmel PowerDebugger in TPI mode"; type = "jtagice3_tpi"; prog_modes = PM_TPI; extra_features = HAS_VTARG_ADJ | HAS_VTARG_READ; @@ -3081,7 +3081,7 @@ programmer # pickit4_tpi programmer # pickit5_updi id = "pickit5_updi"; - desc = "MPLAB(R) PICkit 5, PICkit 4 and SNAP (PIC mode)"; + desc = "MPLAB(R) PICkit 5, PICkit 4 and SNAP (PIC)"; type = "pickit5_updi"; prog_modes = PM_UPDI; extra_features = HAS_VTARG_READ; @@ -3283,7 +3283,7 @@ programmer # pickit2 programmer # flip1 id = "flip1"; - desc = "FLIP for bootloader using USB DFU protocol version 1 (doc7618)"; + desc = "FLIP bootloader using USB DFU v1 (doc7618)"; type = "flip1"; prog_modes = PM_SPM; connection_type = usb; @@ -3300,7 +3300,7 @@ programmer # flip1 programmer # flip2 id = "flip2"; - desc = "FLIP for bootloader using USB DFU protocol version 2 (AVR4023)"; + desc = "FLIP bootloader using USB DFU v2 (AVR4023)"; type = "flip2"; prog_modes = PM_SPM; connection_type = usb; @@ -3333,7 +3333,7 @@ programmer # flip2 programmer # ponyser id = "ponyser"; - desc = "design ponyprog serial, reset=!txd sck=rts sdo=dtr sdi=cts"; + desc = "ponyprog serial: reset=!txd sck=rts sdo=dtr sdi=cts"; type = "serbb"; prog_modes = PM_TPI | PM_ISP; connection_type = serial; @@ -3364,7 +3364,7 @@ programmer parent "ponyser" # siprog programmer # dasa id = "dasa"; - desc = "serial port banging, reset=rts sck=dtr sdo=txd sdi=cts"; + desc = "serial port: reset=rts sck=dtr sdo=txd sdi=cts"; type = "serbb"; prog_modes = PM_TPI | PM_ISP; connection_type = serial; @@ -3383,7 +3383,7 @@ programmer # dasa programmer # dasa3 id = "dasa3"; - desc = "serial port banging, reset=!dtr sck=rts sdo=txd sdi=cts"; + desc = "serial port: reset=!dtr sck=rts sdo=txd sdi=cts"; type = "serbb"; prog_modes = PM_TPI | PM_ISP; connection_type = serial; @@ -3402,7 +3402,7 @@ programmer # dasa3 programmer # c2n232i id = "c2n232i"; - desc = "serial port banging, reset=dtr sck=!rts sdo=!txd sdi=!cts"; + desc = "serial port: reset=dtr sck=!rts sdo=!txd sdi=!cts"; type = "serbb"; prog_modes = PM_TPI | PM_ISP; connection_type = serial; diff --git a/src/avrftdi.c b/src/avrftdi.c index 4a1062600..51f5afdd2 100644 --- a/src/avrftdi.c +++ b/src/avrftdi.c @@ -1739,5 +1739,5 @@ void avrftdi_jtag_initpgm(PROGRAMMER *pgm) { } #endif // DO_NOT_BUILD_AVRFTDI -const char avrftdi_desc[] = "Interface to the MPSSE Engine of FTDI Chips using libftdi."; +const char avrftdi_desc[] = "Interface to the MPSSE Engine of FTDI chips using libftdi"; const char avrftdi_jtag_desc[] = "libftdi JTAG interface"; diff --git a/src/buspirate.c b/src/buspirate.c index 225c9b862..15b4224f6 100644 --- a/src/buspirate.c +++ b/src/buspirate.c @@ -1119,7 +1119,7 @@ static void buspirate_teardown(PROGRAMMER *pgm) { pgm->cookie = NULL; } -const char buspirate_desc[] = "Using the Bus Pirate's SPI interface for programming"; +const char buspirate_desc[] = "Bus Pirate's SPI interface"; void buspirate_initpgm(PROGRAMMER *pgm) { strcpy(pgm->type, "BusPirate"); @@ -1306,7 +1306,7 @@ static void buspirate_bb_powerdown(const PROGRAMMER *pgm) { buspirate_bb_setpin_internal(pgm, 7, 0); } -const char buspirate_bb_desc[] = "Using the Bus Pirate's bitbang interface for programming"; +const char buspirate_bb_desc[] = "Bus Pirate's bitbang interface"; void buspirate_bb_initpgm(PROGRAMMER *pgm) { strcpy(pgm->type, "BusPirate_BB"); diff --git a/src/butterfly.c b/src/butterfly.c index fc0d299bd..4aabd59bb 100644 --- a/src/butterfly.c +++ b/src/butterfly.c @@ -659,7 +659,7 @@ static int butterfly_parseextparms(const PROGRAMMER *pgm, const LISTID extparms) return rv; } -const char butterfly_desc[] = "Atmel Butterfly evaluation board; Atmel AppNotes AVR109, AVR911"; +const char butterfly_desc[] = "Atmel Butterfly evaluation board (AVR109, AVR911)"; void butterfly_initpgm(PROGRAMMER *pgm) { strcpy(pgm->type, "butterfly"); diff --git a/src/ch341a.c b/src/ch341a.c index 5202182be..a2b60132f 100644 --- a/src/ch341a.c +++ b/src/ch341a.c @@ -477,4 +477,4 @@ void ch341a_initpgm(PROGRAMMER *pgm) { } #endif // !defined(HAVE_LIBUSB_1_0) -const char ch341a_desc[] = "Programmer chip CH341A (AVR must have minimum F_CPU of 6.8 MHz)"; +const char ch341a_desc[] = "Chip CH341A: AVR must have min F_CPU of 6.8 MHz"; diff --git a/src/doc/CMakeLists.txt b/src/doc/CMakeLists.txt index 5831fdaff..5a9a5de6d 100644 --- a/src/doc/CMakeLists.txt +++ b/src/doc/CMakeLists.txt @@ -40,9 +40,9 @@ find_program(TEXI2HTML_EXECUTABLE NAMES texi2html) add_custom_target(avrdude_binaries DEPENDS avrdude conf) add_custom_command( - OUTPUT programmers.txt - DEPENDS avrdude_binaries - COMMAND $ -C ${AVRDUDE_CONF} -c ? 2>&1 | more > programmers.txt + OUTPUT programmers.texi + DEPENDS avrdude_binaries ${CMAKE_CURRENT_SOURCE_DIR}/programmers.sed + COMMAND $ -C ${AVRDUDE_CONF} -c ? 2>&1 | grep = | sed -f ${CMAKE_CURRENT_SOURCE_DIR}/programmers.sed > programmers.texi VERBATIM ) @@ -54,19 +54,9 @@ add_custom_command( ) add_custom_command( - OUTPUT parts.txt - DEPENDS avrdude_binaries - COMMAND $ -C ${AVRDUDE_CONF} -p ? 2>&1 | more > parts.txt - VERBATIM - ) - -add_custom_command( - OUTPUT programmers.texi - DEPENDS programmers.txt - COMMAND ${CMAKE_COMMAND} - -D TXT_FILE=programmers.txt - -D TEXI_FILE=programmers.texi - -P "${CMAKE_CURRENT_SOURCE_DIR}/programmers.cmake" + OUTPUT parts.texi + DEPENDS avrdude_binaries ${CMAKE_CURRENT_SOURCE_DIR}/parts.sed + COMMAND $ -C ${AVRDUDE_CONF} -p ? 2>&1 | grep = | sed -f ${CMAKE_CURRENT_SOURCE_DIR}/parts.sed > parts.texi VERBATIM ) @@ -80,22 +70,16 @@ add_custom_command( VERBATIM ) -add_custom_command( - OUTPUT parts.texi - DEPENDS parts.txt - COMMAND ${CMAKE_COMMAND} - -D TXT_FILE=parts.txt - -D TEXI_FILE=parts.texi - -D COMMENTS_FILE=${CMAKE_CURRENT_SOURCE_DIR}/parts_comments.txt - -P "${CMAKE_CURRENT_SOURCE_DIR}/parts.cmake" - VERBATIM - ) - add_custom_command( OUTPUT version.texi + DEPENDS avrdude_binaries COMMAND ${CMAKE_COMMAND} -E echo "@set EDITION ${DOCS_VERSION}" > version.texi COMMAND ${CMAKE_COMMAND} -E echo "@set VERSION ${DOCS_VERSION}" >> version.texi COMMAND ${CMAKE_COMMAND} -E echo "@set UPDATED ${DOCS_UPDATED}" >> version.texi + COMMAND echo -n "@set NUMPARTS " >> version.texi + COMMAND $ -C ${AVRDUDE_CONF} -p \? 2>&1 | grep = | wc -l >> version.texi + COMMAND echo -n "@set NUMPROGRAMMERS " >> version.texi + COMMAND $ -C ${AVRDUDE_CONF} -c \? 2>&1 | grep = | wc -l >> version.texi VERBATIM ) diff --git a/src/doc/Makefile.am b/src/doc/Makefile.am index ff0bfdb13..144f6323a 100644 --- a/src/doc/Makefile.am +++ b/src/doc/Makefile.am @@ -29,7 +29,8 @@ CLEANFILES = \ info_TEXINFOS = avrdude.texi EXTRA_DIST = \ - parts_comments.txt + parts.sed \ + programmers.sed all-local: info html pdf @@ -53,10 +54,9 @@ $(builddir)/avrdude.pdf: $(GENERATED_TEXINFOS) ../avrdude$(EXEEXT): $(MAKE) -C .. avrdude$(EXEEXT) -$(builddir)/programmers.texi: ../avrdude$(EXEEXT) ../avrdude.conf Makefile +$(builddir)/programmers.texi: ../avrdude$(EXEEXT) ../avrdude.conf $(srcdir)/programmers.sed Makefile ../avrdude$(EXEEXT) -C ../avrdude.conf -c \? 2>&1 \ - | $(AWK) '$$2 ~ /^=$$/ {printf("@item @code{%s} @tab %s\n",$$1,gensub("[^=]+=[ \t]*","",1))}' \ - | sed "s# *,\? *<\?\(http://[^ \t>]*\)>\?#,@*\n@url{\1}#g" \ + | grep = | sed -f $(srcdir)/programmers.sed \ >programmers.texi $(builddir)/programmer_types.texi: ../avrdude$(EXEEXT) ../avrdude.conf Makefile @@ -65,10 +65,9 @@ $(builddir)/programmer_types.texi: ../avrdude$(EXEEXT) ../avrdude.conf Makefile | sed "s#<\?\(http://[^ \t,>]*\)>\?#@url{\1}#g" \ >programmer_types.texi -$(builddir)/parts.texi: ../avrdude$(EXEEXT) ../avrdude.conf parts_comments.txt Makefile +$(builddir)/parts.texi: ../avrdude$(EXEEXT) ../avrdude.conf $(srcdir)/parts.sed Makefile ../avrdude$(EXEEXT) -C ../avrdude.conf -p \? 2>&1 \ - | $(AWK) '$$2 ~ /^=$$/ {printf("@item @code{%s} @tab %s\n",$$1,$$3)}' \ - | sed -e "`sed 's:\([^ \t]*\)[ \t]*\(.*\):s/\1$$/\1 \2/g:g' parts.texi clean-local: diff --git a/src/doc/avrdude.texi b/src/doc/avrdude.texi index e59a23c5b..9a9b40473 100644 --- a/src/doc/avrdude.texi +++ b/src/doc/avrdude.texi @@ -110,6 +110,9 @@ Copyright @copyright{} Hans Eirik Bull, Brian S. Dean, Stefan R@"uger and J@"org * Programmer Specific Information:: * Platform Dependent Information:: * Troubleshooting:: +* List of Programmers:: +* List of Parts:: +* List of Memories:: * Index:: @end menu @@ -123,12 +126,14 @@ Copyright @copyright{} Hans Eirik Bull, Brian S. Dean, Stefan R@"uger and J@"org AVRDUDE - AVR Downloader Uploader - is a program for downloading and uploading the on-chip memories of Atmel's AVR microcontrollers. It can -program the Flash and EEPROM, and where supported by the serial -programming protocol, it can program fuse and lock bits. AVRDUDE also -supplies a direct instruction mode allowing one to issue any programming -instruction to the AVR chip regardless of whether AVRDUDE implements -that specific feature of a particular chip. +program the Flash, EEPROM, and where supported by the programmer, lock +bits, fuses that hold the microcontroller's configuration and other +memories that the part might have. +@cindex @code{calibration} +@cindex @code{signature} +@cindex @code{flash} +@cindex @code{eeprom} AVRDUDE can be used via the command line to read or write chip memories (eeprom, flash, fuses, lock bits) and read memories such as signature or calibration bytes; the same can be achieved via an interactive terminal @@ -138,11 +143,24 @@ is useful for exploring memory contents, modifying individual bytes of eeprom, programming fuse/lock bits, etc. @cindex Programmers supported +@cindex Emulating a HW programmer (dryrun) +@cindex Emulating a bootloader (dryboot) + +Programming a microcontroller either requires a physical programmer that +sits between the target chip and the PC running AVRDUDE, or a bootloader +program on the target chip that is then directly connected to the PC to be +served by AVRDUDE. Currently, AVRDUDE knows about @value{NUMPARTS} parts +and @value{NUMPROGRAMMERS} programmers, though not every programmer can +deal with every part. One noteworthy programmer is @code{dryrun}, which +allows one to explore the AVRDUDE command-line and terminal without +needing to have, or connect, a real physical programmer. Similarly, +@code{dryboot} allows exploring how to communicate with a bootloader +without connecting an AVR part. AVRDUDE supports the following basic programmer types: Atmel's STK500, Atmel's AVRISP and AVRISP mkII devices, Atmel's STK600, -Atmel's JTAG ICE (the original one, mkII, and 3, the latter two also in ISP mode), appnote +Atmel's JTAG ICE (the original one, mkII, and 3), appnote avr910, appnote avr109 (including the AVR Butterfly), serial bit-bang adapters, and the PPI (parallel port interface). PPI represents a class @@ -219,7 +237,31 @@ A typical programming cable would then look like: The @code{-P @var{portname}} option defaults to @code{/dev/spidev0.0:/dev/gpiochip0} for this programmer. +@cindex Atmel STK500 +@cindex Atmel JTAG ICE mkI +@cindex STK500 +@cindex JTAG ICE mkI +@cindex @code{butterfly} The STK500, JTAG ICE, avr910, and avr109/butterfly use the serial port to communicate with the PC. +@cindex Atmel STK600 +@cindex Atmel JTAG ICE mkII +@cindex Atmel AVR JTAGICE3 +@cindex STK600 +@cindex JTAG ICE mkII +@cindex AVR JTAGICE3 +@cindex JTAGICE3 +@cindex USBasp ISP and TPI programmer +@cindex FT2232H/D programmer +@cindex FT2232H JTAG programmer +@cindex FT2232H with buffer and LEDs +@cindex FT232H JTAG programmer +@cindex FT232H programmer +@cindex FT232R programmer +@cindex FT232R Synchronous BitBang +@cindex FT245R programmer +@cindex FT4232H programmer +@cindex FTDI TTL232R-5V +@cindex USBtiny simple USB programmer The STK600, JTAG ICE mkII/3, AVRISP mkII, USBasp, avrftdi (and derivatives), and USBtinyISP programmers communicate through the USB, using @code{libusb} as a platform abstraction layer. @@ -230,6 +272,8 @@ are only supported on interface A, but the H parts can be either A or B (specifi usbdev config parameter). The STK500, STK600, JTAG ICE, and avr910 contain on-board logic to control the programming of the target device. +@cindex Atmel bootloader (AVR109, AVR911) +@cindex @code{flash} The avr109 bootloader implements a protocol similar to avr910, but is actually implemented in the boot area of the target's flash, as opposed to being an external device. @@ -246,23 +290,40 @@ protocol is more sophisticated. (The JTAG ICE mkII protocol can also be run on top of USB.) Only the memory programming functionality of the JTAG ICE is supported by AVRDUDE. -For the JTAG ICE mkII/3, JTAG, debugWire and ISP mode are supported, provided +@cindex debugWIRE +@cindex ISP +@cindex PDI +@cindex JTAG +@cindex Atmel JTAG ICE mkII +@cindex Atmel AVR JTAGICE3 +@cindex JTAG ICE mkII +@cindex AVR JTAGICE3 +@cindex JTAGICE3 +For the JTAG ICE mkII/3, JTAG, debugWIRE and ISP mode are supported, provided it has a firmware revision of at least 4.14 (decimal). -See below for the limitations of debugWire. -For ATxmega devices, the JTAG ICE mkII/3 is supported in PDI mode, provided it -has a revision 1 hardware and firmware version of at least 5.37 (decimal). +See below for the limitations of debugWIRE. +For ATxmega devices, the JTAG ICE mkII/3 is supported in PDI mode (Xmega +parts), provided it has a revision 1 hardware and firmware version of at +least 5.37 (decimal). -The Atmel-ICE (ARM/AVR) is supported (JTAG, PDI for Xmega, debugWIRE, ISP, -UPDI). +@cindex Atmel-ICE +The Atmel-ICE (ARM/AVR) is supported (JTAG, PDI, debugWIRE, ISP, UPDI). +@cindex Atmel XplainedPro +@cindex XplainedPro Atmel's XplainedPro boards, using EDBG protocol (CMSIS-DAP compliant), are supported by the ``jtag3'' programmer type. +@cindex Atmel XplainedMini +@cindex XplainedMini Atmel's XplainedMini boards, using mEDBG protocol, are also supported by the ``jtag3'' programmer type. -The AVR Dragon is supported in all modes (ISP, JTAG, PDI, HVSP, PP, debugWire). -When used in JTAG and debugWire mode, the AVR Dragon behaves similar to a +@cindex Atmel AVR Dragon +@cindex AVR Dragon +@cindex Dragon +The AVR Dragon is supported in all modes (ISP, JTAG, PDI, HVSP, PP, debugWIRE). +When used in JTAG and debugWIRE mode, the AVR Dragon behaves similar to a JTAG ICE mkII, so all device-specific comments for that device will apply as well. When used in ISP and PDI mode, the AVR Dragon behaves similar to an @@ -274,6 +335,7 @@ option might be required to achieve a stable ISP communication. For ATxmega devices, the AVR Dragon is supported in PDI mode, provided it has a firmware version of at least 6.11 (decimal). +@cindex Wiring bootloader Wiring boards (e.g. Arduino Mega 2560 Rev3) are supported, utilizing STK500 V2.x protocol, but a simple DTR/RTS toggle to set the boards into programming mode. The programmer type is ``wiring''. Note that @@ -281,6 +343,7 @@ the @code{-D} option will likely be required in this case, because the bootloader will rewrite the program memory, but no true chip erase can be performed. +@cindex Arduino bootloader Serial bootloaders that run a skeleton of the STK500 1.x protocol are supported via their own programmer type specification ``arduino''. This programmer works for the Arduino Uno Rev3 or any AVR that runs the Optiboot bootloader. @@ -289,6 +352,9 @@ extended parameter. See the section on @emph{extended parameters} below for details. +@cindex Urboot bootloader +@cindex Urclock programmer +@cindex Urprotocol Urprotocol is a leaner version of the STK500 1.x protocol that is designed to be backwards compatible with STK500 v1.x; it allows bootloaders to be much smaller, e.g., as implemented in the urboot project @@ -302,12 +368,14 @@ enable it to protect the bootloader from being overwritten. If an unknown bootloader has EEPROM read/write capability then the option @code{-x eepromrw} informs @code{avrdude -c urclock} of that capability. +@cindex The Bus Pirate The BusPirate is a versatile tool that can also be used as an AVR programmer. A single BusPirate can be connected to up to 3 independent AVRs. See the section on @emph{extended parameters} below for details. +@cindex CH341A programmer The USBasp ISP, USBtinyISP and CH341A adapters are also supported, provided AVRDUDE has been compiled with libusb support. They former two feature simple firmware-only USB implementations, running on @@ -318,20 +386,29 @@ AVR target must have a CPU frequency of 6.8@w{ }MHz or more: factory-set AVR parts, which typically run on an internal oscillator between 1 MHz and 1.6 MHz, cannot be programmed using @code{-c ch341a}. +@cindex FLIP bootloader The Atmel DFU bootloader is supported in both, FLIP protocol version 1 (AT90USB* and ATmega*U* devices), as well as version 2 (Xmega devices). See below for some hints about FLIP version 1 protocol behaviour. +@cindex MPLAB(R) PICkit 4 +@cindex MPLAB(R) PICkit 5 +@cindex MPLAB(R) SNAP +@cindex PICkit 4 +@cindex PICkit 5 +@cindex SNAP The MPLAB(R) PICkit 4 and MPLAB(R) SNAP are supported in JTAG, TPI, ISP, PDI and UPDI mode. +@cindex Curiosity nano The Curiosity Nano board is supported in UPDI mode. It is dubbed ``PICkit on Board'', thus the name @code{pkobn_updi}. The MPLAB(R) PICkit 5 is currently only supported in UPDI mode. +@cindex SerialUPDI SerialUPDI programmer implementation is based on Microchip's @emph{pymcuprog} (@url{https://github.com/microchip-pic-avr-tools/pymcuprog}) utility, but it also contains some performance improvements included in Spence Konde's @emph{DxCore} Arduino core (@url{https://github.com/SpenceKonde/DxCore}). -In a nutshell, this programmer consists of simple USB->UART adapter, diode +In a nutshell, this programmer consists of simple USB-to-UART adapter, diode and couple of resistors. It uses serial connection to provide UPDI interface. @xref{SerialUPDI Programmer} for more details and known issues. @@ -341,18 +418,24 @@ Jtag2updi is just a firmware that can be uploaded to an AVR, which enables it to interface with avrdude using the jtagice mkii protocol via a serial link (@url{https://github.com/ElTangas/jtag2updi}). +@cindex Micronucleus bootloader +@cindex @code{flash} The Micronucleus bootloader is supported for both protocol version V1 and V2. As the bootloader does not support reading from flash memory, use the @code{-V} option to prevent AVRDUDE from verifying the flash memory. See the section on @emph{extended parameters} below for Micronucleus specific options. +@cindex Teensy bootloader +@cindex @code{flash} The Teensy bootloader is supported for all AVR boards. As the bootloader does not support reading from flash memory, use the @code{-V} option to prevent AVRDUDE from verifying the flash memory. See the section on @emph{extended parameters} below for Teensy specific options. +@ref{List of Programmers} holds a full listing of known programmers. + @menu * History:: @end menu @@ -424,49 +507,31 @@ following options are recognized: @table @code @item -p @var{partno} @cindex Option @code{-p} @var{partno} +@cindex @code{-p} @var{partno} + This option tells AVRDUDE what part (MCU) is connected to the programmer. The @var{partno} parameter is the part's id listed in the configuration file. To see a list of currently supported MCUs use @code{?} as partno, -which will print the part ids and official part names. In connection with -@code{-v}, this will also print a list of variant part names followed by -an optional colon, the package code and some absolute maximum ratings. The -part id, their official part name, any of the full variant part names or -their initial part up to a dash can be used to specify a part with the -@code{-p} option. If a part is unknown to AVRDUDE, it means that there is -no config file entry for that part, but it can be added to the +which will, for each part, print its id; its official part name; +alternative names, if any; and the list of available programming +interfaces. In connection with @code{-v}, this will also print a table of +variant part names with the package code and some absolute maximum +ratings. The part id, their official part name, the listed alternative +names or any of the full variant part names can be used to specify a part +with the @code{-p} option. If a part is unknown to AVRDUDE, it means that +there is no config file entry for that part, but it can be added to the configuration file if you have the Atmel datasheet so that you can enter the programming specifications. If @code{-p ?} is specified with a specific programmer, see @code{-c} below, then only those parts are output that the programmer expects to be able to handle, together with the programming interface(s) that can be used in that combination. In reality there can be deviations from this list, particularly if programming is -directly via a bootloader. Currently, the following MCU types are -understood: - -@cindex Device support - -@multitable @columnfractions .15 .45 -@include parts.texi -@end multitable - -(*) The AT90S2323 and ATtiny22 use the same algorithm. - -(**) Flash addressing above 128 KB is not supported by all -programming hardware. Known to work are jtag2, stk500v2, -and bit-bang programmers. - -(***) -The ATtiny11 can only be -programmed in high-voltage serial mode. - -(****) -The ISP programming protocol of the AT90S1200 differs in subtle ways -from that of other AVRs. Thus, not all programmers support this -device. Known to work are all direct bitbang programmers, and all -programmers talking the STK500v2 protocol. +directly via a bootloader. See @ref{List of Parts} for a full and detailed +listing of supported parts. @item -p @var{wildcard/flags} @cindex Option @code{-p} @var{wildcard/flags} +@cindex @code{-p} @var{wildcard/flags} Run developer options for MCUs that are matched by @var{wildcard}. Whilst their main use is for developers some @var{flags} can be of utility for users, e.g., @code{avrdude -p m328p/S} outputs AVRDUDE's understanding of @@ -474,6 +539,7 @@ ATmega328P MCU properties; for more information run @code{avrdude -p x/h}. @item -b @var{baudrate} @cindex Option @code{-b} @var{baudrate} +@cindex @code{-b} @var{baudrate} Override the RS-232 connection baud rate specified in the respective programmer's @code{baudrate} entry of the configuration file or defined by the @code{default_baudrate} entry in your @@ -482,10 +548,11 @@ file if no @code{baudrate} entry was provided for this programmer. @item -B @var{bitclock} @cindex Option @code{-B} @var{bitclock} +@cindex @code{-B} @var{bitclock} Specify the bit clock period for the JTAG, PDI, TPI, UPDI, or ISP interface. The value is a floating-point number in microseconds. -Alternatively, the value might be suffixed with "Hz", "kHz" or -"MHz" in order to specify the bit clock frequency rather than a +Alternatively, the value might be suffixed with Hz, kHz or +MHz in order to specify the bit clock frequency rather than a period. Some programmers default their bit clock value to a 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Slower MCUs need a correspondingly higher bit @@ -498,41 +565,36 @@ can use the 'default_bitclock' keyword in your configuration file to assign a default value to keep from having to specify this option on every invocation. -Note that some official Microchip programmers store the bitclock setting and -will continue to use it until a different value is provided. This applies to -"2nd gen" programmers (AVRISPmkII, AVR Dragon, JTAG ICE mkII, STK600) and -"3rd gen"programmers (JTAGICE3, Atmel ICE, Power Debugger). "4th gen" -programmers (PICkit 4, MPLAB SNAP) will store the last user-specified bitclock -until the programmer is disconnected from the computer. +Note that some official Microchip programmers store the bitclock setting +and will continue to use it until a different value is provided. This +applies to 2nd generation programmers (AVRISPmkII, AVR Dragon, JTAG ICE +mkII, STK600) and 3rd generation programmers (JTAGICE3, Atmel ICE, Power +Debugger). 4th generation programmers (PICkit 4, MPLAB(R) SNAP) will store +the last user-specified bitclock until the programmer is disconnected from +the computer. @item -c @var{programmer-id} @cindex Option @code{-c} @var{programmer-id} -Specify the programmer to be used. AVRDUDE knows about several common -programmers. Use this option to specify which one to use. The -@var{programmer-id} parameter is the programmer's id listed in the -configuration file. Specify @code{-c ?} to list all programmers in the -configuration file. If you have a programmer that is unknown to AVRDUDE, -and the programmer is controlled via the PC parallel port, there's a good -chance that it can be easily added to the configuration file without any -code changes to AVRDUDE. Simply copy an existing entry and change the pin -definitions to match that of the unknown programmer. If @code{-c ?} is -specified with a specific part, see @code{-p} above, then only those -programmers are output that expect to be able to handle this part, -together with the programming interface(s) that can be used in that -combination. In reality there can be deviations from this list, -particularly if programming is directly via a bootloader. Currently, the -following programmer ids are understood and supported: - -@cindex Programmer support - -@multitable @columnfractions .3 .68 -@include programmers.texi -@end multitable - - +@cindex @code{-c} @var{programmer-id} + +Specify the programmer to be used. AVRDUDE knows about quite a few +programmers. The @var{programmer-id} parameter is the programmer's id +listed in the configuration file. Specify @code{-c ?} to list all +programmers in the configuration file. If you have a programmer that is +unknown to AVRDUDE but related to a known programmer there is some chance +that it can be added to the configuration file without any code changes to +AVRDUDE: copy a similar entry and change those features that differ to +match that of the unknown programmer. If @code{-c ?} is specified with a +specific part, see @code{-p} above, then only those programmers are output +that expect to be able to handle this part, together with the programming +interface(s) that can be used in that combination. In reality there can be +deviations from this list, particularly if programming is directly via a +bootloader. See @ref{List of Programmers} for a full and detailed listing +of known programmers. @item -c @var{wildcard/flags} @cindex Option @code{-c} @var{wildcard/flags} +@cindex @code{-c} @var{wildcard/flags} Run developer options for programmers that are matched by @var{wildcard}. Whilst their main use is for developers some @var{flags} can be of utility for users, e.g., @code{avrdude -c usbtiny/S} shows AVRDUDE's understanding of @@ -540,6 +602,7 @@ usbtiny's properties; for more information run @code{avrdude -c x/h}. @item -C @var{config-file} @cindex Option @code{-C} @var{config-file} +@cindex @code{-C} @var{config-file} @cindex Configuration files Use the specified config file for configuration data. This file contains all programmer and part definitions that AVRDUDE knows about. @@ -569,12 +632,15 @@ line. @item -N @cindex Option @code{-N} +@cindex @code{-N} Do not load the personal configuration file that is usually located at @code{~/.config/avrdude/avrdude.rc}, @code{~/.avrduderc} or in the same directory as the avrdude executable. @item -A @cindex Option @code{-A} +@cindex @code{-A} +@cindex @code{flash} Disable the automatic removal of trailing-0xFF sequences in file input that is to be programmed to flash and in AVR reads from flash memory. Normally, trailing 0xFFs can be discarded, as flash programming requires @@ -586,6 +652,8 @@ The popular Arduino bootloader exhibits this behaviour; for this reason @item -D @cindex Option @code{-D} +@cindex @code{-D} +@cindex @code{flash} Disable auto-erase for flash. When the @code{-U} option for writing to any flash memory is specified, avrdude will perform a chip erase before starting any of the programming operations, since it generally is a @@ -598,6 +666,9 @@ contents. Setting @code{-D} implies @code{-A}. @item -e @cindex Option @code{-e} +@cindex @code{-e} +@cindex @code{flash} +@cindex @code{eeprom} Causes a chip erase to be executed. This will reset the contents of the flash ROM and EEPROM to the value @code{0xff}, and clear all lock bits. Except for ATxmega and UPDI (AVR8X family) devices, all of which can use @@ -611,7 +682,8 @@ sequence of @code{-U}, @code{-T} or @code{-t} options it is recommended to use @code{-T} erase instead which is processed in the given command line order. -@cindex auto-erase +@cindex Auto-erase +@cindex @code{flash} In absence of an explicit @code{-e} or @code{-D} option avrdude tries to augur from the command line whether or not the chip should be auto-erased at the beginning. If avrdude detects a @code{-U} command that writes to @@ -620,12 +692,14 @@ unless a @code{-T} erase commad has been detected beforehand and unless flash is read before writing to it. For the purpose of this analysis any terminal command is considered to possibly read flash. +@cindex @code{eeprom} Note that for reprogramming EEPROM cells, no explicit prior chip erase is required since the MCU provides an auto-erase cycle in that case before programming the cell. @item -E @var{exitspec}[,@dots{}] @cindex Option @code{-E} @var{exitspec}[,@dots{}] +@cindex @code{-E} @var{exitspec}[,@dots{}] Pass @var{exitspec} to the programmer. The interpretation of the exitspec parameter depends on the programmer itself. See below for a list of programmers accepting exitspec parameter options or issue @@ -635,6 +709,8 @@ Multiple @var{exitspec} options can be separated with commas. @item -F @cindex Option @code{-F} +@cindex @code{-F} +@cindex @code{signature} Normally, AVRDUDE tries to verify that the device signature read from the part is reasonable before continuing. Since it can happen from time to time that a device has a broken (erased or overwritten) device @@ -649,6 +725,7 @@ of connection between a programmer and a target. @item -i @var{delay} @cindex Option @code{-i} @var{delay} +@cindex @code{-i} @var{delay} For bitbang-type programmers, delay for approximately @var{delay} microseconds between each bit state change. @@ -667,26 +744,32 @@ slow machines. @item -l @var{logfile} @cindex Option @code{-l} @var{logfile} +@cindex @code{-l} @var{logfile} Use @var{logfile} rather than @var{stderr} for diagnostics output. Note that initial diagnostic messages (during option parsing) are still written to @var{stderr} anyway. @item -n @cindex Option @code{-n} +@cindex @code{-n} No-write: disables writing data to the MCU whilst processing @code{-U} (useful for debugging AVRDUDE). The terminal mode continues to write to the device. @item -O @cindex Option @code{-O} +@cindex @code{-O} +@cindex @code{calibration} Perform a RC oscillator run-time calibration according to Atmel application note AVR053. This is only supported on the STK500v2, AVRISP mkII, and JTAG ICE mkII hardware. +@cindex @code{eeprom} Note that the result will be stored in the EEPROM cell at address 0. @item -P @var{port} @cindex Option @code{-P} @var{port} +@cindex @code{-P} @var{port} Use @var{port} to identify the connection through which the programmer is attached. This can be a parallel, serial, spi or linuxgpio connection. The @@ -773,6 +856,7 @@ Posix systems (by now). @item -r @cindex Option @code{-r} +@cindex @code{-r} Opens the serial port at 1200 baud and immediately closes it, waits 400 ms for each @code{-r} on the command line and then establishes communication with the programmer. This is commonly known as a "1200bps touch", and is @@ -783,16 +867,19 @@ powerful hosts. @item -q @cindex Option @code{-q} +@cindex @code{-q} Disable (or quell) output of the progress bar while reading or writing to the device. Specify it a second time for even quieter operation. @item -s, -u @cindex Option @code{-s}, @code{-u} +@cindex @code{-s}, @code{-u} These options used to control the obsolete "safemode" feature which is no longer present. They are silently ignored for backwards compatibility. @item -T @var{cmd} @cindex Option @code{-T} @var{cmd} +@cindex @code{-T} @var{cmd} Run terminal line @var{cmd} when it is its turn in relation to other @code{-t} interactive terminals, @code{-T} terminal commands and @code{-U} memory operations. Except for the simplest of terminal commands @@ -802,12 +889,14 @@ terminal commands. @item -t @cindex Option @code{-t} +@cindex @code{-t} Tells AVRDUDE to run an interactive terminal when it is its turn in relation to other @code{-t} interactive terminals, @code{-T} terminal commands and @code{-U} memory operations. @item -U @var{memory}:@var{op}:@var{filename}[:@var{format}] @cindex Option @code{-U} @var{memory}:@var{op}:@var{filename}[:@var{format}] +@cindex @code{-U} @var{memory}:@var{op}:@var{filename}[:@var{format}] Perform a memory operation when it is its turn in relation to other @code{-t} interactive terminals, @code{-T} terminal commands and @code{-U} @@ -826,6 +915,10 @@ from the list so far by preceding a minus or backslash, eg, line or the @code{part} command in the interactive terminal to display all the memories supported by a particular device. +@cindex @code{calibration} +@cindex @code{signature} +@cindex @code{flash} +@cindex @code{eeprom} Typically, a device's memory configuration at least contains the memory types @code{flash}, @code{eeprom}, @code{signature} and @code{lock}, which is sometimes known as @code{lockbits}. The signature memory contains the @@ -838,6 +931,8 @@ typically have fuse bytes, which are read/write memories for configuration of the device and calibration memories that typically contain read-only factory calibration values. +@cindex @code{flash} +@cindex @code{eeprom} The flash memory, being physically implemented as NOR-memory, is special in the sense that it is normally only possible to program bits to change from 1 to 0. Before reprogramming takes place normally flash memory has to @@ -853,154 +948,8 @@ be noted that in absence of the @code{-e} chip erase option any ATxmega or UPDI flash pages not affected by the programming will retain their previous content. -Classic devices may have the following memories in addition to -@code{eeprom}, @code{flash}, @code{signature} and @code{lock}: -@table @code -@item calibration -One or more bytes of RC oscillator calibration data -@item efuse -Extended fuse byte -@item fuse -Fuse byte in devices that have only a single fuse byte -@item hfuse -High fuse byte -@item lfuse -Low fuse byte -@item prodsig -Signature, calibration byte and serial number in a small read-only memory, -which is only documented to be available for ATmega324PB, ATmega328PB, -ATtiny102 and ATtiny104; AVRDUDE generally tries to make this memory -available, also for parts where it is not documented, but not all -programmers may be able to read this memory -@item sigrow -Memory alias for prodsig -@item sernum -The serial number part of prodsig; owing to scarce documentation this may not -actually turn out to be a serial number or be readable by some programmers -@item usersig -Three extra flash pages for firmware settings; this memory is not erased -during a chip erase. Only some classic parts, -ATmega(64|128|256|644|1284|2564)RFR2, have a usersig memory. Usersig is -different to flash in the sense that it can neither be accessed with ISP -serial programming nor written to by bootloaders. AVRDUDE offers JTAG -programming of classic-part usersig memories. As with all flash-type -memories the @code{-U} option can only write 0-bits but not 1-bits. -Hence, usersig needs to be erased before a file can be uploaded to this -memory region, e.g., using @code{-T "erase usersig" -U -usersig:w:parameters.hex:i} -@item io -Volatile register memory; it cannot be accessed by external programming -methods only by bootloaders, which has limited use unless the bootloader -jumps to the application directly, i.e., without a WDT reset -@item sram -Volatile RAM memory; like @code{io} it cannot be accessed by external -programming -@end table - -ATxmega devices have the following memories in addition to -@code{eeprom}, @code{flash}, @code{signature} and @code{lock}: -@table @code -@item application -Application flash area -@item apptable -Application table flash area -@item boot -Boot flash area -@item calibration -An area of 4 (ATxmega-A series) or 5 bytes (ATxmega-B/C/D/E) with -oscillator calibration values; this is a sub-memory of @code{prodsig} -@item fuses -A logical memory of 7 bytes containing all @code{fuse}X of a part, which -can be used to program all fuses at the same time; note that some of the -fuse bytes will be reserved, though -@item fuse0 -A.k.a. jtaguid: JTAG user ID for some devices -@item fuse1 -Watchdog configuration -@item fuse6 -Fault detection action configuration TC4/5 for ATxmega E series parts -@item fuse@emph{N} -Other fuse bytes of ATxmega devices, where @emph{N} is 2, 4 or 5, for system configuration -@item prodsig -The production signature row is a read-only memory section for factory -programmed data such as calibration values for oscillators or analogue -modules; it also contains a serial number that consists of the production -lot number, wafer number and wafer coordinates for the part -@item sernum -Serial number with a unique ID for the part consisting of 10 bytes; these -are part of the @code{prodsig} memory above -@item sigrow -Memory alias for prodsig -@item tempsense -A two-byte memory, which is located within @code{prodsig}; it contains a 12-bit -temperature sensor calibration value -@item usersig -Additional flash memory page that can be used for firmware settings; this -memory is not erased during a chip erase -@item io -Volatile register memory; AVRDUDE can read this memory but not write to it -using external programming -@item sram -Volatile RAM memory; cannot be usefully accessed by external programming -@end table - -Modern 8-bit AVR devices have the following memories in addition to -@code{eeprom}, @code{flash}, @code{signature} and @code{lock}: -@table @code -@item fuse0 -A.k.a. wdtcfg: watchdog configuration -@item fuse1 -A.k.a. bodcfg: brownout detection configuration -@item fuse2 -A.k.a. osccfg: oscillator configuration -@item fuse4 -A.k.a. tcd0cfg (not all devices): timer counter type D configuration -@item fuse5 -A.k.a. syscfg0: system configuration 0 -@item fuse6 -A.k.a. syscfg1: system configuration 1 -@item fuse7 -A.k.a. append or codesize: either the end of the application code section or the code size in blocks of 256/512 bytes -@item fuse8 -A.k.a. bootend or bootsize: end of the boot section or the boot size in blocks of 256/512 bytes -@item fusea -A.k.a. pdicfg: configures/locks updi access; it is the only fuse that consists of two bytes -@item fuses -A logical memory of up to 16 bytes containing all fuseX of a part, which can be used to program all fuses at the same time -@item osc16err -Two bytes typically describing the 16 MHz oscillator frequency error at 3 V and 5 V, respectively -@item osc20err -Two bytes typically describing the 20 MHz oscillator frequency error at 3 V and 5 V, respectively -@item osccal16 -Two oscillator calibration bytes for 16 MHz -@item osccal20 -Two oscillator calibration bytes for 20 MHz -@item prodsig -Read-only memory section for factory programmed data such as the -signature, calibration values and serial number -@item sigrow -Memory alias for prodsig -@item sernum -Serial number with a unique ID for the part (10 or 16 bytes) -@item tempsense -Temperature sensor calibration values -@item bootrow -Extra page of memory that is only accessible by the MCU in bootloader -code; UDPI can read and write this memory only when the device is -unlocked -@item userrow -Extra page of EEPROM memory that can be used for firmware settings; this -memory is not erased during a chip erase -@item sib -Special system information block memory with information about AVR family, chip revision etc. -@item io -Volatile register memory; AVRDUDE can program this memory but this is of -limited utility because anything written to the io memory will be undefined or -lost after reset; writing to individual registers in the terminal can -still be used, e.g., to test I/O ports -@item sram -Volatile RAM memory; can be read and written but contents will be lost after reset -@end table +See @ref{List of Memories} for a complete list of memories that AVR +devices can have. The @var{op} field specifies what operation to perform: @@ -1024,45 +973,56 @@ write. The @var{format} field is optional and contains the format of the file to read or write. Possible values are: @table @code +@cindex Intel Hex @item i Intel Hex @item I Intel Hex with comments on download and tolerance of checksum errors on upload +@cindex Motorola S-Record @item s Motorola S-Record +@cindex @code{flash} +@cindex Raw binary @item r raw binary; little-endian byte order, in the case of the flash data +@cindex ELF (Executable and Linkable Format) @item e ELF (Executable and Linkable Format), the final output file from the linker; currently only accepted as an input file +@cindex Immediate file mode @item m immediate mode; actual byte values are specified on the command line, separated by commas or spaces in place of the @var{filename} field of the @option{-U} option. This is useful for programming fuse bytes without having to create a single-byte file or enter terminal mode. +@cindex Auto-detect mode @item a auto detect; valid for input only, and only if the input is not provided at stdin. +@cindex Decimal file mode @item d decimal; this and the following formats generate one line of output for the respective memory section, forming a comma-separated list of the values. This can be particularly useful for subsequent processing, like for fuse bit settings. +@cindex Hexadecimal file mode @item h hexadecimal; each value will get the string @emph{0x} prepended. +@cindex Octal file mode @item o octal; each value will get a @emph{0} prepended unless it is less than 8 in which case it gets no prefix. +@cindex Binary file mode @item b binary; each value will get the string @emph{0b} prepended. @end table @@ -1095,30 +1055,36 @@ writing memories. Note also that if a @var{filename} contains a colon as penultimate character the @var{format} field is no longer optional since the last character would otherwise be misinterpreted as @var{format}. +@cindex @code{flash} When reading any kind of flash memory area (including the various sub-areas in Xmega devices), the resulting output file will be truncated to not contain trailing 0xFF bytes which indicate unprogrammed (erased) memory. Thus, if the entire memory is unprogrammed, this will result in an output file that has no contents at all. This behaviour can be overridden with the @code{-A} option. +@cindex @code{flash} As an abbreviation, the form @code{-U} @var{filename} is equivalent to specifying -@code{-U} @emph{flash:w:}@var{filename}@emph{:a}. +@code{-U} @emph{flash:w:}@var{filename}@emph{:a} or +@code{-U} @emph{application:w:}@var{filename}@emph{:a} for ATxmegas. This will only work if @var{filename} does not have a pair of colons in it that sandwich a single character as otherwise the first part might be interpreted as memory, and the single character as memory operation. @item -v @cindex Option @code{-v} +@cindex @code{-v} Enable verbose output. More @code{-v} options increase verbosity level. @item -V @cindex Option @code{-V} +@cindex @code{-V} Disable automatic verify check when uploading data with @code{-U}. @item -x @var{extended_param} @cindex Option @code{-x} @var{extended_param} +@cindex @code{-x} @var{extended_param} Pass @var{extended_param} to the chosen programmer implementation as an extended parameter. The interpretation of the extended parameter depends on the programmer itself. See below for a list of programmers @@ -1134,25 +1100,34 @@ see the extended options of the chosen programmer. @node Programmers Accepting Exitspec Parameter, Programmers Accepting Extended Parameters, Option Descriptions, Command Line Options @section Programmers Accepting Exitspec Parameters @cindex Programmers accepting exitspec parameters -@table @code +@cindex FLIP bootloader @cindex Option @code{-x} flip2 +@cindex @code{-x} flip2 @cindex Option @code{-x} linuxspi +@cindex @code{-x} linuxspi @cindex Option @code{-x} parallel port programmers +@cindex @code{-x} parallel port programmers + +Currently, only the @code{flip2}, @code{linuxspi} and old school parallel +port programmers such as @code{stk200} and @code{dapa} support @code{-E} +exitspec parameter options. These let the user decide in which state the +programmer pins after ended programming session. AVRDUDE only allows one +@code{-E} option. However, multiple exitspec parameters can be specified +as one comma-separated list. + +@table @code @item flip2 @itemx linuxspi @itemx Parallel port programmers -Currently, only the @code{flip2}, @code{linuxspi} and old school parallel port programmers -such as @code{stk200} and @code{dapa} support exitspec parameter options. These lets the user -decide in which state the programmer pins after ended programming session. -Multiple exitspec options can be separated with commas. - @table @code -@item @samp{help} +@item help Show help menu and exit. -@item @samp{reset} +@cindex Option @code{-E} reset +@cindex @code{-E} reset +@item reset The `/RESET' signal will be left activated at program exit, that is it will be held low, in order to keep the MCU in reset state afterwards. Note in particular that the programming algorithm for the AT90S1200 @@ -1160,37 +1135,46 @@ device mandates that the `/RESET' signal is active before powering up the MCU, so in case an external power supply is used for this MCU type, a previous invocation of AVRDUDE with this option specified is one of the possible ways to guarantee this condition. @code{flip2} will not -exit bootloader mode at program exit if @samp{reset} is used. +exit bootloader mode at program exit if @code{reset} is used. -@item @samp{noreset} +@cindex Option @code{-E} noreset +@cindex @code{-E} noreset +@item noreset The `/RESET' line will be deactivated at program exit, thus allowing the MCU target program to run while the programming hardware remains connected. @code{flip2} will exit bootloader mode at program exit and -start the application if @samp{noreset} is used, and this is the default +start the application if @code{noreset} is used, and this is the default behaviour for this bootloader. @end table @cindex Option @code{-x} parallel port programmers +@cindex @code{-x} parallel port programmers @item Parallel port programmers -Parallel port based programmers have a few more options. - @table @code -@item @samp{vcc} +@cindex Option @code{-E} vcc +@cindex @code{-E} vcc +@item vcc This option will leave those parallel port pins active (i. e. high) that can be used to supply `Vcc' power to the MCU. -@item @samp{novcc} +@cindex Option @code{-E} novcc +@cindex @code{-E} novcc +@item novcc This option will pull the `Vcc' pins of the parallel port down at program exit. -@item @samp{d_high} +@cindex Option @code{-E} d_high +@cindex @code{-E} d_high +@item d_high This option will leave the 8 data pins on the parallel port active -(i. e. high). +(i.e. high). -@item @samp{d_low} +@cindex Option @code{-E} d_low +@cindex @code{-E} d_low +@item d_low This option will leave the 8 data pins on the parallel port inactive -(i. e. low). +(i.e. low). @end table @end table @@ -1202,17 +1186,30 @@ This option will leave the 8 data pins on the parallel port inactive @node Programmers Accepting Extended Parameters, Example Command Line Invocations, Programmers Accepting Exitspec Parameter, Command Line Options @section Programmers Accepting Extended Parameters @cindex Programmers accepting extended parameters + +Extended parameters are programmer-specific options; they all start with +@code{-x}. Generally, each programmer will allow @code{-x help}, which +will show a help menu of known extended parameters for this programmer, if +any, and exit. The extended parameters below are all shown without the +necessary @code{-x} option lead-in. AVRDUDE allows any number of @code{-x} +extended parameters to be specified on the command line. + @table @code +@cindex Emulating a bootloader (dryboot) +@cindex Emulating a HW programmer (dryrun) @cindex Option @code{-x} dryboot +@cindex @code{-x} dryboot @cindex Option @code{-x} dryrun +@cindex @code{-x} dryrun @item dryrun @itemx dryboot Both dryrun and dryboot programmers emulate programming and accept the following parameters: @table @code -@item @samp{init} +@cindex @code{flash} +@item init Initialise memories with human-readable patterns. Flash memory will be randomly configured with respect to bootloader, data and code length. Patterns can best be seen with fixed-width font and the @code{:I} format @@ -1221,116 +1218,145 @@ flash:r:-:I}. Patterns in flash memory are executable and represent benign AVR code, ie, no I/O memory access. Choose a fixed seed for reproducible results. -@item @samp{init=} +@item init= Shortcut for @code{-x init -x seed=} (see below) -@item @samp{random} +@cindex @code{flash} +@item random Initialise memories with random code and values. Flash memory will be randomly configured with respect to bootloader, data and code length. Random code in flash will be benign, that is, not accessing I/O memories, SRAM or flash. Choose a fixed seed for reproducible results. -@item @samp{random=} +@item random= Shortcut for @code{-x random -x seed=} -@item @samp{seed=} +@item seed= Seed random number generator with @var{n}; the default is @code{time(NULL)}. Setting this option with a fixed positive @var{n} will make the random choices reproducible, ie, they will stay the same between different avrdude runs. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} JTAG ICE mkII/3 +@cindex @code{-x} JTAG ICE mkII/3 @cindex Option @code{-x} Atmel-ICE +@cindex @code{-x} Atmel-ICE @cindex Option @code{-x} PICkit 4 -@cindex Option @code{-x} MPLAB SNAP +@cindex @code{-x} PICkit 4 +@cindex Option @code{-x} MPLAB(R) SNAP +@cindex @code{-x} MPLAB(R) SNAP @cindex Option @code{-x} Power Debugger +@cindex @code{-x} Power Debugger @cindex Option @code{-x} AVR Dragon +@cindex @code{-x} AVR Dragon +@cindex Atmel JTAG ICE mkII +@cindex JTAG ICE mkII +@cindex Atmel AVR JTAGICE3 +@cindex AVR JTAGICE3 +@cindex JTAGICE3 +@cindex MPLAB(R) PICkit 4 +@cindex PICkit 4 +@cindex MPLAB(R) PICkit 5 +@cindex PICkit 5 +@cindex MPLAB(R) SNAP +@cindex SNAP +@cindex Atmel PowerDebugger +@cindex PowerDebugger +@cindex Atmel AVR Dragon +@cindex AVR Dragon +@cindex Dragon @item JTAG ICE mkII/3 @itemx Atmel-ICE @itemx PICkit 4 -@itemx MPLAB SNAP +@itemx MPLAB(R) SNAP @itemx Power Debugger @itemx AVR Dragon -When using the JTAG ICE mkII, JTAGICE3, Atmel-ICE, PICkit 4, MPLAB SNAP, +When using the JTAG ICE mkII, JTAGICE3, Atmel-ICE, PICkit 4, MPLAB(R) SNAP, Power Debugger or AVR Dragon in JTAG mode, the following extended parameter is accepted: @table @code -@item @samp{jtagchain=UB,UA,BB,BA} +@item jtagchain=UB,UA,BB,BA Setup the JTAG scan chain for @var{UB} units before, @var{UA} units after, @var{BB} bits before, and @var{BA} bits after the target AVR, respectively. Each AVR unit within the chain shifts by 4 bits. Other JTAG units might require a different bit shift count. -@item @samp{hvupdi} +@item hvupdi @var{Power Debugger and Pickit 4 only} @* High-voltage UPDI programming is used to enable a UPDI pin that has previously -been set to RESET or GPIO mode. Use @samp{-x hvupdi} to enable high-voltage UPDI +been set to RESET or GPIO mode. Use @code{-x hvupdi} to enable high-voltage UPDI initialization for supported targets. -@item @samp{vtarg=VALUE, vtarg} +@item vtarg=VALUE, vtarg @var{Power Debugger only} @* The voltage generator can be enabled by setting a target voltage. -The current set-voltage can be read by @samp{-x vtarg} alone. +The current set-voltage can be read by @code{-x vtarg} alone. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} PICkit 4 -@cindex Option @code{-x} MPLAB SNAP +@cindex @code{-x} PICkit 4 +@cindex Option @code{-x} MPLAB(R) SNAP +@cindex @code{-x} MPLAB(R) SNAP +@cindex MPLAB(R) PICkit 4 +@cindex MPLAB(R) SNAP +@cindex SNAP +@cindex PICkit 4 @item PICkit 4 -@item MPLAB SNAP +@item MPLAB(R) SNAP -The PICkit 4 and MPLAB SNAP programmers accept the following extended parameters: +The PICkit 4 and MPLAB(R) SNAP programmers accept the following extended parameters: @table @code -@item @samp{mode=avr,pic} -Switch programmer to AVR or PIC mode, then exit: the PICkit 4 and MPLAB SNAP +@item mode=avr,pic +Switch programmer to AVR or PIC mode, then exit: the PICkit 4 and MPLAB(R) SNAP programmer can only be utilised by Avrdude when in AVR mode. -Use @samp{-x mode=avr} for switching to AVR mode, or @samp{-x mode=pic} +Use @code{-x mode=avr} for switching to AVR mode, or @code{-x mode=pic} for switching to PIC mode. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} PICkit 5 +@cindex @code{-x} PICkit 5 +@cindex MPLAB(R) PICkit 4 +@cindex PICkit 4 +@cindex MPLAB(R) PICkit 5 +@cindex PICkit 5 @item PICkit 5 @item PICkit 4 (PIC Mode) The PICkit 5 and PICkit 4 (PIC Mode) programmer can accept following extended parameters @table @code -@item @samp{vtarg=VALUE} +@item vtarg=VALUE Specify a voltage between 1.8 and 5.5@w{ }V that the programmer should supply to the target. If there is already a valid voltage applied to the VTG Pin, this setting will be ignored. When AVRDUDE detects an external voltage outside of this range, it will terminate the operation. You can disable this by setting the voltage to 0@w{ }V. -@item @samp{hvupdi} +@item hvupdi High-voltage UPDI programming is used to enable a UPDI pin that has previously -been set to RESET or GPIO mode. Use @samp{-x hvupdi} to enable high-voltage UPDI +been set to RESET or GPIO mode. Use @code{-x hvupdi} to enable high-voltage UPDI initialization for supported targets. Depending on the target, the HV pulse will be applied either on the RST pin, or the UPDI pin. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} Xplained Mini +@cindex @code{-x} Xplained Mini +@cindex Atmel XplainedMini +@cindex XplainedMini @item Xplained Mini The Xplained Mini/Nano programmer (ISP or UPDI, not TPI) type accepts the following extended parameters: @table @code -@item @samp{suffer=VALUE}, @samp{suffer} +@item suffer=VALUE, @code{suffer} The SUFFER register allows the user to modify the behavior of the on-board mEDBG. -The current state can be read by @samp{-x suffer} alone. +The current state can be read by @code{-x suffer} alone. @table @code @item Bit 7 ARDUINO: Adds control of extra LEDs when set to 0 @@ -1346,81 +1372,87 @@ Fuses are safe-masked when bit sent to 1. Fuses are unprotected when set to 0 @end table @table @code -@item @samp{vtarg_switch=VALUE}, @samp{vtarg_switch} +@item vtarg_switch=VALUE, @code{vtarg_switch} The on-board target voltage switch can be turned on or off by writing a 1 or -a 0. The current state can be read by @samp{-x vtarg_switch} alone. +a 0. The current state can be read by @code{-x vtarg_switch} alone. Note that the target power switch will always be on after a power cycle. Also note that the smaller Xplained Nano boards does not have a target power switch. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} Curiosity Nano +@cindex @code{-x} Curiosity Nano +@cindex Curiosity nano @item Curiosity Nano The Curiosity Nano board accepts the following extended parameter: @table @code -@item @samp{vtarg=VALUE, vtarg} +@item vtarg=VALUE, vtarg The generated on-board target voltage can be changed by specifying a new voltage. -The current set-voltage can be read by @samp{-x vtarg} alone. -@item @samp{help} -Show help menu and exit. +The current set-voltage can be read by @code{-x vtarg} alone. @end table @cindex Option @code{-x} STK500 +@cindex @code{-x} STK500 @cindex Option @code{-x} STK600 +@cindex @code{-x} STK600 +@cindex Atmel STK500 +@cindex STK500 +@cindex Atmel STK600 +@cindex STK600 @item STK500 @item STK600 The STK500 and STK600 boards accept the following extended parameters: @table @code -@item @samp{vtarg=VALUE, vtarg} +@item vtarg=VALUE, vtarg The generated on-board target voltage can be changed by specifying a new voltage. -The current set-voltage can be read by @samp{-x vtarg} alone. -@item @samp{fosc=VALUE[MHz|M|kHz|k|Hz|H], fosc} +The current set-voltage can be read by @code{-x vtarg} alone. +@item fosc=VALUE[MHz|M|kHz|k|Hz|H], fosc Set the programmable oscillator frequency in MHz, kHz or Hz. -The current frequency can be read by @samp{-x fosc} alone. -@item @samp{varef=VALUE, varef} +The current frequency can be read by @code{-x fosc} alone. +@item varef=VALUE, varef The generated on-board analog reference voltage can be changed by specifying a new reference voltage. The current reference voltage can be read by -@samp{-x varef} alone. -@item @samp{varef[0,1]=VALUE, varef[0,1]} +@code{-x varef} alone. +@item varef[0,1]=VALUE, varef[0,1] @var{STK600 only} @* The generated on-board analog reference voltage for channel 0 or channel 1 can be changed by specifying a new reference voltage. -The current reference voltage can be read by @samp{-x varef0} or -@samp{-x varef1} alone. -@item @samp{attempts[=<1..99>]} +The current reference voltage can be read by @code{-x varef0} or +@code{-x varef1} alone. +@item attempts[=<1..99>] @var{STK500V1 only} @* Specify how many connection retry attempts to perform before exiting. Defaults to 10 if not specified. -@item @samp{xtal=VALUE[MHz|M|kHz|k|Hz|H]} +@item xtal=VALUE[MHz|M|kHz|k|Hz|H] Defines the XTAL frequency of the programmer if it differs from 7.3728 MHz of the original STK500. Used by avrdude for the correct calculation of fosc and sck. -@item @samp{help} -Show help menu and exit. @end table +@cindex Atmel bootloader (AVR109, AVR911) +@cindex Bootloader (AVR109, AVR911) @cindex Option @code{-x} AVR109 +@cindex @code{-x} AVR109 @item AVR109 The AVR109 programmer type accepts the following extended parameter: @table @code -@item @samp{autoreset} +@item autoreset Toggle RTS/DTR lines on port open to issue a hardware reset. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} AVR910 +@cindex @code{-x} AVR910 +@cindex Atmel low-cost programmer AVR910 +@cindex Low-cost programmer AVR910 @item AVR910 -The AVR910 programmer type accepts the following extended parameter: +The Atmel low-cost AVR910 programmer type accepts the following extended parameter: @table @code -@item @samp{devcode=VALUE} +@item devcode=VALUE Override the device code selection by using @var{VALUE} as the device code. The programmer is not queried for the list of supported @@ -1429,86 +1461,95 @@ is not verified but used directly within the @code{T} command sent to the programmer. @var{VALUE} can be specified using the conventional number notation of the C programming language. -@item @samp{no_blockmode} +@item no_blockmode Disables the default checking for block transfer capability. Use -@samp{no_blockmode} only if your @samp{AVR910} +@code{no_blockmode} only if your @code{AVR910} programmer creates errors during initial sequence. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} Arduino +@cindex @code{-x} Arduino +@cindex Arduino bootloader @item Arduino The Arduino programmer type accepts the following extended parameter: @table @code -@item @samp{attempts[=<1..99>]} +@item attempts[=<1..99>] Specify how many connection retry attempts to perform before exiting. Defaults to 10 if not specified. -@item @samp{noautoreset} +@item noautoreset Do not toggle RTS/DTR lines on port open to prevent a hardware reset. -@item @samp{help} -Show help menu and exit. @end table +@cindex Urboot bootloader +@cindex Urclock programmer +@cindex Urprotocol @cindex Option @code{-x} Urclock +@cindex @code{-x} Urclock @item Urclock The urclock programmer type accepts the following extended parameters: @table @code -@item @samp{showall} +@item showall Show all info for the connected part, then exit. The @code{-x show...} options below can be used to assemble a bespoke response consisting of a subset (or only one item) of all available relevant information about the connected part and bootloader. -@item @samp{showid} +@cindex @code{flash} +@cindex @code{eeprom} +@item showid Show a unique Urclock ID stored in either flash or EEPROM of the MCU, then exit. -@item @samp{id=..} +@item id=.. Historically, the Urclock ID was a six-byte unique little-endian number stored in Urclock boards at EEPROM address 257. The location of this number can be set by the @code{-x id=..} extended parameter. @code{E} stands for EEPROM and @code{F} stands for flash. A negative address addr counts from the end of EEPROM and flash, respectively. The length len of the Urclock ID can be between 1 and 8 bytes. -@item @samp{showdate} +@cindex @code{flash} +@item showdate Show the last-modified date of the input file for the flash application, then exit. If the input file was stdin, the date will be that of the programming. Date and filename are part of the metadata that the urclock programmer stores by default in high flash just under the bootloader; see also +@cindex @code{flash} @code{-x nometadata}. -@item @samp{showfilename} +@item showfilename Show the input filename (or title) of the last flash writing session, then exit. -@item @samp{title=} +@item title= When set, will be used in lieu of the input filename. The maximum string length for the title/filename field is 254 bytes including terminating nul. -@item @samp{showapp} +@item showapp Show the size of the programmed application, then exit. -@item @samp{showstore} +@cindex @code{flash} +@item showstore Show the size of the unused flash between the application and metadata, then exit. -@item @samp{showmeta} +@item showmeta Show the size of the metadata just below the bootloader, then exit. -@item @samp{showboot} +@item showboot Show the size of the bootloader, then exit. -@item @samp{showversion} +@item showversion Show bootloader version and capabilities, then exit. -@item @samp{showvector} +@item showvector Show the vector number and name of the interrupt table vector used by the bootloader for starting the application, then exit. For hardware-supported bootloaders this will be vector 0 (Reset), and for vector bootloaders this will be any other vector number of the interrupt vector table or the slot just behind the vector table with the name @code{VBL_ADDITIONAL_VECTOR}. -@item @samp{showpart} +@item showpart Show the part for which the bootloader was compiled, then exit. -@item @samp{bootsize=} +@cindex @code{flash} +@item bootsize= Manual override for bootloader size. Urboot bootloaders put the number of used bootloader pages into a table at the top of the bootloader section, i.e., typically top of flash, so the urclock programmer can look up the bootloader size itself. In backward-compatibility mode, when programming via other bootloaders, this option can be used to tell the programmer the size, and therefore the location, of the bootloader. -@item @samp{vectornum=} +@cindex @code{flash} +@item vectornum= Manual override for vector number. Urboot bootloaders put the vector number used by a vector bootloader into a table at the top of flash, so this option is normally not needed for urboot bootloaders. However, it is @@ -1516,11 +1557,13 @@ useful in backward-compatibility mode (or when the urboot bootloader does not offer flash read). Specifying a vector number in these circumstances implies a vector bootloader whilst the default assumption would be a hardware-supported bootloader. -@item @samp{eepromrw} +@cindex @code{eeprom} +@item eepromrw Manual override for asserting EEPROM read/write capability. Not normally needed for urboot bootloaders, but useful for in backward-compatibility mode if the bootloader offers EEPROM read/write. -@item @samp{emulate_ce} +@cindex @code{flash} +@item emulate_ce If an urboot bootloader does not offer a chip erase command it will tell the urclock programmer so during handshake. In this case the urclock programmer emulates a chip erase, if warranted by user command line @@ -1528,7 +1571,8 @@ options, by filling the remainder of unused flash below the bootloader with 0xff. If this option is specified, the urclock programmer will assume that the bootloader cannot erase the chip itself. The option is useful for backwards-compatible bootloaders that do not implement chip erase. -@item @samp{restore} +@cindex @code{flash} +@item restore Upload unchanged flash input files and trim below the bootloader if needed. This is most useful when one has a backup of the full flash and wants to play that back onto the device. No metadata are written in this @@ -1538,19 +1582,25 @@ input file will not be uploaded for which the reset vector does not point to the vector bootloader. This is to avoid writing an input file to the device that would render the vector bootloader not functional as it would not be reached after reset. -@item @samp{initstore} +@cindex @code{flash} +@item initstore On writing to flash fill the store space between the flash application and the metadata section with 0xff. -@item @samp{nofilename} +@cindex @code{flash} +@item nofilename On writing to flash do not store the application input filename (nor a title). -@item @samp{nodate} +@cindex @code{flash} +@item nodate On writing to flash do not store the application input filename (nor a title) and no date either. -@item @samp{nostore} +@cindex @code{flash} +@item nostore On writing to flash do not store metadata except the metadata code byte @code{0xff} saying there are no metadata. In particular, no data store frame is programmed. -@item @samp{nometadata} +@cindex @code{flash} +@cindex Metadata +@item nometadata Do not support any metadata. The full flash besides the bootloader is available for the application. If the application is smaller than the available space then a metadata code byte @code{0xff} is stored @@ -1564,27 +1614,28 @@ available, so that a such prepared flash can always be queried with @code{avrdude -x showall}. In contrast to this, it cannot be guaranteed that a @code{-x showall} query on flash prepared with @code{-x nometadata} yields useful results. -@item @samp{noautoreset} +@item noautoreset Do not toggle RTS/DTR lines on port open to prevent a hardware reset. -@item @samp{delay=} +@item delay= Add a ms delay after reset. This can be useful if a board takes a particularly long time to exit from external reset. can be negative, in which case the default 120 ms delay after issuing reset will be shortened accordingly. -@item @samp{strict} +@item strict Urclock has a faster, but slightly different strategy than -c arduino to synchronise with the bootloader; some stk500v1 bootloaders cannot cope with this, and they need the @code{-x strict} option. -@item @samp{help} -Show help menu and exit. @end table -@cindex Option @code{-x} Buspirate +@cindex Option @code{-x} BusPirate +@cindex @code{-x} BusPirate +@cindex The Bus Pirate +@cindex BusPirate @item BusPirate The BusPirate programmer type accepts the following extended parameters: @table @code -@item @samp{reset=cs,aux,aux2} +@item reset=cs,aux,aux2 The default setup assumes the BusPirate's CS output pin connected to the RESET pin on AVR side. It is however possible to have multiple AVRs connected to the same BP with SDI, SDO and SCK lines common for all of them. @@ -1603,7 +1654,7 @@ good candidates with the latches driven by the appropriate reset pin (cs, aux or aux2). Otherwise the SPI traffic in one active circuit may interfere with programming the AVR in the other design. -@item @samp{spifreq=@var{0..7}} +@item spifreq=@var{0..7} @multitable @columnfractions .05 .3 @item @code{0} @tab 30 kHz (default) @item @code{1} @tab 125 kHz @@ -1615,7 +1666,7 @@ with programming the AVR in the other design. @item @code{7} @tab 8 MHz @end multitable -@item @samp{rawfreq=0..3} +@item rawfreq=0..3 Sets the SPI speed and uses the Bus Pirate's binary ``raw-wire'' mode instead of the default binary SPI mode: @@ -1629,109 +1680,111 @@ of the default binary SPI mode: The only advantage of the ``raw-wire'' mode is that different SPI frequencies are available. Paged writing is not implemented in this mode. -@item @samp{pullups} +@item pullups Enable the Bus Pirate's built-in pull-up resistors. These resistors are useful when working with different voltage levels. VPU pin of the Bus Pirate must be connected to an external voltage. For example: connect VPU pin to the +5V pin or an external power supply. -@item @samp{hiz} +@item hiz Enable the Bus Pirate's HiZ mode on SPI, allowing it to work as an open-collector and interface with external pull-up circuits. If the external target circuit does not have pull-ups, the Bus Pirate will not be able to send data. -@item @samp{ascii} +@item ascii Attempt to use ASCII mode even when the firmware supports BinMode (binary mode). BinMode is supported in firmware 2.7 and newer, older FW's either don't have BinMode or their BinMode is buggy. ASCII mode is slower and makes the above -@samp{reset=}, @samp{spifreq=} +@code{reset=}, @code{spifreq=} and -@samp{rawfreq=} +@code{rawfreq=} parameters unavailable. Be aware that ASCII mode is not guaranteed to work with newer firmware versions, and is retained only to maintain compatibility with older firmware versions. -@item @samp{nopagedwrite} +@cindex @code{flash} +@item nopagedwrite Firmware versions 5.10 and newer support a binary mode SPI command that enables whole pages to be written to AVR flash memory at once, resulting in a significant write speed increase. If use of this mode is not desirable for some reason, this option disables it. -@item @samp{nopagedread} +@item nopagedread Newer firmware versions support in binary mode SPI command some AVR Extended Commands. Using the ``Bulk Memory Read from Flash'' results in a significant read speed increase. If use of this mode is not desirable for some reason, this option disables it. -@item @samp{cpufreq=@var{125..4000}} +@item cpufreq=@var{125..4000} This sets the @emph{AUX} pin to output a frequency of @var{n} kHz. Connecting the @emph{AUX} pin to the XTAL1 pin of your MCU, you can provide it a clock, for example when it needs an external clock because of wrong fuses settings. Make sure the CPU frequency is at least four times the SPI frequency. -@item @samp{serial_recv_timeout=@var{1...}} +@item serial_recv_timeout=@var{1...} This sets the serial receive timeout to the given value. The timeout happens every time avrdude waits for the BusPirate prompt. Especially in ascii mode this happens very often, so setting a smaller value can speed up programming a lot. The default value is 100 ms. Using 10 ms might work in most cases. -@item @samp{help} -Show help menu and exit. - @end table @cindex Option @code{-x} Micronucleus bootloader +@cindex @code{-x} Micronucleus bootloader +@cindex Micronucleus bootloader @item Micronucleus bootloader The Micronucleus programmer type accepts the following extended parameter: @table @code -@item @samp{wait=@var{timeout}} +@item wait=@var{timeout} If the device is not connected, wait for the device to be plugged in. The optional @var{timeout} specifies the connection time-out in seconds. If no time-out is specified, AVRDUDE will wait indefinitely until the device is plugged in. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} Teensy bootloader +@cindex @code{-x} Teensy bootloader +@cindex Teensy bootloader @item Teensy bootloader The Teensy programmer type accepts the following extended parameter: @table @code -@item @samp{wait=@var{timeout}} +@item wait=@var{timeout} If the device is not connected, wait for the device to be plugged in. The optional @var{timeout} specifies the connection time-out in seconds. If no time-out is specified, AVRDUDE will wait indefinitely until the device is plugged in. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} Wiring +@cindex @code{-x} Wiring +@cindex Wiring bootloader @item Wiring The Wiring programmer type accepts the following extended parameters: @table @code -@item @samp{snooze=} +@item snooze= After performing the port open phase, AVRDUDE will wait/snooze for @var{snooze} milliseconds before continuing to the protocol sync phase. No toggling of DTR/RTS is performed if @var{snooze} > 0. -@item @samp{delay=} +@item delay= Add a milliseconds delay after reset. This can be useful if a board takes a particularly long time to exit from external reset. can be negative, in which case the default 100 ms delay after issuing reset will be shortened accordingly. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} PICkit2 +@cindex @code{-x} PICkit2 +@cindex Microchip PICkit 2 programmer +@cindex PICkit 2 programmer @item PICkit2 + Connection to the PICkit2 programmer: @multitable @columnfractions .05 .3 @item @code{(AVR)} @tab @code{(PICkit2)} @@ -1745,34 +1798,34 @@ Connection to the PICkit2 programmer: The PICkit2 programmer type accepts the following extended parameters: @table @code -@item @samp{clockrate=@var{rate}} +@item clockrate=@var{rate} Sets the SPI clocking rate in Hz (default is 100kHz). Alternately the -B or -i options can be used to set the period. -@item @samp{timeout=@var{usb-transaction-timeout}} +@item timeout=@var{usb-transaction-timeout} Sets the timeout for USB reads and writes in milliseconds (default is 1500 ms). -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} USBasp +@cindex @code{-x} USBasp +@cindex USBasp ISP and TPI programmer @item USBasp The USBasp programmer type accepts the following extended parameter: @table @code -@item @samp{section_config} +@item section_config Programmer will erase configuration section with option '-e' (chip erase), rather than entire chip. Only applicable to TPI devices (ATtiny 4/5/9/10/20/40). -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} xbee +@cindex @code{-x} xbee +@cindex XBeeBoot OTA bootloader @item xbee The xbee programmer type accepts the following extended parameter: @table @code -@item @samp{xbeeresetpin=@var{1..7}} +@item xbeeresetpin=@var{1..7} Select the XBee pin @code{DIO<1..7>} that is connected to the MCU's @code{/RESET} line. The programmer needs to know which DIO pin to use to reset into the bootloader. The default (3) is the @code{DIO3} pin @@ -1784,18 +1837,20 @@ The remaining two necessary XBee-to-MCU connections are not selectable RXD line, and the XBee @code{DIN} pin (pin 3) must be connected to the MCU's TXD line. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} jtag2updi +@cindex @code{-x} jtag2updi @cindex Option @code{-x} serialupdi +@cindex @code{-x} serialupdi +@cindex JTAGv2 to UPDI bridge +@cindex SerialUPDI @item jtag2updi @item serialupdi The jtag2updi and serialupdi programmer types accept the following extended parameters: @table @code -@item @samp{rtsdtr=low,high} +@item rtsdtr=low,high Forces RTS/DTR lines to assume low or high state during the whole programming session. Some programmers might use this signal to indicate UPDI programming state, but this is strictly hardware @@ -1803,34 +1858,32 @@ specific. When not provided, driver/OS default value will be used. -@item @samp{help} -Show help menu and exit. @end table @cindex Option @code{-x} linuxspi +@cindex @code{-x} linuxspi +@cindex Linux /dev/spidev* programmer @item linuxspi The linuxspi programmer type accepts the following extended parameter: @table @code -@item @samp{disable_no_cs} +@item disable_no_cs Ensures the programmer does not use the SPI_NO_CS bit for the SPI driver. This parameter is useful for kernels that do not support the CS line being managed outside the application. -@item @samp{help} -Show help menu and exit. @end table +@cindex Flashcom serprog protocol @cindex Option @code{-x} serprog +@cindex @code{-x} serprog @item serprog The serprog programmer type accepts the following extended parameter: @table @code -@item @samp{cs} +@item cs Sets the chip select (CS) to use on supported programmers. Programmers supporting the 0x16 serprog command can have more than the default CS (0). This option allows to choose these additional CSes (1, 2, ...) for programming the AVR. -@item @samp{help} -Show help menu and exit. @end table @end table @@ -1850,6 +1903,7 @@ output of commands or that of the @code{-U} command with an output file named @code{-} are written to stdout. In some examples empty lines are shown for clarity that are not printed by AVRDUDE or the shell. +@cindex @code{flash} @noindent @strong{Download the file @code{diag.hex} to the ATmega128 chip} using the STK500 programmer connected to the default serial port: @@ -1871,6 +1925,7 @@ Avrdude done. Thank you. @noindent Same but in @strong{quell-progress-reporting (silent) mode @code{-qq}:} +@cindex @code{flash} @smallexample @cartouche $ avrdude -qq -p m128 -c stk500 -e -U flash:w:diag.hex @@ -1880,6 +1935,7 @@ $ avrdude -qq -p m128 -c stk500 -e -U flash:w:diag.hex @noindent @strong{Using @code{&&} to confirm that the silent AVRDUDE command went OK:} +@cindex @code{flash} @smallexample @cartouche $ avrdude -qq -p m128 -c stk500 -e -U flash:w:diag.hex && echo OK @@ -1887,9 +1943,11 @@ OK @end cartouche @end smallexample +@cindex @code{flash} @noindent @strong{Save flash memory in raw binary format to the file named @code{c:/diag flash.bin}:} +@cindex @code{flash} @smallexample @cartouche $ avrdude -p m128 -c stk500 -U flash:r:"c:/diag flash.bin":r @@ -1918,6 +1976,8 @@ $ avrdude -cusbasp -patmega128 -qq -Ulfuse:r:-:h -Uhfuse:r:-:b -Uefuse:r:-:o @page @noindent +@cindex @code{flash} +@cindex @code{eeprom} Using the default programmer, download the file @code{diag.hex} to flash, @code{eeprom.hex} to EEPROM, and @strong{set the extended, high, and low fuse bytes} to 0xff, 0x89, and 0x2e respectively: @@ -2010,6 +2070,7 @@ $ avrdude -cusbasp -pattiny13 -Ueeprom:r:-:i 2>/dev/null @end cartouche @end smallexample +@cindex @code{flash} @noindent @strong{Using the Avrdude output to print strings present in flash memory:} @@ -2534,7 +2595,7 @@ default) decode only opcodes that are valid for the part Zap the list of jumps and calls before disassembly @item -t=@var{file} -@cindex tagfile +@cindex Tagfile Delete symbols from a previously read tagfile, if any, and read the tagfile @var{file} for assigning addresses to symbol names. @end table @@ -2578,6 +2639,7 @@ for disassembly of that area. As with @code{L} labels, @code{P} and the symbol that may be output in the disassembly column as and when the corresponding variables are used. +@cindex @code{flash} Tagfiles are useful for disassembly to make the output of disasm more readable. They can be built manually and incrementally as one's under‐ standing of the code grows. Alternatively, the bash shell script @@ -2769,8 +2831,11 @@ Compare one or more memories with the specified file. Memlist can be a comma separated list of memories just as in the @code{-U} command line argument. @code{verify} flushes the cache before verifying memories. -@item erase @cindex @code{erase} +@cindex @code{flash} +@cindex @code{bootrow} +@cindex @code{eeprom} +@item erase Perform a chip erase and discard all pending writes to flash, EEPROM and bootrow. Note that EEPROM will be preserved if the EESAVE fuse bit is active, ie, had a corresponding value at the last reset prior to the operation. @@ -2785,6 +2850,9 @@ Erase a section of the specified memory. @item flush @cindex @code{flush} +@cindex @code{usersig} +@cindex @code{bootrow} +@cindex @code{eeprom} Synchronise with the device all pending writes to flash, EEPROM, bootrow and usersig. With some programmer and part combinations, flash (and sometimes EEPROM, too) looks like a NOR memory, i.e., a write can only clear bits, @@ -2798,8 +2866,12 @@ are written back to the device. Hence, it can take minutes to ensure that a single previously cleared bit is set and, therefore, this routine should be called sparingly. -@item abort +@cindex @code{flush} +@cindex @code{usersig} +@cindex @code{bootrow} +@cindex @code{eeprom} @cindex @code{abort} +@item abort Normally, caches are only ever actually written to the device when using @code{flush}, at the end of the terminal session after typing @code{quit}, or after EOF on input is encountered. The @code{abort} command resets the @@ -2846,8 +2918,9 @@ It is quite possible, as is with direct writing to the underlying fuses and lock bits, to brick a part, i.e., make it unresponsive to further programming with the chosen programmer: here be dragons. -@item factory reset +@cindex @code{eeprom} @cindex @code{factory reset} +@item factory reset Resets the connected part to factory state as far as possible (bootloaders, for example, cannot write fuses and may not have a means to erase EEPROM). This command may change the clock frequency F_CPU of the @@ -2905,6 +2978,8 @@ Display the device signature bytes. @item part @var{[opts]} @cindex @code{part} @var{[opts]} +@cindex Programming mode +@cindex Variants of parts Display the current part information, including supported programming modes, memory and variants tables. Use @var{-m} to only print the memory table, and @var{-v} to only print the variants table. @@ -3018,11 +3093,12 @@ Display programmer specific parameters. @c @node Terminal Mode Examples, , Terminal Mode Commands, Terminal Mode Operation @section Terminal Mode Examples -@cindex Terminal Mode Examples +@cindex Terminal mode examples @noindent @strong{Enter terminal, display part parameters, modify EEPROM, perform a chip erase and quit:} +@cindex @code{part} @smallexample @cartouche $ avrdude -qq -c usbasp -p atmega328p -t @@ -3301,6 +3377,7 @@ Avrdude done. Thank you. @cindex @code{disasm} example +@cindex @code{flash} @noindent @strong{Disassembe the flash contents of an ATtiny13A,} write the output to file @code{blink.S}, compile to `blink.elf` and verify that the flash contents of the ATtiny13A is the same as the one given by the @@ -3552,56 +3629,76 @@ programmer. These values can be changed by new setting them for the new programm @enumerate @item Known programming modes are +@cindex Programming modes @itemize @bullet -@item @code{PM_SPM}: Bootloaders, self-programming with SPM opcodes or NVM Controllers @cindex @code{PM_SPM} -@item @code{PM_TPI}: Tiny Programming Interface (t4, t5, t9, t10, t20, t40, t102, t104) +@cindex SPM +@item @code{PM_SPM}: Bootloaders, self-programming with SPM opcodes or NVM Controllers @cindex @code{PM_TPI} -@item @code{PM_ISP}: SPI programming for In-System Programming (almost all classic parts) +@cindex TPI +@item @code{PM_TPI}: Tiny Programming Interface (t4, t5, t9, t10, t20, t40, t102, t104) @cindex @code{PM_ISP} -@item @code{PM_PDI}: Program and Debug Interface (xmega parts) +@cindex ISP +@item @code{PM_ISP}: SPI programming for In-System Programming (almost all classic parts) @cindex @code{PM_PDI} -@item @code{PM_UPDI}: Unified Program and Debug Interface +@cindex PDI +@item @code{PM_PDI}: Program and Debug Interface (xmega parts) @cindex @code{PM_UPDI} -@item @code{PM_HVSP}: High Voltage Serial Programming (some classic parts) +@cindex UPDI +@item @code{PM_UPDI}: Unified Program and Debug Interface @cindex @code{PM_HVSP} -@item @code{PM_HVPP}: High Voltage Parallel Programming (most non-HVSP classic parts) +@cindex HVSP +@item @code{PM_HVSP}: High Voltage Serial Programming (some classic parts) @cindex @code{PM_HVPP} -@item @code{PM_debugWIRE}: Simpler alternative to JTAG (a subset of HVPP/HVSP parts) +@cindex HVPP +@item @code{PM_HVPP}: High Voltage Parallel Programming (most non-HVSP classic parts) @cindex @code{PM_debugWIRE} -@item @code{PM_JTAG}: Joint Test Action Group standard (some classic parts) +@cindex debugWIRE +@item @code{PM_debugWIRE}: Simpler alternative to JTAG (a subset of HVPP/HVSP parts) @cindex @code{PM_JTAG} -@item @code{PM_JTAGmkI}: Subset of @code{PM_JTAG}, older parts, Atmel ICE mkI +@cindex JTAG +@item @code{PM_JTAG}: Joint Test Action Group standard (some classic parts) @cindex @code{PM_JTAGmkI} -@item @code{PM_XMEGAJTAG}: JTAG, some XMEGA parts +@cindex JTAGmkI +@item @code{PM_JTAGmkI}: Subset of @code{PM_JTAG}, older parts, Atmel ICE mkI @cindex @code{PM_XMEGAJTAG} -@item @code{PM_AVR32JTAG}: JTAG for 32-bit AVRs +@cindex XMEGAJTAG +@item @code{PM_XMEGAJTAG}: JTAG, some XMEGA parts @cindex @code{PM_AVR32JTAG} -@item @code{PM_aWire}: AVR32 parts +@cindex AVR32JTAG +@item @code{PM_AVR32JTAG}: JTAG for 32-bit AVRs @cindex @code{PM_aWire} +@cindex aWire +@item @code{PM_aWire}: AVR32 parts @end itemize @item The following extra programmer features are known @itemize @bullet -@item @code{HAS_SUFFER}: Only present on Xplained Mini/Nano programmers; @cindex @code{HAS_SUFFER} +@cindex SUFFER +@item @code{HAS_SUFFER}: Only present on Xplained Mini/Nano programmers; the Super User Fantastic Feature Enable Register allows the user to modify the behavior of the mEDBG programmer/debugger chip, see the Xplained Mini/Nano documentation for more information -@item @code{HAS_VTARG_SWITCH}: Programer has a programmable target power switch @cindex @code{HAS_VTARG_SWITCH} -@item @code{HAS_VTARG_READ}: Programmer can read the target voltage +@cindex VTARG_SWITCH +@item @code{HAS_VTARG_SWITCH}: Programer has a programmable target power switch @cindex @code{HAS_VTARG_READ} -@item @code{HAS_VTARG_ADJ}: Programmer has an adjustable target power source that can +@cindex VTARG_READ +@item @code{HAS_VTARG_READ}: Programmer can read the target voltage @cindex @code{HAS_VTARG_ADJ} +@cindex VTARG_ADJ +@item @code{HAS_VTARG_ADJ}: Programmer has an adjustable target power source that can be controlled with Avrdude -@item @code{HAS_FOSC_ADJ}: Programmer has a programable frequency generator that @cindex @code{HAS_FOSC_ADJ} +@cindex FOSC_ADJ +@item @code{HAS_FOSC_ADJ}: Programmer has a programable frequency generator that can clock an AVR directly through its XTAL1 pin -@item @code{HAS_VAREF_ADJ}: Programmer has an adjustable analog reference voltage that @cindex @code{HAS_VAREF_ADJ} +@cindex VAREF_ADJ +@item @code{HAS_VAREF_ADJ}: Programmer has an adjustable analog reference voltage that can be controlled with Avrdude @end itemize @@ -3615,7 +3712,7 @@ the polarity of all pins in a list use @code{~( [, ... ])} @noindent The following programmer types are currently implemented: -@multitable @columnfractions .25 .6 +@multitable @columnfractions .21 .75 @include programmer_types.texi @end multitable @@ -3960,6 +4057,7 @@ the boot lock bits can result in a ``shoot-into-your-foot'' scenario as the only way to unprogram these bits is a chip erase, which will also erase the boot loader code. +@cindex @code{flash} The boot loader implements the ``chip erase'' function by erasing the flash pages of the application section. @@ -4092,6 +4190,7 @@ specific behaviour. These bootloaders have no option to access memory areas other than Flash and EEPROM. +@cindex @code{flash} When the bootloader is started, it enters a @emph{security mode} where the only acceptable access is to query the device configuration parameters (which are used for the signature on AVR devices). The @@ -4105,6 +4204,7 @@ all queries. As these queries are used to obtain the equivalent of a signature, AVRDUDE can only continue in that situation by forcing the signature check to be overridden with the @option{-F} option. +@cindex @code{eeprom} A @emph{chip erase} might leave the EEPROM unerased, at least on some versions of the bootloader. @@ -4146,6 +4246,7 @@ has been tested only on a single device, so issues with other devices are expected. Full NVM v4 mode support will be provided once the hardware is widely available. +@cindex @code{signature} One of the core AVRDUDE features is verification of the connection by reading device signature prior to any operation, but this operation is not possible on UPDI locked devices. Therefore, to be able to @@ -4155,6 +4256,7 @@ this check. Please note: using @option{-F} during write operation to locked device will force chip erase. Use carefully. +@cindex @code{eeprom} Another issue you might notice is slow performance of EEPROM writing using SerialUPDI for AVR Dx devices. This can be addressed by changing @emph{avrdude.conf} section for this device - changing EEPROM page @@ -4180,7 +4282,7 @@ part parent ".avrdx" memory "eeprom" size = 0x200; offset = 0x1400; - page_size = 0x1; + page_size = 0x20; readsize = 0x100; ; ; @@ -4665,14 +4767,21 @@ such as @option{--prefix} and @option{--datadir}. @c @c Node @c -@node Troubleshooting,Index ,Platform Dependent Information ,Top +@node Troubleshooting, List of Programmers, Platform Dependent Information, Top @appendix Troubleshooting @noindent -In general, please report any bugs encountered via -@* +Please report any bugs encountered via @url{https://github.com/avrdudes/avrdude/issues}. +AVRDUDE's wiki @url{https://github.com/avrdudes/avrdude/wiki} is a great +place to learn about installing AVRDUDE on various platforms and, +generally, to learn a few tricks of the trade. In paticular, the +@url{https://github.com/avrdudes/avrdude/wiki/FAQ, FAQ} and the +@url{https://github.com/avrdudes/avrdude/wiki/Known-limitations-of-avrdude, +known limitations} of avrdude are worth reading. + +Here a few examples for things that can go wrong and what to do: @itemize @bullet @@ -4712,6 +4821,7 @@ Problem: I'm not using Linux and my AVR910 programmer is really slow. Solutions: The reasons for this are the same as above. If you know how to work around this on your OS, please let us know. +@cindex @code{eeprom} @item Problem: Page-mode programming the EEPROM (using the -U option) does not erase EEPROM cells before writing, and thus cannot necessarily overwrite @@ -4724,14 +4834,20 @@ In order to successfully program the EEPROM that way, a prior chip erase (with the EESAVE fuse unprogrammed) is required. This also applies to the STK500 and STK600 in high-voltage programming mode. +Programming the EEPROM in the terminal, however, will recognise that the +programmer struggles to write to EEPROM and read the flash, EEPROM and, if +present, bootrow contents, perform a chip erase and then write the +memories back. This happens when flushing the cache or leaving the +terminal and, out of necessity, take some time. + @item Problem: How do I turn off the @var{DWEN} fuse? -Solution: If the @var{DWEN} (debugWire enable) fuse is activated, +Solution: If the @var{DWEN} (debugWIRE enable) fuse is activated, the @var{/RESET} pin is not functional anymore, so normal ISP communication cannot be established. There are two options to deactivate that fuse again: high-voltage -programming, or getting the JTAG ICE mkII talk debugWire, and +programming, or getting the JTAG ICE mkII talk debugWIRE, and prepare the target AVR to accept normal ISP communication again. The first option requires a programmer that is capable of high-voltage @@ -4743,13 +4859,13 @@ reprogrammed, and the @var{DWEN} fuse can be cleared. Typically, this operation cannot be performed while the AVR is located in the target circuit though. -The second option requires a JTAG ICE mkII that can talk the debugWire +The second option requires a JTAG ICE mkII that can talk the debugWIRE protocol. The ICE needs to be connected to the target using the -JTAG-to-ISP adapter, so the JTAG ICE mkII can be used as a debugWire +JTAG-to-ISP adapter, so the JTAG ICE mkII can be used as a debugWIRE initiator as well as an ISP programmer. AVRDUDE will then be activated using the @var{jtag2isp} programmer type. The initial ISP communication attempt will fail, but AVRDUDE then tries to initiate a -debugWire reset. When successful, this will leave the target AVR in a +debugWIRE reset. When successful, this will leave the target AVR in a state where it can accept standard ISP communication. The ICE is then signed off (which will make it signing off from the USB as well), so AVRDUDE has to be called again afterwards. This time, standard ISP @@ -4801,14 +4917,14 @@ avrdude -c USBasp -p atmega8 -P usb:1234 @item -Problem: I cannot do @dots{} when the target is in debugWire mode. +Problem: I cannot do @dots{} when the target is in debugWIRE mode. -Solution: debugWire mode imposes several limitations. +Solution: debugWIRE mode imposes several limitations. -The debugWire protocol is Atmel's proprietary one-wire (plus ground) +The debugWIRE protocol is Atmel's proprietary one-wire (plus ground) protocol to allow an in-circuit emulation of the smaller AVR devices, using the @var{/RESET} line. -DebugWire mode is initiated by activating the @var{DWEN} +DebugWIRE mode is initiated by activating the @var{DWEN} fuse, and then power-cycling the target. While this mode is mainly intended for debugging/emulation, it also offers limited programming capabilities. @@ -4818,12 +4934,12 @@ It is also possible to read out the signature. All other memory areas cannot be accessed. There is no @emph{chip erase} -functionality in debugWire mode; instead, while reprogramming the +functionality in debugWIRE mode; instead, while reprogramming the flash, each flash page is erased right before updating it. This is done transparently by the JTAG ICE mkII (or AVR Dragon). -The only way back from debugWire mode is to initiate a special +The only way back from debugWIRE mode is to initiate a special sequence of commands to the JTAG ICE mkII (or AVR Dragon), so the -debugWire mode will be temporarily disabled, and the target can +debugWIRE mode will be temporarily disabled, and the target can be accessed using normal ISP programming. This sequence is automatically initiated by using the JTAG ICE mkII or AVR Dragon in ISP mode, when they detect that ISP mode cannot be @@ -4978,8 +5094,300 @@ erase cycle. @end itemize -@node Index, , Troubleshooting, Top +@c +@c Node +@c +@node List of Programmers, List of Parts, Troubleshooting, Top +@appendix List of Programmers + +@cindex Programmers supported + +AVRDUDE supports the programmers below: the left column lists the +programmer's id as used for @code{-c}, whilst the right column contains a +short description and the list of available programming interface(s) in +brackets; see @ref{Programmer Definitions}). There is more detail about +each programmer in the AVRDUDE configuration file. + +@multitable @columnfractions .24 .75 +@include programmers.texi +@end multitable + +@c +@c Node +@c +@node List of Parts, List of Memories, List of Programmers, Top +@appendix List of Parts + +AVRDUDE supports the parts below: the left column lists the part's id, +whilst the right column contains its official part name; alternative +names, if any; and the list of available programming interfaces in +brackets; see @ref{Programmer Definitions}). There is more detail about +each part in the AVRDUDE configuration file. + +@multitable @columnfractions .15 .80 +@include parts.texi +@end multitable + +@noindent +@strong{Notes} + +@noindent +1. Support of 32-bit AVR (via aWire or AVT32JTAG) is experimental at best. + +@noindent +2. Flash addressing above 128 KB is not supported by all programming +hardware, though most will support it. + +@noindent +3. The ISP programming protocol of the AT90S1200 differs in subtle ways from +that of other AVRs. Thus, not all ISP programmers support this device. +Known to work are all direct bitbang programmers, and all programmers +talking the STK500v2 protocol. + +@noindent +4. Not all programmers can serve all memories that a part has. +Bootloader can never write to fuses, for example. + +@c +@c Node +@c +@node List of Memories, List of Parts, Index, Top +@appendix List of Memories + +@menu +* Classic Parts:: +* ATxmegas:: +* Modern AVR Parts:: +@end menu + +@node Classic Parts, ATxmegas, List of Memories, List of Memories +@section Classic parts +@cindex Memories of classic parts + +@noindent +@cindex @code{signature} +@cindex @code{flash} +@cindex @code{eeprom} +Classic devices may have the following memories in addition to +@code{eeprom}, @code{flash}, @code{signature} and @code{lock}: +@table @code +@cindex @code{calibration} +@item calibration +One or more bytes of RC oscillator calibration data +@item efuse +Extended fuse byte +@item fuse +Fuse byte in devices that have only a single fuse byte +@item hfuse +High fuse byte +@item lfuse +Low fuse byte +@item prodsig +Signature, calibration byte and serial number in a small read-only memory, +which is only documented to be available for ATmega324PB, ATmega328PB, +ATtiny102 and ATtiny104; AVRDUDE generally tries to make this memory +available, also for parts where it is not documented, but not all +programmers may be able to read this memory +@item sigrow +Memory alias for prodsig +@item sernum +The serial number part of prodsig; owing to scarce documentation this may not +actually turn out to be a serial number or be readable by some programmers +@item usersig +@cindex @code{flash} +Three extra flash pages for firmware settings; this memory is not erased +during a chip erase. Only some classic parts, +ATmega(64|128|256|644|1284|2564)RFR2, have a usersig memory. Usersig is +different to flash in the sense that it can neither be accessed with ISP +serial programming nor written to by bootloaders. AVRDUDE offers JTAG +programming of classic-part usersig memories. As with all flash-type +memories the @code{-U} option can only write 0-bits but not 1-bits. +Hence, usersig needs to be erased before a file can be uploaded to this +memory region, e.g., using @code{-T "erase usersig" -U +usersig:w:parameters.hex:i} +@item io +Volatile register memory; it cannot be accessed by external programming +methods only by bootloaders, which has limited use unless the bootloader +jumps to the application directly, i.e., without a WDT reset +@item sram +Volatile RAM memory; like @code{io} it cannot be accessed by external +programming +@end table + +@node ATxmegas, Modern AVR Parts, Classic Parts, List of Memories +@section ATxmegas +@cindex Memories of ATxmegas + +@cindex @code{signature} +@cindex @code{flash} +@cindex @code{eeprom} +ATxmega devices have the following memories in addition to +@code{eeprom}, @code{flash}, @code{signature} and @code{lock}: +@table @code +@cindex @code{flash} +@cindex @code{application} +@item application +Application flash area +@cindex @code{flash} +@cindex @code{apptable} +@item apptable +Application table flash area +@cindex @code{flash} +@cindex @code{boot} +@item boot +Boot flash area +@cindex @code{calibration} +@cindex @code{calibration} +@item calibration +An area of 4 (ATxmega-A series) or 5 bytes (ATxmega-B/C/D/E) with +oscillator calibration values; this is a sub-memory of @code{prodsig} +@cindex @code{fuses} +@item fuses +A logical memory of 7 bytes containing all @code{fuse}X of a part, which +can be used to program all fuses at the same time; note that some of the +fuse bytes will be reserved, though +@cindex @code{fuse0} +@item fuse0 +A.k.a. @code{jtaguid}: JTAG user ID for some devices +@cindex @code{fuse1} +@item fuse1 +Watchdog configuration +@cindex @code{fuse6} +@item fuse6 +Fault detection action configuration TC4/5 for ATxmega E series parts +@item fuse@emph{N} +Other fuse bytes of ATxmega devices, where @emph{N} is 2, 4 or 5, for system configuration +@cindex @code{prodsig} +@item prodsig +The production signature row is a read-only memory section for factory +programmed data such as calibration values for oscillators or analogue +modules; it also contains a serial number that consists of the production +lot number, wafer number and wafer coordinates for the part +@cindex @code{sernum} +@item sernum +Serial number with a unique ID for the part consisting of 10 bytes; these +are part of the @code{prodsig} memory above +@cindex @code{sigrow} +@item sigrow +Memory alias for prodsig +@cindex @code{tempsense} +@item tempsense +A two-byte memory, which is located within @code{prodsig}; it contains a 12-bit +temperature sensor calibration value +@cindex @code{flash} +@cindex @code{usersig} +@item usersig +Additional flash memory page that can be used for firmware settings; this +memory is not erased during a chip erase +@cindex @code{io} +@item io +Volatile register memory; AVRDUDE can read this memory but not write to it +using external programming +@cindex @code{sram} +@item sram +Volatile RAM memory; cannot be usefully accessed by external programming +@end table + +@node Modern AVR Parts, , ATxmegas, List of Memories +@section Modern AVR Parts +@cindex Memories of modern AVR parts +@cindex @code{signature} +@cindex @code{flash} +@cindex @code{eeprom} +Modern 8-bit AVR devices have the following memories in addition to +@code{eeprom}, @code{flash}, @code{signature} and @code{lock}: +@table @code +@cindex @code{wdtcfg} +@item fuse0 +A.k.a. @code{wdtcfg}: watchdog configuration +@cindex @code{bodcfg} +@item fuse1 +A.k.a. @code{bodcfg}: brownout detection configuration +@cindex @code{osccfg} +@item fuse2 +A.k.a. @code{osccfg}: oscillator configuration +@cindex @code{tcd0cfg} +@item fuse4 +A.k.a. @code{tcd0cfg} (not all devices): timer counter type D configuration +@cindex @code{syscfg0} +@item fuse5 +A.k.a. @code{syscfg0}: system configuration 0 +@cindex @code{syscfg1} +@item fuse6 +A.k.a. @code{syscfg1}: system configuration 1 +@cindex @code{append} +@cindex @code{codesize} +@item fuse7 +A.k.a. @code{append} or @code{codesize}: either the end of the application code section or the code size in blocks of 256/512 bytes +@cindex @code{bootend} +@cindex @code{bootsize} +@item fuse8 +A.k.a. @code{bootend} or @code{bootsize}: end of the boot section or the boot size in blocks of 256/512 bytes +@cindex @code{pdicfg} +@item fusea +A.k.a. @code{pdicfg}: configures/locks updi access; it is the only fuse that consists of two bytes +@cindex @code{fuses} +@item fuses +A logical memory of up to 16 bytes containing all fuseX of a part, which can be used to program all fuses at the same time +@cindex @code{osc16err} +@item osc16err +Two bytes typically describing the 16 MHz oscillator frequency error at 3 V and 5 V, respectively +@cindex @code{osc20err} +@item osc20err +Two bytes typically describing the 20 MHz oscillator frequency error at 3 V and 5 V, respectively +@cindex @code{osccal16} +@item osccal16 +@cindex @code{calibration} +Two oscillator calibration bytes for 16 MHz +@cindex @code{osccal20} +@item osccal20 +@cindex @code{calibration} +Two oscillator calibration bytes for 20 MHz +@cindex @code{prodsig} +@item prodsig +@cindex @code{signature} +Read-only memory section for factory programmed data such as the +signature, calibration values and serial number +@cindex @code{sigrow} +@item sigrow +Memory alias for prodsig +@cindex @code{sernum} +@item sernum +Serial number with a unique ID for the part (10 or 16 bytes) +@cindex @code{tempsense} +@item tempsense +@cindex @code{calibration} +Temperature sensor calibration values +@cindex @code{bootrow} +@item bootrow +Extra page of memory that is only accessible by the MCU in bootloader +code; UDPI can read and write this memory only when the device is +unlocked +@cindex @code{eeprom} +@cindex @code{userrow} +@item userrow +Extra page of EEPROM memory that can be used for firmware settings; this +memory is not erased during a chip erase +@cindex @code{sib} +@item sib +Special system information block memory with information about AVR family, chip revision etc. +@cindex @code{io} +@item io +Volatile register memory; AVRDUDE can program this memory but this is of +limited utility because anything written to the io memory will be undefined or +lost after reset; writing to individual registers in the terminal can +still be used, e.g., to test I/O ports +@cindex @code{sram} +@item sram +Volatile RAM memory; can be read and written but contents will be lost after reset +@end table + + +@c +@c Node +@c +@node Index, , List of Memories, Top @unnumbered Concept Index @printindex cp diff --git a/src/doc/parts.cmake b/src/doc/parts.cmake deleted file mode 100644 index c305743db..000000000 --- a/src/doc/parts.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# -# programmers.cmake - create parts.texi from parts.txt -# Copyright (C) 2022 Marius Greuel -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -file(STRINGS ${COMMENTS_FILE} COMMENTS_CONTENTS) - -file(STRINGS ${TXT_FILE} TXT_CONTENTS REGEX "=") - -set(TEXI_CONTENTS "") -foreach(TXT_LINE IN LISTS TXT_CONTENTS) - string(REGEX REPLACE "^[ \t]*([^ \t]+)[ \t]*=[ \t]*(.*)$" "@item @code{\\1} @tab \\2" TEXI_LINE "${TXT_LINE}") - - foreach(COMMENTS_LINE IN LISTS COMMENTS_CONTENTS) - string(REGEX MATCH "^([^ \t]*)(.*)$" DUMMY "${COMMENTS_LINE}") - set(PART_REGEX "${CMAKE_MATCH_1}") - set(COMMENT "${CMAKE_MATCH_2}") - string(REGEX REPLACE "(${PART_REGEX})" "\\1${COMMENT}" TEXI_LINE "${TEXI_LINE}") - endforeach() - - set(TEXI_CONTENTS "${TEXI_CONTENTS}${TEXI_LINE}\n") -endforeach() - -file(WRITE ${TEXI_FILE} "${TEXI_CONTENTS}") diff --git a/src/doc/parts.sed b/src/doc/parts.sed new file mode 100644 index 000000000..8ad6dffb8 --- /dev/null +++ b/src/doc/parts.sed @@ -0,0 +1,2 @@ +# Transform the avrdude -p \? output into a texinfo table +s/^ *\([^ ]*\) *= \([^(]*\).(/@cindex @code{\1}\n@cindex \2\n@item @code{\1} @tab \2 (/ diff --git a/src/doc/parts_comments.txt b/src/doc/parts_comments.txt deleted file mode 100644 index d83bb4312..000000000 --- a/src/doc/parts_comments.txt +++ /dev/null @@ -1,5 +0,0 @@ -AT90S1200 (****) -AT90S2343 (*) -ATmega2560 (**) -ATmega2561 (**) -ATtiny11 (***) diff --git a/src/doc/programmers.cmake b/src/doc/programmers.cmake deleted file mode 100644 index b8611c0f8..000000000 --- a/src/doc/programmers.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# -# programmers.cmake - create programmers.texi from programmers.txt -# Copyright (C) 2022 Marius Greuel -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -file(STRINGS ${TXT_FILE} TXT_CONTENTS REGEX "=") - -SET(TEXI_CONTENTS "") -foreach(TXT_LINE IN LISTS TXT_CONTENTS) - string(REGEX REPLACE "^[ \t]*([^ \t]+)[ \t]*=[ \t]*(.*)$" "@item @code{\\1} @tab \\2" TEXI_LINE "${TXT_LINE}") - string(REGEX REPLACE "[ \t>]*,?[ \t>]*]+)>?" ",@*\n@url{\\1}" TEXI_LINE "${TEXI_LINE}") - set(TEXI_CONTENTS "${TEXI_CONTENTS}${TEXI_LINE}\n") -endforeach() - -file(WRITE ${TEXI_FILE} "${TEXI_CONTENTS}") diff --git a/src/doc/programmers.sed b/src/doc/programmers.sed new file mode 100644 index 000000000..c159f5192 --- /dev/null +++ b/src/doc/programmers.sed @@ -0,0 +1,72 @@ +# Transform the avrdude -c \? output into a texinfo table +s/^ *\([^ ]*\) *= \(.*\) (/@cindex @code{\1}\n@cindex \2\n@item @code{\1} @tab \2 (/ +s/MPLAB(R) PICkit 5, PICkit 4 and SNAP/MPLAB(R) PICkit 5\n@cindex MPLAB(R) PICkit 4\n@cindex MPLAB(R) SNAP/ +s/@cindex Microchip PICkit 2 programmer/&\n@cindex PICkit 2 programmer/ +# s/@cindex Atmel bootloader (AVR109, AVR911)/@cindex Atmel bootloader AVR109\n@cindex Atmel bootloader AVR911/ +s/@cindex Atmel bootloader (Butterfly Development Board)/@cindex Atmel bootloader (Butterfly)/ +s/@cindex Atmel STK500 (probes v2 first then v1)/@cindex Atmel STK500/ +s/@cindex bootloader (AVR109, AVR911)/@cindex bootloader AVR109\n@cindex bootloader AVR911/ +s/@cindex bootloader (Butterfly Development Board)/@cindex bootloader (Butterfly)/ +s/@cindex Curiosity nano (nEDBG)/@cindex Curiosity nano/ +s/@cindex Digilent JTAG HS2 (MPSSE)/@cindex Digilent JTAG HS2/ +s/@cindex Lancos SI-Prog (same as ponyser)/@cindex Lancos SI-Prog/ +s/@cindex MPLAB(R) SNAP (PIC)/@cindex MPLAB(R) SNAP/ +s/@cindex Openmoko debug board (v3)/@cindex Openmoko debug board/ +s/@cindex STK500 (probes v2 first then v1)/@cindex STK500\n@cindex Atmel STK500/ +s/2232hio.based on FT2232H with buffer and LEDs/FT2232H with buffer and LEDs/ +s/FT4232H.based generic programmer/FT4232H programmer/ +s/ABCmini Board, aka Dick Smith HOTCHIP/ABCmini Board\n@cindex Dick Smith HOTCHIP/ +s/Trinket Gemma bootloader disguised as USBtiny/Trinket Gemma bootloader/ +s/Nightshade ALF-PgmAVR via PC parallel port/Nightshade ALF-PgmAVR/ +s/Arduino bootloader using STK500 v1 protocol/Arduino bootloader/ +s/Arduino: FT232R connected to ISP/Arduino: FT232R to ISP/ +s/AVR as programmer with Arduino-as-ISP FW/AVR as programmer/ +s/Arduino Gemma bootloader disguised as USBtiny/Arduino Gemma bootloader/ +s/Arduino-branded USBtiny ISP Programmer/Arduino-branded USBtiny/ +s/AT-ISP v1.1 programming cable for AVR-SDK1/AT-ISP v1.1 cable/ +s/Atmel Low.Cost Serial Programmer/Atmel low-cost programmer AVR910/ +s/FT2232H\/D.based generic programmer/FT2232H\/D programmer/ +s/Serial Atmel AVR ISP using STK500/Serial Atmel AVR ISP/ +s/Serial Atmel AVR ISP using STK500v2/Serial Atmel AVR ISP/ +s/Bascom SAMPLE programming cable/Bascom SAMPLE cable/ +s/Brian S. Dean's parallel programmer/Brian S. Dean's programmer/ +s/The Bus Pirate in AVR programming mode/The Bus Pirate\n@cindex BusPirate/ +s/The Bus Pirate in bitbang mode/The Bus Pirate/ +s/Mikrokopter.de Butterfly bootloader/Mikrokopter.de Butterfly/ +s/BitWizard ftdi_atmega builtin programmer/BitWizard ftdi_atmega/ +s/serial port: reset=dtr sck=!rts sdo=!txd sdi=!cts/Serial port programmer/ +s/CH341A programmer: note AVR F_CPU > 6.8 MHz/CH341A programmer/ +s/Direct AVR Parallel Access cable/Direct AVR Parallel cable/ +s/serial port: reset=rts sck=dtr sdo=txd sdi=cts/Serial port programmer/ +s/serial port: reset=!dtr sck=rts sdo=txd sdi=cts/Serial port programmer/ +s/Emulates bootloader programming without the part/Emulating a bootloader (dryboot)/ +s/Emulates programming without a programmer/Emulating a HW programmer (dryrun)/ +s/AVR ISP programmer from eHaJo.de/AVR ISP programmer/ +s/FLIP bootloader using USB DFU .*/FLIP bootloader/ +s/FT2232H\/D.based generic programmer/FT2232H\/D programmer/ +s/FT2232H.based generic JTAG programmer/FT2232H JTAG programmer/ +s/FT232H.based generic programmer/FT232H programmer/ +s/FT232H.based generic JTAG programmer/FT232H JTAG programmer/ +s/FT232R.based generic programmer/FT232R programmer/ +s/FT245R.based generic programmer/FT245R programmer/ +s/FT4232H.based generic programmer/FT4232H programmer/ +s/Futurlec.com programming cable/Futurlec.com cable/ +s/AVR ISP programmer from iascaled.com/AVR ISP programmer/ +s/Amontec JTAGKey\/JTAGKey-Tiny\/JTAGKey2/Amontec JTAGKey/ +s/KT-LINK FT2232H: IO switching, voltage buffers/KT-LINK FT2232H/ +s/Use Linux SPI device in \/dev\/spidev\*/Linux \/dev\/spidev\* programmer/ +s/Luminary Micro LM3S811 Eval Board.*/Luminary Micro LM3S811/ +s/Crossbow MIB510 programming board/Crossbow MIB510/ +s/Jason Kyle's pAVR Serial Programmer/Jason Kyle's pAVR/ +s/ponyprog serial: reset=!txd sck=rts sdo=dtr sdi=cts/Serial port programmer/ +s/Raspberry Pi GPIO via sysfs\/libgpiod/RPi GPIO programmer/ +s/Program via the Serprog protocol from Flashrom/Flashcom serprog protocol/ +s/FTDI TTL232R-5V with ICSP adapter/FTDI TTL232R-5V/ +s/TIAO USB Multi-Protocol Adapter/TIAO USB programmer/ +s/uncompatino with all pairs of pins shorted/Uncompatino programmer/ +s/Urboot bootloaders using urprotocol/Urboot bootloader\n@cindex Urclock programmer\n@cindex Urprotocol/ +s/Any usbasp clone with correct VID\/PID/Usbasp clones/ +s/Wiring bootloader using STK500 v2 protocol/Wiring bootloader/ +s/XBeeBoot Over-The-Air bootloader.*/XBeeBoot OTA bootloader/ +s/@cindex Atmel \(.*\)/&\n@cindex \u\1/ +s/@cindex MPLAB(R) \(.*\)/&\n@cindex \u\1/ diff --git a/src/ft245r.c b/src/ft245r.c index d7e320778..437cc62f4 100644 --- a/src/ft245r.c +++ b/src/ft245r.c @@ -1238,4 +1238,4 @@ void ft245r_initpgm(PROGRAMMER *pgm) { } #endif -const char ft245r_desc[] = "FT245R/FT232R synchronous bit-bang programmer of type ftdi_syncbb"; +const char ft245r_desc[] = "FT245R/FT232R synchronous bit-bang programmer"; diff --git a/src/main.c b/src/main.c index b4045bf80..0656c29f4 100644 --- a/src/main.c +++ b/src/main.c @@ -284,8 +284,11 @@ static void pmshorten(char *desc, const char *modes) { {" in parallel programming mode", "HVPP"}, {" in PP mode", "HVPP"}, {" in high-voltage serial programming mode", "HVSP"}, + {" in HV serial programming mode", "HVSP"}, {" in HVSP mode", "HVSP"}, {" in ISP mode", "ISP"}, + {" in ISP mode", "TPI, ISP"}, + {" in TPI mode", "TPI"}, {" in debugWire mode", "debugWIRE"}, {" in AVR32 mode", "aWire"}, {" in PDI mode", "PDI"}, @@ -294,6 +297,8 @@ static void pmshorten(char *desc, const char *modes) { {" in JTAG mode", "JTAGmkI"}, {" in JTAG mode", "XMEGAJTAG"}, {" in JTAG mode", "AVR32JTAG"}, + {" in JTAG mode", "JTAG, XMEGAJTAG, AVR32JTAG"}, + {" in JTAG mode", "JTAG, XMEGAJTAG"}, {" for bootloader", "bootloader"}, }; size_t len = strlen(desc); @@ -313,6 +318,7 @@ static void list_programmers(FILE *f, const char *prefix, LISTID programmers, in LNODEID ln2; PROGRAMMER *pgm; int maxlen = 0, len; + PROGRAMMER *dry = locate_programmer(programmers, "dryrun"); sort_programmers(programmers); @@ -340,20 +346,19 @@ static void list_programmers(FILE *f, const char *prefix, LISTID programmers, in // List programmer if pm or prog_modes uninitialised or if they are compatible otherwise if(!pm || !pgm->prog_modes || (pm & pgm->prog_modes)) { const char *id = ldata(ln2); - char *desc = mmt_strdup(pgm->desc); - const char *modes = avr_prog_modes(pm & pgm->prog_modes); - - if(pm != ~0) - pmshorten(desc, modes); - if(*id == 0 || *id == '.') continue; + + char *desc = mmt_strdup(pgm->desc); + const char *strmodes = str_prog_modes(pgm->prog_modes); + pmshorten(desc, avr_prog_modes(pm & pgm->prog_modes)); if(verbose > 0) - fprintf(f, "%s%-*s = %-30s [%s:%d]", prefix, maxlen, id, desc, pgm->config_file, pgm->lineno); + fprintf(f, "%s%-*s = %s (%s) [%s:%d]", prefix, maxlen, id, desc, + strmodes, pgm->config_file, pgm->lineno); else - fprintf(f, "%s%-*s = %-s", prefix, maxlen, id, desc); - if(pm != ~0) - fprintf(f, " via %s", modes); + fprintf(f, "%s%-*s = %s (%s)", prefix, maxlen, id, desc, strmodes); + if(pm != ~0 && strchr(strmodes, ' ') && !(dry && pgm->initpgm == dry->initpgm)) + fprintf(f, " via %s", str_prog_modes(pm & pgm->prog_modes)); fprintf(f, "\n"); mmt_free(desc); @@ -377,6 +382,40 @@ static void list_programmer_types(FILE *f, const char *prefix) { walk_programmer_types(list_programmer_types_callback, &c); } +// Return a list of long names for part followed by prog modes in brackets +static const char *part_ccdesc(const AVRPART *p) { + char *name[5]; // Max 5 alternative names + int nn = 0, i; + char *pmodes = mmt_strdup(str_prog_modes(p->prog_modes)); + char ret[6*(64+2) + 256 + 20], *r = ret; + + // Create list name[] of alternative names to p->desc + for(LNODEID ln = lfirst(p->variants); ln; ln = lnext(ln)) { + const char *alt = ldata(ln), *end, *q; + if((end = strchr(alt, ':')) && end > alt && *alt != '-') { + if((q = strchr(alt, '-')) && q < end) + end = q; + if(strncasecmp(p->desc, alt, end-alt) || p->desc[end-alt]) { // Variant's base is not p->desc +// printf("X %.*s", (int) (end-alt), alt); + for(i = 0; i < nn; i++) + if(!strncasecmp(name[i], alt, end-alt) && !name[i][end-alt]) + break; + if(i == nn && nn < 5) + name[nn++] = str_sprintf("%.*s", (int) (end-alt), alt); + } + } + } + sprintf(r, "%.64s", p->desc), r += strlen(r); + for(i = 0; i < nn; i++) { + sprintf(r, ", %.64s", name[i]), r += strlen(r); + mmt_free(name[i]); + } + sprintf(r, " (%.256s)", pmodes); + mmt_free(pmodes); + + return str_ccprintf("%s", ret); +} + static void list_parts(FILE *f, const char *prefix, LISTID avrparts, int pm) { LNODEID ln1; AVRPART *p; @@ -403,9 +442,10 @@ static void list_parts(FILE *f, const char *prefix, LISTID avrparts, int pm) { if(verbose < MSG_NOTICE2 && p->id[0] == '.') // Hide ids starting with '.' continue; if(verbose > 0) - fprintf(f, "%s%-*s = %-18s [%s:%d]", prefix, maxlen, p->id, p->desc, p->config_file, p->lineno); + fprintf(f, "%s%-*s = %-18s [%s:%d]", prefix, maxlen, p->id, part_ccdesc(p), + p->config_file, p->lineno); else - fprintf(f, "%s%-*s = %s", prefix, maxlen, p->id, p->desc); + fprintf(f, "%s%-*s = %s", prefix, maxlen, p->id, part_ccdesc(p)); if(pm != ~0) fprintf(f, " via %s", avr_prog_modes(pm & p->prog_modes)); fprintf(f, "\n"); diff --git a/src/usbtiny.c b/src/usbtiny.c index 8c9df8e1c..50ed7797e 100644 --- a/src/usbtiny.c +++ b/src/usbtiny.c @@ -771,4 +771,4 @@ void usbtiny_initpgm(PROGRAMMER *pgm) { } #endif // HAVE_LIBUSB -const char usbtiny_desc[] = "Usbtiny-type programmers incl arduinoisp, arduino_gemma and adafruit_gemma"; +const char usbtiny_desc[] = "Usbtiny programmer (also as bootloading protocol)"; diff --git a/src/wiring.c b/src/wiring.c index ca6186d24..6ddb4bf38 100644 --- a/src/wiring.c +++ b/src/wiring.c @@ -188,7 +188,7 @@ static void wiring_close(PROGRAMMER *pgm) { pgm->fd.ifd = -1; } -const char wiring_desc[] = "Bootloader using STK500v2 protocol, see http://wiring.org.co"; +const char wiring_desc[] = "Bootloader using the STK500v2 protocol (AVR068)"; void wiring_initpgm(PROGRAMMER *pgm) { // The Wiring bootloader uses a near-complete STK500v2 protocol