bug #29019: pagel/bs2 warning when uploading using stk500 to xmega

* stk500.c (stk500_initialize): Insert dummy values for PAGEL and
BS2 if they are not present in the config file, in order to be able
to proceed with the stk500_set_extended_parms() anyway.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1082 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2012-04-19 13:59:09 +00:00
parent 67060801c2
commit f5318109f0
3 changed files with 38 additions and 27 deletions

View File

@ -1,3 +1,10 @@
2012-04-19 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #29019: pagel/bs2 warning when uploading using stk500 to xmega
* stk500.c (stk500_initialize): Insert dummy values for PAGEL and
BS2 if they are not present in the config file, in order to be able
to proceed with the stk500_set_extended_parms() anyway.
2012-04-19 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2012-04-19 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* stk500v2_private.h (struct pdata): add boot_start * stk500v2_private.h (struct pdata): add boot_start

1
NEWS
View File

@ -58,6 +58,7 @@ Current:
- bug #30451: Accessing some Xmega memory sections gives not - bug #30451: Accessing some Xmega memory sections gives not
supported error supported error
- bug #28744: Can't load bootloader to xmega128a1 - bug #28744: Can't load bootloader to xmega128a1
- bug #29019: pagel/bs2 warning when uploading using stk500 to xmega
* Keep track of input file contents * Keep track of input file contents

View File

@ -559,12 +559,18 @@ static int stk500_initialize(PROGRAMMER * pgm, AVRPART * p)
if (n_extparms) { if (n_extparms) {
if ((p->pagel == 0) || (p->bs2 == 0)) { if ((p->pagel == 0) || (p->bs2 == 0)) {
if (verbose > 1)
fprintf(stderr, fprintf(stderr,
"%s: please define PAGEL and BS2 signals in the configuration " "%s: PAGEL and BS2 signals not defined in the configuration "
"file for part %s\n", "file for part %s, using dummy values\n",
progname, p->desc); progname, p->desc);
buf[2] = 0xD7; /* they look somehow possible, */
buf[3] = 0xA0; /* don't they? ;) */
} }
else { else {
buf[2] = p->pagel;
buf[3] = p->bs2;
}
buf[0] = n_extparms+1; buf[0] = n_extparms+1;
/* /*
@ -575,8 +581,6 @@ static int stk500_initialize(PROGRAMMER * pgm, AVRPART * p)
else else
buf[1] = 0; buf[1] = 0;
buf[2] = p->pagel;
buf[3] = p->bs2;
if (n_extparms == 4) { if (n_extparms == 4) {
if (p->reset_disposition == RESET_DEDICATED) if (p->reset_disposition == RESET_DEDICATED)
@ -591,7 +595,6 @@ static int stk500_initialize(PROGRAMMER * pgm, AVRPART * p)
exit(1); exit(1);
} }
} }
}
return pgm->program_enable(pgm, p); return pgm->program_enable(pgm, p);
} }