Implement and document the "verbose" terminal mode command.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1211 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
ee861c4492
commit
44069c7b69
|
@ -1,3 +1,9 @@
|
||||||
|
2013-09-08 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* term.c: Implement the "verbose" terminal mode command.
|
||||||
|
* avrdude.1: Document this.
|
||||||
|
* doc/avrdude.texi: (Dito.)
|
||||||
|
|
||||||
2013-09-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2013-09-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
* jtag3.c (jtag3_write_byte): Do not attempt to start the paged
|
* jtag3.c (jtag3_write_byte): Do not attempt to start the paged
|
||||||
|
|
3
NEWS
3
NEWS
|
@ -163,6 +163,9 @@ Current:
|
||||||
* The USBasp programmer implementation now supports detailed traces
|
* The USBasp programmer implementation now supports detailed traces
|
||||||
with -vvv, and device communication traces with -vvvv.
|
with -vvv, and device communication traces with -vvvv.
|
||||||
|
|
||||||
|
* The "verbose" terminal mode command allows to query or modify the
|
||||||
|
verbosity level.
|
||||||
|
|
||||||
* Internals:
|
* Internals:
|
||||||
|
|
||||||
- Restructuring and compacting programmer definition part of
|
- Restructuring and compacting programmer definition part of
|
||||||
|
|
12
avrdude.1
12
avrdude.1
|
@ -18,7 +18,7 @@
|
||||||
.\"
|
.\"
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.Dd DATE September 3, 2013
|
.Dd DATE September 8, 2013
|
||||||
.Os
|
.Os
|
||||||
.Dt AVRDUDE 1
|
.Dt AVRDUDE 1
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -662,6 +662,9 @@ This will only work if
|
||||||
does not have a colon in it.
|
does not have a colon in it.
|
||||||
.It Fl v
|
.It Fl v
|
||||||
Enable verbose output.
|
Enable verbose output.
|
||||||
|
More
|
||||||
|
.Fl v
|
||||||
|
options increase verbosity level.
|
||||||
.It Fl V
|
.It Fl V
|
||||||
Disable automatic verify check when uploading data.
|
Disable automatic verify check when uploading data.
|
||||||
.It Fl x Ar extended_param
|
.It Fl x Ar extended_param
|
||||||
|
@ -777,6 +780,13 @@ Display the current voltage and master oscillator parameters.
|
||||||
.Pp
|
.Pp
|
||||||
.Em JTAG ICE only:
|
.Em JTAG ICE only:
|
||||||
Display the current target supply voltage and JTAG bit clock rate/period.
|
Display the current target supply voltage and JTAG bit clock rate/period.
|
||||||
|
.It Ar verbose Op Ar level
|
||||||
|
Change (when
|
||||||
|
.Ar level
|
||||||
|
is provided), or display the verbosity level.
|
||||||
|
The initial verbosity level is controlled by the number of
|
||||||
|
.Fl v
|
||||||
|
options given on the commandline.
|
||||||
.It Ar \&?
|
.It Ar \&?
|
||||||
.It Ar help
|
.It Ar help
|
||||||
Give a short on-line summary of the available commands.
|
Give a short on-line summary of the available commands.
|
||||||
|
|
|
@ -699,6 +699,7 @@ This will only work if @var{filename} does not have a colon in it.
|
||||||
|
|
||||||
@item -v
|
@item -v
|
||||||
Enable verbose output.
|
Enable verbose output.
|
||||||
|
More @code{-v} options increase verbosity level.
|
||||||
|
|
||||||
@item -V
|
@item -V
|
||||||
Disable automatic verify check when uploading data.
|
Disable automatic verify check when uploading data.
|
||||||
|
@ -1116,6 +1117,12 @@ device, read/write timing, etc.
|
||||||
@item pgm
|
@item pgm
|
||||||
Return to programming mode (from direct SPI mode).
|
Return to programming mode (from direct SPI mode).
|
||||||
|
|
||||||
|
@item verbose [@var{level}]
|
||||||
|
Change (when @var{level} is provided), or display the verbosity
|
||||||
|
level.
|
||||||
|
The initial verbosity level is controlled by the number of @code{-v} options
|
||||||
|
given on the commandline.
|
||||||
|
|
||||||
@item ?
|
@item ?
|
||||||
@itemx help
|
@itemx help
|
||||||
Give a short on-line summary of the available commands.
|
Give a short on-line summary of the available commands.
|
||||||
|
|
35
term.c
35
term.c
|
@ -93,6 +93,9 @@ static int cmd_spi (PROGRAMMER * pgm, struct avrpart * p,
|
||||||
static int cmd_pgm (PROGRAMMER * pgm, struct avrpart * p,
|
static int cmd_pgm (PROGRAMMER * pgm, struct avrpart * p,
|
||||||
int argc, char *argv[]);
|
int argc, char *argv[]);
|
||||||
|
|
||||||
|
static int cmd_verbose (PROGRAMMER * pgm, struct avrpart * p,
|
||||||
|
int argc, char *argv[]);
|
||||||
|
|
||||||
struct command cmd[] = {
|
struct command cmd[] = {
|
||||||
{ "dump", cmd_dump, "dump memory : %s <memtype> <addr> <N-Bytes>" },
|
{ "dump", cmd_dump, "dump memory : %s <memtype> <addr> <N-Bytes>" },
|
||||||
{ "read", cmd_dump, "alias for dump" },
|
{ "read", cmd_dump, "alias for dump" },
|
||||||
|
@ -108,6 +111,7 @@ struct command cmd[] = {
|
||||||
{ "sck", cmd_sck, "set <SCK period> (STK500 only)" },
|
{ "sck", cmd_sck, "set <SCK period> (STK500 only)" },
|
||||||
{ "spi", cmd_spi, "enter direct SPI mode" },
|
{ "spi", cmd_spi, "enter direct SPI mode" },
|
||||||
{ "pgm", cmd_pgm, "return to programming mode" },
|
{ "pgm", cmd_pgm, "return to programming mode" },
|
||||||
|
{ "verbose", cmd_verbose, "change verbosity" },
|
||||||
{ "help", cmd_help, "help" },
|
{ "help", cmd_help, "help" },
|
||||||
{ "?", cmd_help, "help" },
|
{ "?", cmd_help, "help" },
|
||||||
{ "quit", cmd_quit, "quit" }
|
{ "quit", cmd_quit, "quit" }
|
||||||
|
@ -759,6 +763,37 @@ static int cmd_pgm(PROGRAMMER * pgm, struct avrpart * p,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int cmd_verbose(PROGRAMMER * pgm, struct avrpart * p,
|
||||||
|
int argc, char * argv[])
|
||||||
|
{
|
||||||
|
int nverb;
|
||||||
|
char *endp;
|
||||||
|
|
||||||
|
if (argc != 1 && argc != 2) {
|
||||||
|
fprintf(stderr, "Usage: verbose [<value>]\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (argc == 1) {
|
||||||
|
fprintf(stderr, "Verbosity level: %d\n", verbose);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
nverb = strtol(argv[1], &endp, 0);
|
||||||
|
if (endp == argv[2]) {
|
||||||
|
fprintf(stderr, "%s: can't parse verbosity level \"%s\"\n",
|
||||||
|
progname, argv[2]);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (nverb < 0) {
|
||||||
|
fprintf(stderr, "%s: verbosity level must be positive: %d\n",
|
||||||
|
progname, nverb);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
verbose = nverb;
|
||||||
|
fprintf(stderr, "New verbosity level: %d\n", verbose);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int tokenize(char * s, char *** argv)
|
static int tokenize(char * s, char *** argv)
|
||||||
{
|
{
|
||||||
int i, n, l, nargs, offset;
|
int i, n, l, nargs, offset;
|
||||||
|
|
Loading…
Reference in New Issue