Submitted by Juergen Weigert:

bug #22720: avrdude-5.5 ignores buff settings in avrdude.conf
(Note that the actual bug the subject is about has been fixed
long ago.)
* update.c (do_op): fix a diagnostic message
* pgm.h: add exit_datahigh field
* par.c: set and act upon the exit_datahigh field
* avrdude.1: document the new -E options
* doc/avrdude.texi: (Ditto.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@985 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2011-08-26 12:35:08 +00:00
parent fef650b787
commit 6b09628d0a
7 changed files with 58 additions and 2 deletions

View File

@ -1,3 +1,15 @@
2011-08-26 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Juergen Weigert:
bug #22720: avrdude-5.5 ignores buff settings in avrdude.conf
(Note that the actual bug the subject is about has been fixed
long ago.)
* update.c (do_op): fix a diagnostic message
* pgm.h: add exit_datahigh field
* par.c: set and act upon the exit_datahigh field
* avrdude.1: document the new -E options
* doc/avrdude.texi: (Ditto.)
2011-08-26 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2011-08-26 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #33811: Parallel make fails bug #33811: Parallel make fails

View File

@ -423,6 +423,12 @@ power to the MCU.
This option will pull the This option will pull the
.Ql Vcc .Ql Vcc
pins of the parallel port down at program exit. pins of the parallel port down at program exit.
.It Ar d_high
This option will leave the 8 data pins on the parallel port active.
.Pq \&i. \&e. Em high
.It Ar d_low
This option will leave the 8 data pins on the parallel port inactive.
.Pq \&i. \&e. Em low
.El .El
.Pp .Pp
Multiple Multiple

View File

@ -790,7 +790,8 @@ programmer
# From the contributor of the "xil" jtag cable: # From the contributor of the "xil" jtag cable:
# The "vcc" definition isn't really vcc (the cable gets its power from # The "vcc" definition isn't really vcc (the cable gets its power from
# the programming circuit) but is necessary to switch one of the # the programming circuit) but is necessary to switch one of the
# buffer lines (trying to add it to the "buff" lines doesn't work). # buffer lines (trying to add it to the "buff" lines doesn't work in
# avrdude versions before 5.5j).
# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK # With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
# to SCK (plus vcc/gnd of course) # to SCK (plus vcc/gnd of course)
programmer programmer

View File

@ -638,6 +638,14 @@ can be used to supply `Vcc' power to the MCU.
This option will pull the `Vcc' pins of the parallel port down at This option will pull the `Vcc' pins of the parallel port down at
program exit. program exit.
@itemx d_high
This option will leave the 8 data pins on the parallel port active
(i. e. high).
@itemx d_low
This option will leave the 8 data pins on the parallel port inactive
(i. e. low).
@end table @end table
Multiple @var{exitspec} arguments can be separated with commas. Multiple @var{exitspec} arguments can be separated with commas.

22
par.c
View File

@ -303,6 +303,21 @@ static void par_close(PROGRAMMER * pgm)
/* Leave it alone. */ /* Leave it alone. */
break; break;
} }
switch (pgm->exit_datahigh) {
case EXIT_DATAHIGH_ENABLED:
ppi_setall(&pgm->fd, PPIDATA, 0xff);
break;
case EXIT_DATAHIGH_DISABLED:
ppi_setall(&pgm->fd, PPIDATA, 0x00);
break;
case EXIT_DATAHIGH_UNSPEC:
/* Leave it alone. */
break;
}
switch (pgm->exit_vcc) { switch (pgm->exit_vcc) {
case EXIT_VCC_ENABLED: case EXIT_VCC_ENABLED:
par_setmany(pgm, pgm->pinno[PPI_AVR_VCC], 1); par_setmany(pgm, pgm->pinno[PPI_AVR_VCC], 1);
@ -387,6 +402,12 @@ static int par_parseexitspecs(PROGRAMMER * pgm, char *s)
else if (strcmp(cp, "novcc") == 0) { else if (strcmp(cp, "novcc") == 0) {
pgm->exit_vcc = EXIT_VCC_DISABLED; pgm->exit_vcc = EXIT_VCC_DISABLED;
} }
else if (strcmp(cp, "d_high") == 0) {
pgm->exit_datahigh = EXIT_DATAHIGH_ENABLED;
}
else if (strcmp(cp, "d_low") == 0) {
pgm->exit_datahigh = EXIT_DATAHIGH_DISABLED;
}
else { else {
return -1; return -1;
} }
@ -402,6 +423,7 @@ void par_initpgm(PROGRAMMER * pgm)
pgm->exit_vcc = EXIT_VCC_UNSPEC; pgm->exit_vcc = EXIT_VCC_UNSPEC;
pgm->exit_reset = EXIT_RESET_UNSPEC; pgm->exit_reset = EXIT_RESET_UNSPEC;
pgm->exit_datahigh = EXIT_DATAHIGH_UNSPEC;
pgm->rdy_led = bitbang_rdy_led; pgm->rdy_led = bitbang_rdy_led;
pgm->err_led = bitbang_err_led; pgm->err_led = bitbang_err_led;

7
pgm.h
View File

@ -50,6 +50,12 @@ typedef enum {
EXIT_RESET_DISABLED EXIT_RESET_DISABLED
} exit_reset_t; } exit_reset_t;
typedef enum {
EXIT_DATAHIGH_UNSPEC,
EXIT_DATAHIGH_ENABLED,
EXIT_DATAHIGH_DISABLED
} exit_datahigh_t;
typedef struct programmer_t { typedef struct programmer_t {
LISTID id; LISTID id;
char desc[PGM_DESCLEN]; char desc[PGM_DESCLEN];
@ -58,6 +64,7 @@ typedef struct programmer_t {
unsigned int pinno[N_PINS]; unsigned int pinno[N_PINS];
exit_vcc_t exit_vcc; exit_vcc_t exit_vcc;
exit_reset_t exit_reset; exit_reset_t exit_reset;
exit_datahigh_t exit_datahigh;
int ppidata; int ppidata;
int ppictrl; int ppictrl;
int baudrate; int baudrate;

View File

@ -259,7 +259,7 @@ int do_op(PROGRAMMER * pgm, struct avrpart * p, UPDATE * upd, int nowrite,
} }
rc = fileio(FIO_READ, upd->filename, upd->format, p, upd->memtype, -1); rc = fileio(FIO_READ, upd->filename, upd->format, p, upd->memtype, -1);
if (rc < 0) { if (rc < 0) {
fprintf(stderr, "%s: write to file '%s' failed\n", fprintf(stderr, "%s: read from file '%s' failed\n",
progname, upd->filename); progname, upd->filename);
return -1; return -1;
} }