Skip to content

Commit

Permalink
Merge pull request #1895 from stefanrueger/avrdude.pdf
Browse files Browse the repository at this point in the history
Add detail to part and programmer lists in avrdude.pdf
  • Loading branch information
stefanrueger authored Aug 23, 2024
2 parents a959462 + 13879ba commit 42589c0
Show file tree
Hide file tree
Showing 19 changed files with 1,047 additions and 612 deletions.
2 changes: 1 addition & 1 deletion src/arduino.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/avr910.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
118 changes: 59 additions & 59 deletions src/avrdude.conf.in

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/avrftdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
4 changes: 2 additions & 2 deletions src/buspirate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/butterfly.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/ch341a.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
38 changes: 11 additions & 27 deletions src/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<TARGET_FILE:avrdude> -C ${AVRDUDE_CONF} -c ? 2>&1 | more > programmers.txt
OUTPUT programmers.texi
DEPENDS avrdude_binaries ${CMAKE_CURRENT_SOURCE_DIR}/programmers.sed
COMMAND $<TARGET_FILE:avrdude> -C ${AVRDUDE_CONF} -c ? 2>&1 | grep = | sed -f ${CMAKE_CURRENT_SOURCE_DIR}/programmers.sed > programmers.texi
VERBATIM
)

Expand All @@ -54,19 +54,9 @@ add_custom_command(
)

add_custom_command(
OUTPUT parts.txt
DEPENDS avrdude_binaries
COMMAND $<TARGET_FILE:avrdude> -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 $<TARGET_FILE:avrdude> -C ${AVRDUDE_CONF} -p ? 2>&1 | grep = | sed -f ${CMAKE_CURRENT_SOURCE_DIR}/parts.sed > parts.texi
VERBATIM
)

Expand All @@ -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 $<TARGET_FILE:avrdude> -C ${AVRDUDE_CONF} -p \? 2>&1 | grep = | wc -l >> version.texi
COMMAND echo -n "@set NUMPROGRAMMERS " >> version.texi
COMMAND $<TARGET_FILE:avrdude> -C ${AVRDUDE_CONF} -c \? 2>&1 | grep = | wc -l >> version.texi
VERBATIM
)

Expand Down
13 changes: 6 additions & 7 deletions src/doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ CLEANFILES = \
info_TEXINFOS = avrdude.texi

EXTRA_DIST = \
parts_comments.txt
parts.sed \
programmers.sed

all-local: info html pdf

Expand All @@ -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
Expand All @@ -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_comments.txt`" \
| grep = | sed -f $(srcdir)/parts.sed \
>parts.texi

clean-local:
Expand Down
Loading

0 comments on commit 42589c0

Please sign in to comment.