Update the man page.

Miscellaneous minor cleanups.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@80 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
bsd 2001-10-15 00:00:09 +00:00
parent f8677f8d4c
commit c9709a1f35
4 changed files with 42 additions and 38 deletions

View File

@ -17,7 +17,7 @@ DIRS = ${BINDIR} ${MANDIR} ${DOCDIR} ${CONFIGDIR}
INSTALL = /usr/bin/install -c -o root -g wheel INSTALL = /usr/bin/install -c -o root -g wheel
CFLAGS = -g -Wall --pedantic -DCONFIG_DIR=\"${CONFIGDIR}\" ${YYDEF} CFLAGS += -g -Wall --pedantic -DCONFIG_DIR=\"${CONFIGDIR}\" ${YYDEF}
LDFLAGS = LDFLAGS =
YFLAGS = -t -d -v YFLAGS = -t -d -v

2
avr.c
View File

@ -699,7 +699,7 @@ void avr_mem_display(char * prefix, FILE * f, AVRMEM * m, int type)
{ {
if (m == NULL) { if (m == NULL) {
fprintf(f, fprintf(f,
"%sMem Bank\n" "%sMem Bank Polled\n"
"%sType Banked Size Size #Banks MinW MaxW ReadBack\n" "%sType Banked Size Size #Banks MinW MaxW ReadBack\n"
"%s------ ------ ------ ---- ------ ----- ----- ---------\n", "%s------ ------ ------ ---- ------ ----- ----- ---------\n",
prefix, prefix, prefix); prefix, prefix, prefix);

View File

@ -33,6 +33,8 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Fl p Ar partno .Fl p Ar partno
.Op Fl c Ar programmer-id
.Op Fl C Ar config-file
.Op Fl e .Op Fl e
.Oo Fl E Ar exitspec Ns .Oo Fl E Ar exitspec Ns
.Op \&, Ns Ar exitspec .Op \&, Ns Ar exitspec
@ -42,13 +44,15 @@
.Op Fl i Ar filename .Op Fl i Ar filename
.Op Fl m Ar memtype .Op Fl m Ar memtype
.Op Fl o Ar filename .Op Fl o Ar filename
.Op Fl n
.Op Fl P Ar parallel .Op Fl P Ar parallel
.Op Fl t .Op Fl t
.Op Fl v
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm Avrprog .Nm Avrprog
is a driver program for a simple programming hardware that allows to is a driver program for a simple programming hardware that allows one
program Atmel AVR microcontrollers, where the programmer is connected to program Atmel AVR microcontrollers, where the programmer is
directly to a connected directly to a
.Xr ppi 4 .Xr ppi 4
parallel port. In the simplest case, the hardware consists just of a parallel port. In the simplest case, the hardware consists just of a
cable, connecting the respective AVR signal lines to the parallel port. cable, connecting the respective AVR signal lines to the parallel port.
@ -72,7 +76,7 @@ decouple the parallel port from the MCU when in-system programming is
used. used.
.Pp .Pp
See the file See the file
.Pa ${PREFIX}/share/doc/avrprog/AVRprog.pdf .Pa ${PREFIX}/share/doc/avrprog/avrprog.pdf
for a schematic of the programming hardware. for a schematic of the programming hardware.
.Pp .Pp
Input files can be provided, and output files can be written in Input files can be provided, and output files can be written in
@ -88,9 +92,9 @@ for the final stage of the GNU toolchain for the AVR microcontroller.
Both, EEPROM cells and the flash ROM can be programmed (separately). Both, EEPROM cells and the flash ROM can be programmed (separately).
It is also possible to read the chip (provided it has not been It is also possible to read the chip (provided it has not been
code-protected previously, of course) and store the data in a file. code-protected previously, of course) and store the data in a file.
Finally, a ``terminal'' mode is available that allows to interactively Finally, a ``terminal'' mode is available that allows one to
communicate with the MCU, and to display or program individual various interactively communicate with the MCU, and to display or program
memory cells even one at a time if desired. 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
@ -99,8 +103,12 @@ need to be specified to
.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 avrprog .
It specifies the type of the MCU connected to the programmer. Currently, It specifies the type of the MCU connected to the programmer. These are read from the config file. If
the following MCU types are understood: .Nm avrprog
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:
.Pp .Pp
.TS .TS
ll. ll.
@ -112,8 +120,9 @@ ll.
4434 AT90S4434 4434 AT90S4434
8515 AT90S8515 8515 AT90S8515
8535 AT90S8535 8535 AT90S8535
103 ATMEGA103
.TE .TE
.It Fl c Ar Pin-Configuration .It Fl c Ar programmer-id
Use the pin configuration specified by the argument. Pin Use the pin configuration specified by the argument. Pin
configurations are read from the config file (see the configurations are read from the config file (see the
.Fl C .Fl C
@ -122,28 +131,17 @@ through the use of a config file to make
.Nm avrprog .Nm avrprog
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. Atmel AVR serial program method.
.It Fl C Ar Config-File .It Fl C Ar config-file
Use the specified config file to locate the desired pin configuration. Use the specified config file to load configuration data. This file
Pin configurations are specified in the config file using a colon contains all programmer and part definitions that
seperated field format. The configuration entry type is the first .Nm avrprog
field and currently must be knows about. If you have a programmer or part that
.Ar c: .Nm avrprog
The configuration name is the second field, and the remaining fields does not know about, you can add it to the config file (be sure and
are of the form: submit a patch back to the author so that it can be incorporated for
.Ar PIN=VALUE , the next version). See the sample config file, located at
where .Pa ${PREFIX}/etc/avrprog.conf.sample ,
.Ar PIN which contains a description of the format.
can be
.Ar VCC , RESET , SCK , MOSI , MISO , BUFF , PGMLED , RDYLED , VFYLED , ERRLED .
The value is the pin number of the PC parallel port assigned to that
function. The
.Ar VCC
pin can take on multiple values seperated by a comma (which are or'd
together to create a bit mask).
.Ar VCC
pin numbers must come from pins 2 through 9. The default
configuration file is
.Pa /usr/local/etc/avrprog.conf .
.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
flash ROM and EEPROM to the value flash ROM and EEPROM to the value
@ -249,6 +247,10 @@ values are
for the EEPROM, or for the EEPROM, or
.Em flash .Em flash
for the flash ROM, which is also the default. for the flash ROM, which is also the default.
.It Fl n
No-write - disables actually writing data to the MCU (useful for debugging
.Nm avrprog
).
.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
memory area to be read from the MCU. Can be specified as memory area to be read from the MCU. Can be specified as
@ -297,6 +299,8 @@ using the values
.Ar byte1 .Ar byte1
through through
.Ar byteN . .Ar byteN .
This feature is not implemented for bank-addressed memories such as
flash memory of ATMega devices.
.It Ar erase .It Ar erase
Perform a chip erase. Perform a chip erase.
.It Ar sig .It Ar sig
@ -329,15 +333,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 /usr/local/etc/avrprog.conf.sample .It Pa ${PREFIX}/etc/avrprog.conf.sample
sample pin configuration file sample pin configuration file
.It Pa /usr/local/etc/avrprog.conf .It Pa ${PREFIX}/etc/avrprog.conf
default pin configuration file default pin 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/avrprog/avrprog.pdf
Schematic of programming hardware Schematic of programming hardware
.El .El
.\" .Sh EXAMPLES .\" .Sh EXAMPLES

View File

@ -15,7 +15,7 @@
# programmer # programmer
# id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings # id = <id1> [, <id2> [, <id3>] ...] ; # <idN> are quoted strings
# desc = <description> ; # quoted string # desc = <description> ; # quoted string
# vcc = <num1> [, <num2> ... ] ; # pin number # vcc = <num1> [, <num2> ... ] ; # pin number(s)
# reset = <num> ; # pin number # reset = <num> ; # pin number
# sck = <num> ; # pin number # sck = <num> ; # pin number
# mosi = <num> ; # pin number # mosi = <num> ; # pin number