diff --git a/ChangeLog b/ChangeLog index 54642619..3b9352c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,16 @@ +2011-12-29 Rene Liebscher + + patch #7687: Autogenerating programmers and parts lists for docs + (generating the parts lists, programmers lists follows later) + * doc/avrdude.texi: Add include of generated table of parts + * doc/Makefile.am: Add generating of table of parts in parts.texi + * doc/parts_comments.txt: Adding file containing part commenz references + * avrdude.1: Remove table of parts and mention "-p ?" option + * avrpart.c: Use AVR_DESCLEN for strncasecmp at list sorting + 2011-12-22 Rene Liebscher - * configure.ac: Add writing of definition of confsubst to config.status, + * configure.ac: Add writing of definition of confsubst to config.status, so it can run alone, not only called by configure. 2011-12-17 Rene Liebscher diff --git a/avrdude.1 b/avrdude.1 index 354da762..66972571 100644 --- a/avrdude.1 +++ b/avrdude.1 @@ -206,127 +206,25 @@ It specifies the type of the MCU connected to the programmer. These are read fr does not know about a part that you have, simply add it to the config file (be sure and submit a patch back to the author so that it can be incorporated for the next version). See the sample config file for -the format. Currently, the following MCU types are understood: +the format. +For currently supported MCU types use ? as partno, this will print a list of partno ids and official part names on the terminal. (Both can be used with the -p option.) .Pp -.TS -ll. -\fBOption tag\fP \fBOfficial part name\fP -1200 AT90S1200 (****) -2313 AT90S2313 -2333 AT90S2333 -2343 AT90S2343 (*) -4414 AT90S4414 -4433 AT90S4433 -4434 AT90S4434 -8515 AT90S8515 -8535 AT90S8535 -c128 AT90CAN128 -c32 AT90CAN32 -c64 AT90CAN64 -m103 ATmega103 -m128 ATmega128 -m1280 ATmega1280 -m1281 ATmega1281 -m1284p ATmega1284P -m128rfa1 ATmega128RFA1 -m16 ATmega16 -m161 ATmega161 -m162 ATmega162 -m163 ATmega163 -m164 ATmega164 -m164p ATmega164P -m168 ATmega168 -m168p ATmega168P -m169 ATmega169 -m16u2 ATmega16U2 -m2560 ATmega2560 (**) -m2561 ATmega2561 (**) -m32 ATmega32 -m324p ATmega324P -m325 ATmega325 -m3250 ATmega3250 -m328p ATmega328P -m329 ATmega329 -m3290 ATmega3290 -m329p ATmega329P -m3290p ATmega3290P -m32u2 ATmega32U2 -m32u4 ATmega32U4 -m48 ATmega48 -m64 ATmega64 -m640 ATmega640 -m644p ATmega644P -m644 ATmega644 -m645 ATmega645 -m6450 ATmega6450 -m649 ATmega649 -m6490 ATmega6490 -m8 ATmega8 -m8515 ATmega8515 -m8535 ATmega8535 -m88 ATmega88 -m88p ATmega88P -m8u2 ATmega8U2 -pwm2 AT90PWM2 -pwm2b AT90PWM2B -pwm3 AT90PWM3 -pwm3b AT90PWM3B -t10 ATtiny10 -t12 ATtiny12 (***) -t13 ATtiny13 -t15 ATtiny15 -t2313 ATtiny2313 -t25 ATtiny25 -t26 ATtiny26 -t261 ATtiny261 -t4 ATtiny4 -t4313 ATtiny4313 -t44 ATtiny44 -t45 ATtiny45 -t461 ATtiny461 -t5 ATtiny5 -t84 ATtiny84 -t85 ATtiny85 -t861 ATtiny861 -t88 ATtiny88 -t9 ATtiny9 -ucr2 AT32uca0512 -usb1286 ATmega1286 -usb1287 ATmega1287 -usb162 ATmega162 -usb646 ATmega647 -usb647 ATmega647 -usb82 ATmega82 -x128a1 ATxmega128A1 -x128a1d ATxmega128A1revD -x128a3 ATxmega128A3 -x128a4 ATxmega128A4 -x16a4 ATxmega16A4 -x192a1 ATxmega192A1 -x192a3 ATxmega192A3 -x256a1 ATxmega256A1 -x256a3 ATxmega256A3 -x256a3b ATxmega256A3B -x32a4 ATxmega32A4 -x64a1 ATxmega64A1 -x64a3 ATxmega64A3 -x64a4 ATxmega64A4 -.TE -.Bl -tag -width "(**) " -.It "(*)" -The AT90S2323 and ATtiny22 use the same algorithm. -.It "(**)" -Flash addressing above 128 KB is not supported by all -programming hardware. Known to work are jtag2, stk500v2, -and bit-bang programmers. -.It "(***)" -The ATtiny11 uses the same algorithm, but can only be -programmed in high-voltage serial mode. -.It "(****)" +Following parts need special attention: +.Bl -tag -width "ATmega1234" +.It "AT90S1200" 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. +.It "AT90S2343" +The AT90S2323 and ATtiny22 use the same algorithm. +.It "ATmega2560, ATmega2561" +Flash addressing above 128 KB is not supported by all +programming hardware. Known to work are jtag2, stk500v2, +and bit-bang programmers. +.It "ATtiny11" +The ATtiny11 can only be +programmed in high-voltage serial mode. .El .It Fl b Ar baudrate Override the RS-232 connection baud rate specified in the respective @@ -346,7 +244,7 @@ You can use the 'default_bitclock' keyword in your file to assign a default value to keep from having to specify this option on every invocation. .It Fl c Ar programmer-id -Use the pin configuration specified by the argument. Pin +Use the programmer specified by the argument. Programmers and their pin configurations are read from the config file (see the .Fl C option). New pin configurations can be easily added or modified @@ -358,6 +256,8 @@ keyword in your .Pa ${HOME}/.avrduderc file to assign a default programmer to keep from having to specify this option on every invocation. +A full list of all supported programmers is output to the terminal +by using ? as programmer-id. .It Fl C Ar config-file Use the specified config file to load configuration data. This file contains all programmer and part definitions that diff --git a/avrdude.conf.in b/avrdude.conf.in index becff92f..06b82a78 100644 --- a/avrdude.conf.in +++ b/avrdude.conf.in @@ -15555,7 +15555,7 @@ part part id = "x128a1d"; - desc = "ATxmega128A1RevD"; + desc = "ATxmega128A1revD"; signature = 0x1e 0x97 0x41; has_jtag = yes; has_pdi = yes; diff --git a/avrpart.c b/avrpart.c index fed8a9ae..90097a91 100644 --- a/avrpart.c +++ b/avrpart.c @@ -478,7 +478,7 @@ static int sort_avrparts_compare(AVRPART * p1,AVRPART * p2) if(p1 == NULL || p2 == NULL) { return 0; } - return strncasecmp(p1->desc,p2->desc,AVR_IDLEN); + return strncasecmp(p1->desc,p2->desc,AVR_DESCLEN); } /* diff --git a/doc/.cvsignore b/doc/.cvsignore index ecbe8063..911e1eb0 100644 --- a/doc/.cvsignore +++ b/doc/.cvsignore @@ -20,3 +20,4 @@ mdate-sh stamp-vti texinfo.tex version.texi +parts.texi diff --git a/doc/Makefile.am b/doc/Makefile.am index c8c6634e..13a81b81 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -22,6 +22,7 @@ # CLEANFILES = \ + parts.texi \ version.texi \ stamp-vti @@ -31,7 +32,7 @@ all-local: info html ps pdf html: avrdude-html/avrdude.html -avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) +avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) $(srcdir)/parts.texi texi2html -split_node $(srcdir)/$(info_TEXINFOS) if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \ mkdir -p avrdude-html ; \ @@ -40,6 +41,16 @@ avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) mv -f avrdude avrdude-html; \ fi; +avrdude.info: parts.texi +avrdude.dvi: parts.texi +avrdude.pdf: parts.texi + +parts.texi: ../avrdude$(EXEEXT) ../avrdude.conf parts_comments.txt 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: rm -rf avrdude-html *.info diff --git a/doc/avrdude.texi b/doc/avrdude.texi index bf6600d9..d822d372 100644 --- a/doc/avrdude.texi +++ b/doc/avrdude.texi @@ -307,106 +307,7 @@ datasheet so that you can enter the programming specifications. Currently, the following MCU types are understood: @multitable @columnfractions .15 .3 -@item @code{1200} @tab AT90S1200 (****) -@item @code{2313} @tab AT90S2313 -@item @code{2333} @tab AT90S2333 -@item @code{2343} @tab AT90S2343 (*) -@item @code{4414} @tab AT90S4414 -@item @code{4433} @tab AT90S4433 -@item @code{4434} @tab AT90S4434 -@item @code{8515} @tab AT90S8515 -@item @code{8535} @tab AT90S8535 -@item @code{c128} @tab AT90CAN128 -@item @code{c32} @tab AT90CAN32 -@item @code{c64} @tab AT90CAN64 -@item @code{m103} @tab ATmega103 -@item @code{m128} @tab ATmega128 -@item @code{m1280} @tab ATmega1280 -@item @code{m1281} @tab ATmega1281 -@item @code{m1284p} @tab ATmega1284P -@item @code{m128rfa1} @tab ATmega128RFA1 -@item @code{m16} @tab ATmega16 -@item @code{m161} @tab ATmega161 -@item @code{m162} @tab ATmega162 -@item @code{m163} @tab ATmega163 -@item @code{m164} @tab ATmega164 -@item @code{m164p} @tab ATmega164P -@item @code{m168} @tab ATmega168 -@item @code{m168p} @tab ATmega168P -@item @code{m169} @tab ATmega169 -@item @code{m16u2} @tab ATmega16U2 -@item @code{m2560} @tab ATmega2560 (**) -@item @code{m2561} @tab ATmega2561 (**) -@item @code{m32} @tab ATmega32 -@item @code{m324p} @tab ATmega324P -@item @code{m325} @tab ATmega325 -@item @code{m3250} @tab ATmega3250 -@item @code{m328p} @tab ATmega328P -@item @code{m329} @tab ATmega329 -@item @code{m3290} @tab ATmega3290 -@item @code{m329p} @tab ATmega329P -@item @code{m3290p} @tab ATmega3290P -@item @code{m32u2} @tab ATmega32U2 -@item @code{m32u4} @tab ATmega32U4 -@item @code{m48} @tab ATmega48 -@item @code{m64} @tab ATmega64 -@item @code{m640} @tab ATmega640 -@item @code{m644p} @tab ATmega644P -@item @code{m644} @tab ATmega644 -@item @code{m645} @tab ATmega645 -@item @code{m6450} @tab ATmega6450 -@item @code{m649} @tab ATmega649 -@item @code{m6490} @tab ATmega6490 -@item @code{m8} @tab ATmega8 -@item @code{m8515} @tab ATmega8515 -@item @code{m8535} @tab ATmega8535 -@item @code{m88} @tab ATmega88 -@item @code{m88p} @tab ATmega88P -@item @code{m8u2} @tab ATmega8U2 -@item @code{pwm2} @tab AT90PWM2 -@item @code{pwm2b} @tab AT90PWM2B -@item @code{pwm3} @tab AT90PWM3 -@item @code{pwm3b} @tab AT90PWM3B -@item @code{t10} @tab ATtiny10 -@item @code{t12} @tab ATtiny12 (***) -@item @code{t13} @tab ATtiny13 -@item @code{t15} @tab ATtiny15 -@item @code{t2313} @tab ATtiny2313 -@item @code{t25} @tab ATtiny25 -@item @code{t26} @tab ATtiny26 -@item @code{t261} @tab ATtiny261 -@item @code{t4} @tab ATtiny4 -@item @code{t4313} @tab ATtiny4313 -@item @code{t44} @tab ATtiny44 -@item @code{t45} @tab ATtiny45 -@item @code{t461} @tab ATtiny461 -@item @code{t5} @tab ATtiny5 -@item @code{t84} @tab ATtiny84 -@item @code{t85} @tab ATtiny85 -@item @code{t861} @tab ATtiny861 -@item @code{t88} @tab ATtiny88 -@item @code{t9} @tab ATtiny9 -@item @code{ucr2} @tab AT32uca0512 -@item @code{usb1286} @tab ATmega1286 -@item @code{usb1287} @tab ATmega1287 -@item @code{usb162} @tab ATmega162 -@item @code{usb646} @tab ATmega647 -@item @code{usb647} @tab ATmega647 -@item @code{usb82} @tab ATmega82 -@item @code{x128a1} @tab ATxmega128A1 -@item @code{x128a1d} @tab ATxmega128A1revD -@item @code{x128a3} @tab ATxmega128A3 -@item @code{x128a4} @tab ATxmega128A4 -@item @code{x16a4} @tab ATxmega16A4 -@item @code{x192a1} @tab ATxmega192A1 -@item @code{x192a3} @tab ATxmega192A3 -@item @code{x256a1} @tab ATxmega256A1 -@item @code{x256a3} @tab ATxmega256A3 -@item @code{x256a3b} @tab ATxmega256A3B -@item @code{x32a4} @tab ATxmega32A4 -@item @code{x64a1} @tab ATxmega64A1 -@item @code{x64a3} @tab ATxmega64A3 -@item @code{x64a4} @tab ATxmega64A4 +@include parts.texi @end multitable (*) The AT90S2323 and ATtiny22 use the same algorithm. @@ -416,7 +317,7 @@ programming hardware. Known to work are jtag2, stk500v2, and bit-bang programmers. (***) -The ATtiny11 uses the same algorithm, but can only be +The ATtiny11 can only be programmed in high-voltage serial mode. (****) diff --git a/doc/parts_comments.txt b/doc/parts_comments.txt new file mode 100644 index 00000000..d83bb431 --- /dev/null +++ b/doc/parts_comments.txt @@ -0,0 +1,5 @@ +AT90S1200 (****) +AT90S2343 (*) +ATmega2560 (**) +ATmega2561 (**) +ATtiny11 (***)