Change the name from AVRPROG to AVRDUDE.

This change represents a name change only.  There is currently an
effort to port AVRPROG to other platforms including Linux and Windows.
Since Atmel's programmer binary that's included within their AVR
Studio software is named AVRPROG.EXE on the Windows OS, there is the
chance for confusion if we keep calling this program AVRPROG as well.
Up until now the name hasn't really been a problem since there was no
chance to confuse 'avrprog' on Unix with Atmel's AVRPROG because
Atmel's tools only run on Windows.  But with the Unix 'avrprog'
possibly being ported to Windows, I felt a name change was the best
way to avoid problems.

So - from this point forward, my FreeBSD Unix program formerly known
as AVRPROG will subsequently be known as AVRDUDE (AVR Downloader/UploaDEr).

This change also represents a time when the AVRDUDE sources move from
my own private repository to a public repository.  This will give
other developers a chance to port AVRDUDE to other platforms and
extend its functionality to support additional programming hardware,
etc.

So goodbye AVRPROG, welcome AVRDUDE!


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@170 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2003-02-06 05:13:32 +00:00
parent 94ff57fbe4
commit 17427c0645
11 changed files with 103 additions and 109 deletions

View File

@ -1,9 +1,34 @@
$Id$ $Id$
Approximate change log for AVRPROG by version Approximate change log for AVRDUDE by version
---------------------------------------------------------------------- ----------------------------------------------------------------------
Version 3.1.0
* This change represents a name change only. There is currently an
effort to port AVRPROG to other platforms including Linux and
Windows. Since Atmel's programmer binary that's included within
their AVR Studio software is named AVRPROG.EXE on the Windows OS,
there is the chance for confusion if we keep calling this program
AVRPROG as well. Up until now the name hasn't really been a
problem since there was no chance to confuse 'avrprog' on Unix
with Atmel's AVRPROG because Atmel's tools only run on Windows.
But with the Unix 'avrprog' possibly being ported to Windows, I
felt a name change was the best way to avoid problems.
So - from this point forward, my FreeBSD Unix program formerly
known as AVRPROG will subsequently be known as AVRDUDE (AVR
Downloader/UploaDEr).
This change also represents a time when the AVRDUDE sources move
from my own private repository to a public repository. This will
give other developers a chance to port AVRDUDE to other platforms
and extend its functionality to support additional programming
hardware, etc.
So goodbye AVRPROG, welcome AVRDUDE!
Version 3.0.0 Version 3.0.0
* Rewrite parts of the code to make it easy to support other types * Rewrite parts of the code to make it easy to support other types

View File

@ -4,13 +4,13 @@
# #
TARGET = avrprog TARGET = avrdude
PREFIX ?= /usr/local PREFIX ?= /usr/local
BINDIR = ${PREFIX}/bin BINDIR = ${PREFIX}/bin
MANDIR = ${PREFIX}/man/man1 MANDIR = ${PREFIX}/man/man1
MANUAL = avrprog.1 MANUAL = avrdude.1
DOCDIR = ${PREFIX}/share/doc/avrprog DOCDIR = ${PREFIX}/share/doc/avrdude
CONFIGDIR = ${PREFIX}/etc CONFIGDIR = ${PREFIX}/etc
DIRS = ${BINDIR} ${MANDIR} ${DOCDIR} ${CONFIGDIR} DIRS = ${BINDIR} ${MANDIR} ${DOCDIR} ${CONFIGDIR}
@ -31,33 +31,46 @@ LIBS = -lreadline
YYDEF = -DYYSTYPE="struct token_t *" YYDEF = -DYYSTYPE="struct token_t *"
OBJS = config_gram.o avr.o config.o fileio.o lexer.o lists.o main.o pgm.o \
ppi.o stk500.o term.o
.include "Makefile.inc" all : ${TARGET}
EXTRA_OBJS = config_gram.o lexer.o
OBJECTS = ${EXTRA_OBJS} ${OBJS}
all : ${TARGET} : ${OBJS}
@if [ ! -f y.tab.h ]; then touch y.tab.h; fi ${CC} ${LDFLAGS} -o ${TARGET} ${OBJS} ${LIBS}
make depend
make ${TARGET}
${TARGET} : ${OBJECTS}
${CC} ${LDFLAGS} -o ${TARGET} ${OBJECTS} ${LIBS}
clean : clean :
rm -f *.o lexer.c ${TARGET} *~ *.core y.tab.c y.tab.h rm -f *.o lexer.c ${TARGET} *~ *.core y.tab.c y.tab.h y.output
touch y.tab.h
install : dirs \ install : dirs \
${BINDIR}/${TARGET} \ ${BINDIR}/${TARGET} \
${MANDIR}/${MANUAL} \ ${MANDIR}/${MANUAL} \
${DOCDIR}/avrprog.pdf \ ${DOCDIR}/avrdude.pdf \
${CONFIGDIR}/avrprog.conf.sample \ ${CONFIGDIR}/avrdude.conf.sample \
${CONFIGDIR}/avrprog.conf ${CONFIGDIR}/avrdude.conf
config_gram.o : avr.h config.h lists.h pindefs.h config_gram.o : avr.h config.h lists.h pindefs.h
avr.o: avr.c avr.h avrpart.h lists.h pgm.h pindefs.h config.h ppi.h
config.o: config.c avr.h avrpart.h lists.h pgm.h pindefs.h config.h
fileio.o: fileio.c avr.h avrpart.h lists.h pgm.h pindefs.h fileio.h
lists.o: lists.c lists.h
main.o: main.c avr.h avrpart.h lists.h pgm.h pindefs.h config.h fileio.h \
ppi.h term.h
pgm.o: pgm.c pgm.h avrpart.h lists.h pindefs.h
ppi.o: ppi.c avr.h avrpart.h lists.h pgm.h pindefs.h ppi.h config.h
stk500.o: stk500.c avr.h avrpart.h lists.h pgm.h pindefs.h stk500_private.h
term.o: term.c avr.h avrpart.h lists.h pgm.h pindefs.h config.h ppi.h
dirs : dirs :
@for dir in ${DIRS}; do \ @for dir in ${DIRS}; do \
@ -73,17 +86,17 @@ ${BINDIR}/${TARGET} : ${TARGET}
${MANDIR}/${MANUAL} : ${MANUAL} ${MANDIR}/${MANUAL} : ${MANUAL}
${INSTALL_MANUAL} ${MANUAL} $@ ${INSTALL_MANUAL} ${MANUAL} $@
${DOCDIR}/avrprog.pdf : avrprog.pdf ${DOCDIR}/avrdude.pdf : avrdude.pdf
${INSTALL_DATA} avrprog.pdf $@ ${INSTALL_DATA} avrdude.pdf $@
${CONFIGDIR}/avrprog.conf.sample : avrprog.conf.sample ${CONFIGDIR}/avrdude.conf.sample : avrdude.conf.sample
${INSTALL_DATA} avrprog.conf.sample $@ ${INSTALL_DATA} avrdude.conf.sample $@
${CONFIGDIR}/avrprog.conf : avrprog.conf.sample ${CONFIGDIR}/avrdude.conf : avrdude.conf.sample
@if [ -f ${CONFIGDIR}/avrprog.conf ]; then \ @if [ -f ${CONFIGDIR}/avrdude.conf ]; then \
export TS=`date '+%Y%m%d%H%M%S'`; \ export TS=`date '+%Y%m%d%H%M%S'`; \
echo "NOTE: backing up ${CONFIGDIR}/avrprog.conf to ${CONFIGDIR}/avrprog.conf.$${TS}"; \ echo "NOTE: backing up ${CONFIGDIR}/avrdude.conf to ${CONFIGDIR}/avrdude.conf.$${TS}"; \
cp -p ${CONFIGDIR}/avrprog.conf ${CONFIGDIR}/avrprog.conf.$${TS}; \ cp -p ${CONFIGDIR}/avrdude.conf ${CONFIGDIR}/avrdude.conf.$${TS}; \
fi fi
${INSTALL_DATA} avrprog.conf.sample $@ ${INSTALL_DATA} avrdude.conf.sample $@

View File

@ -1,45 +0,0 @@
.SUFFIXES: .o .c .l .y
first_rule : all
.y.o:
${YACC} ${YFLAGS} ${.IMPSRC}
${CC} ${CFLAGS} -c y.tab.c
rm -f y.tab.c
mv y.tab.o ${.TARGET}
.depend : .PHONY
@echo "# dependencies generated `date +'%D %T'`" > .depend
@echo >> .depend
@echo "# SUBDIR=`pwd`" >> .depend
@echo >> .depend
@echo >> .depend
@echo "SRCS = \\" >> .depend
@for i in *.S *.c; do \
if [ -f "$$i" ]; then \
echo " $$i \\" >> .depend; \
fi ; \
done
@echo >> .depend
@echo "OBJS = \\" >> .depend
@for i in *.S *.c; do \
if [ -f "$$i" ]; then \
echo " $${i%%.*}.o \\" >> .depend; \
fi ; \
done
@echo >> .depend
@for i in *.S *.c; do \
if [ -f "$$i" ]; then \
$(CC) -E $(CFLAGS) -M $$i >> .depend; \
fi ; \
done
@echo >> .depend
.if exists(.depend)
.include ".depend"
.endif
depend : .depend

4
avr.c
View File

@ -623,8 +623,8 @@ int avr_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
"%s bits\n", progname, mem->desc); "%s bits\n", progname, mem->desc);
fprintf(stderr, fprintf(stderr,
"%s: you must manually power-down the device and restart\n" "%s: you must manually power-down the device and restart\n"
"%s: avrprog to continue.\n", "%s: %s to continue.\n",
progname, progname); progname, progname, progname);
return -3; return -3;
} }

View File

@ -26,9 +26,9 @@
.\" .\"
.Dd DATE January 11, 2002 .Dd DATE January 11, 2002
.Os .Os
.Dt AVRPROG 1 .Dt AVRDUDE 1
.Sh NAME .Sh NAME
.Nm avrprog .Nm avrdude
.Nd driver program for ``simple'' Atmel AVR MCU programmer .Nd driver program for ``simple'' Atmel AVR MCU programmer
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
@ -52,10 +52,10 @@
.Op Fl y .Op Fl y
.Op Fl Y .Op Fl Y
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm Avrprog .Nm Avrdude
is a program for downloading code and data to Atmel AVR is a program for downloading code and data to Atmel AVR
microcontrollers. microcontrollers.
.Nm Avrprog .Nm Avrdude
supports Atmel's STK500 programmer as well as a simple hard-wired supports Atmel's STK500 programmer as well as a simple hard-wired
programmer connected directly to a programmer connected directly to a
.Xr ppi 4 .Xr ppi 4
@ -82,7 +82,7 @@ signal is available to control a buffer/driver IC 74LS367 (or
from the MCU when in-system programming is used. from the MCU when in-system programming is used.
.Pp .Pp
See the file See the file
.Pa ${PREFIX}/share/doc/avrprog/avrprog.pdf .Pa ${PREFIX}/share/doc/avrdude/avrdude.pdf
for a schematic of the for a schematic of the
.Xr ppi 4 .Xr ppi 4
based programming hardware. based programming hardware.
@ -100,7 +100,7 @@ as a standalone assembler, or
.Xr avr-objcopy 1 .Xr avr-objcopy 1
for the final stage of the GNU toolchain for the AVR microcontroller. for the final stage of the GNU toolchain for the AVR microcontroller.
.Pp .Pp
.Nm Avrprog .Nm Avrdude
can program the EEPROM and flash ROM memory cells of supported AVR can program the EEPROM and flash ROM memory cells of supported AVR
parts. Where supported by the serial instruction set, fuse bits and parts. Where supported by the serial instruction set, fuse bits and
lock bits can be programmed as well. These are implemented within lock bits can be programmed as well. These are implemented within
@ -120,13 +120,13 @@ individual memory cells.
.Ss Options .Ss Options
In order to control all the different operation modi, a number of options In order to control all the different operation modi, a number of options
need to be specified to need to be specified to
.Nm avrprog . .Nm avrdude .
.Bl -tag -offset indent -width indent .Bl -tag -offset indent -width indent
.It Fl p Ar partno .It Fl p Ar partno
This is the only option that is mandatory for every invocation of This is the only option that is mandatory for every invocation of
.Nm avrprog . .Nm avrdude .
It specifies the type of the MCU connected to the programmer. These are read from the config file. If It specifies the type of the MCU connected to the programmer. These are read from the config file. If
.Nm avrprog .Nm avrdude
does not know about a part that you have, simply add it to the config 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 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 incorporated for the next version). See the sample config file for
@ -156,7 +156,7 @@ configurations are read from the config file (see the
.Fl C .Fl C
option). New pin configurations can be easily added or modified option). New pin configurations can be easily added or modified
through the use of a config file to make through the use of a config file to make
.Nm avrprog .Nm avrdude
work with different programmers as long as the programmer supports the work with different programmers as long as the programmer supports the
Atmel AVR serial program method. If that file contains an entry named Atmel AVR serial program method. If that file contains an entry named
.Dq default , .Dq default ,
@ -166,13 +166,13 @@ is missing; otherwise a builtin default will be used.
.It Fl C Ar config-file .It Fl C Ar config-file
Use the specified config file to load configuration data. This file Use the specified config file to load configuration data. This file
contains all programmer and part definitions that contains all programmer and part definitions that
.Nm avrprog .Nm avrdude
knows about. If you have a programmer or part that knows about. If you have a programmer or part that
.Nm avrprog .Nm avrdude
does not know about, you can add it to the config file (be sure and does not know about, you can add it to the config file (be sure and
submit a patch back to the author so that it can be incorporated for submit a patch back to the author so that it can be incorporated for
the next version). See the sample config file, located at the next version). See the sample config file, located at
.Pa ${PREFIX}/etc/avrprog.conf.sample , .Pa ${PREFIX}/etc/avrdude.conf.sample ,
which contains a description of the format. which contains a description of the format.
.It Fl e .It Fl e
Causes a chip erase to be executed. This will reset the contents of the Causes a chip erase to be executed. This will reset the contents of the
@ -287,7 +287,7 @@ by a particular device. The default is
.Em flash . .Em flash .
.It Fl n .It Fl n
No-write - disables actually writing data to the MCU (useful for debugging No-write - disables actually writing data to the MCU (useful for debugging
.Nm avrprog .Nm avrdude
). ).
.It Fl o Ar filename .It Fl o Ar filename
Specifies the name of the output file to write, and causes the respective Specifies the name of the output file to write, and causes the respective
@ -389,7 +389,7 @@ Display the current part settings.
Give a short on-line summary of the available commands. Give a short on-line summary of the available commands.
.It Ar quit .It Ar quit
Leave terminal mode and thus Leave terminal mode and thus
.Nm avrprog . .Nm avrdude .
.El .El
.Ss Default Parallel port pin connections .Ss Default Parallel port pin connections
(these can be changed, see the (these can be changed, see the
@ -410,15 +410,15 @@ ll.
.It Pa /dev/ppi0 .It Pa /dev/ppi0
default device to be used for communication with the programming default device to be used for communication with the programming
hardware hardware
.It Pa ${PREFIX}/etc/avrprog.conf.sample .It Pa ${PREFIX}/etc/avrdude.conf.sample
sample programmer and parts configuration file sample programmer and parts configuration file
.It Pa ${PREFIX}/etc/avrprog.conf .It Pa ${PREFIX}/etc/avrdude.conf
default programmer and parts configuration file default programmer and parts configuration file
.It Pa ~/.inputrc .It Pa ~/.inputrc
Initialization file for the Initialization file for the
.Xr readline 3 .Xr readline 3
library library
.It Pa ${PREFIX}/share/doc/avrprog/avrprog.pdf .It Pa ${PREFIX}/share/doc/avrdude/avrdude.pdf
Schematic of programming hardware Schematic of programming hardware
.El .El
.\" .Sh EXAMPLES .\" .Sh EXAMPLES
@ -433,7 +433,7 @@ The AVR microcontroller product description can be found at
.Dl "http://www.atmel.com/atmel/products/prod23.htm" .Dl "http://www.atmel.com/atmel/products/prod23.htm"
.\" .Sh HISTORY .\" .Sh HISTORY
.Sh AUTHORS .Sh AUTHORS
.Nm Avrprog .Nm Avrdude
was written by Brian S. Dean <bsd@bsdhome.com>. was written by Brian S. Dean <bsd@bsdhome.com>.
.Pp .Pp
This man page by This man page by

View File

@ -1,13 +1,13 @@
# $Id$ # $Id$
# #
# AVRPROG Configuration File # AVRDUDE Configuration File
# #
# This file contains configuration data used by AVRPROG which describes # This file contains configuration data used by AVRDUDE which describes
# the programming hardware pinouts and also provides part definitions. # the programming hardware pinouts and also provides part definitions.
# AVRPROG's "-C" command line option specifies the location of the # AVRDUDE's "-C" command line option specifies the location of the
# configuration file. The "-c" option names the programmer configuration # configuration file. The "-c" option names the programmer configuration
# which must match one of the entry's "id" parameter. The "-p" option # which must match one of the entry's "id" parameter. The "-p" option
# identifies which part AVRPROG is going to be programming and must match # identifies which part AVRDUDE is going to be programming and must match
# one of the parts' "id" parameter. # one of the parts' "id" parameter.
# #
# Possible entry formats are: # Possible entry formats are:
@ -58,7 +58,7 @@
# #
# If any of the above parameters are not specified, the default value # If any of the above parameters are not specified, the default value
# of 0 is used for numerics or the empty string ("") for string # of 0 is used for numerics or the empty string ("") for string
# values. If a required parameter is left empty, AVRPROG will # values. If a required parameter is left empty, AVRDUDE will
# complain. # complain.
# #
# NOTES: # NOTES:
@ -69,9 +69,9 @@
# * Example memory types are: # * Example memory types are:
# "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high # "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high
# fuse), "signature", "calibration", "lock" # fuse), "signature", "calibration", "lock"
# * The memory type specified on the avrprog command line must match # * The memory type specified on the avrdude command line must match
# one of the memory types defined for the specified chip. # one of the memory types defined for the specified chip.
# * The pwroff_after_write flag causes avrprog to attempt to # * The pwroff_after_write flag causes avrdude to attempt to
# power the device off and back on after an unsuccessful write to # power the device off and back on after an unsuccessful write to
# the affected memory area if VCC programmer pins are defined. If # the affected memory area if VCC programmer pins are defined. If
# VCC pins are not defined for the programmer, a message # VCC pins are not defined for the programmer, a message

View File

@ -471,6 +471,7 @@ mem_spec :
#include "pindefs.h" #include "pindefs.h"
#include "ppi.h" #include "ppi.h"
#include "pgm.h" #include "pgm.h"
#include "stk500.h"
#include "avr.h" #include "avr.h"
extern char * progname; extern char * progname;

View File

@ -184,7 +184,7 @@ yes { yylval=new_token(K_YES); return K_YES; }
c: { fprintf(stderr, "error at %s:%d: possible old-style config file entry\n", c: { fprintf(stderr, "error at %s:%d: possible old-style config file entry\n",
infile, lineno); infile, lineno);
fprintf(stderr, " Update your config file (see %s%s for a sample)\n", fprintf(stderr, " Update your config file (see %s%s for a sample)\n",
CONFIG_DIR, "/avrprog.conf.sample"); CONFIG_DIR, "/avrdude.conf.sample");
exit(1); } exit(1); }
. { fprintf(stderr, "error at %s:%d unrecognized character: \"%s\"\n", . { fprintf(stderr, "error at %s:%d unrecognized character: \"%s\"\n",

10
main.c
View File

@ -461,7 +461,7 @@ int main(int argc, char * argv [])
ppiclrbits = 0; ppiclrbits = 0;
exitspecs = NULL; exitspecs = NULL;
pgm = NULL; pgm = NULL;
pinconfig = "avrprog"; /* compiled-in default */ pinconfig = "avrdude"; /* compiled-in default */
verbose = 0; verbose = 0;
do_cycles = 0; do_cycles = 0;
set_cycles = -1; set_cycles = -1;
@ -470,7 +470,7 @@ int main(int argc, char * argv [])
i = strlen(configfile); i = strlen(configfile);
if (i && (configfile[i-1] != '/')) if (i && (configfile[i-1] != '/'))
strcat(configfile, "/"); strcat(configfile, "/");
strcat(configfile, "avrprog.conf"); strcat(configfile, "avrdude.conf");
/* /*
* initialize compiled-in default programmer * initialize compiled-in default programmer
@ -478,8 +478,8 @@ int main(int argc, char * argv [])
compiled_in_pgm = pgm_new(); compiled_in_pgm = pgm_new();
pgm = compiled_in_pgm; pgm = compiled_in_pgm;
ppi_initpgm(pgm); ppi_initpgm(pgm);
ladd(pgm->id, dup_string("avrprog")); ladd(pgm->id, dup_string("avrdude"));
strcpy(pgm->desc, "avrprog compiled-in default"); strcpy(pgm->desc, "avrdude compiled-in default");
pgm->pinno[PPI_AVR_VCC] = 0x0f; /* ppi pins 2-5, data reg bits 0-3 */ pgm->pinno[PPI_AVR_VCC] = 0x0f; /* ppi pins 2-5, data reg bits 0-3 */
pgm->pinno[PPI_AVR_BUFF] = 0; pgm->pinno[PPI_AVR_BUFF] = 0;
pgm->pinno[PIN_AVR_RESET] = 7; pgm->pinno[PIN_AVR_RESET] = 7;
@ -679,7 +679,7 @@ int main(int argc, char * argv [])
exit(1); exit(1);
} }
if (strcmp(pinconfig, "avrprog") == 0) { if (strcmp(pinconfig, "avrdude") == 0) {
pgm = locate_pinconfig(programmers, "default"); pgm = locate_pinconfig(programmers, "default");
if (pgm == NULL) { if (pgm == NULL) {
/* no default config listed, use the compile-in default */ /* no default config listed, use the compile-in default */

View File

@ -30,7 +30,7 @@
/* $Id$ */ /* $Id$ */
/* /*
* avrprog interface for Atmel STK500 programmer * avrdude interface for Atmel STK500 programmer
* *
* Note: most commands use the "universal command" feature of the * Note: most commands use the "universal command" feature of the
* programmer in a "pass through" mode, exceptions are "program * programmer in a "pass through" mode, exceptions are "program

2
term.c
View File

@ -642,7 +642,7 @@ int terminal_mode(PROGRAMMER * pgm, struct avrpart * p)
char ** argv; char ** argv;
rc = 0; rc = 0;
while ((cmdbuf = readline("avrprog> ")) != NULL) { while ((cmdbuf = readline("avrdude> ")) != NULL) {
len = strlen(cmdbuf); len = strlen(cmdbuf);
if (len >= 1) if (len >= 1)
add_history(cmdbuf); add_history(cmdbuf);