* butterfly.c: Remove the device support decision based on
the old AVR910 device codes; we've got signature verification now so better rely on that. * avr910.c: Revert the signature bytes returned, as it already happened in butterfly.c. This closes bug #14998: Signature Bytes read in wrong order (avr910 mode) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@638 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
ccc928603f
commit
4a55a6583a
|
@ -1,3 +1,12 @@
|
||||||
|
2006-09-01 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* butterfly.c: Remove the device support decision based on
|
||||||
|
the old AVR910 device codes; we've got signature verification
|
||||||
|
now so better rely on that.
|
||||||
|
* avr910.c: Revert the signature bytes returned, as it already
|
||||||
|
happened in butterfly.c. This closes bug #14998: Signature Bytes
|
||||||
|
read in wrong order (avr910 mode)
|
||||||
|
|
||||||
2006-09-01 Joerg Wunsch <j@uriah.heep.sax.de>
|
2006-09-01 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
Submitted by Wim Lewis.
|
Submitted by Wim Lewis.
|
||||||
|
|
6
avr910.c
6
avr910.c
|
@ -557,6 +557,8 @@ static int avr910_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||||
|
|
||||||
static int avr910_read_sig_bytes(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m)
|
static int avr910_read_sig_bytes(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m)
|
||||||
{
|
{
|
||||||
|
unsigned char tmp;
|
||||||
|
|
||||||
if (m->size < 3) {
|
if (m->size < 3) {
|
||||||
fprintf(stderr, "%s: memsize too small for sig byte read", progname);
|
fprintf(stderr, "%s: memsize too small for sig byte read", progname);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -564,6 +566,10 @@ static int avr910_read_sig_bytes(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m)
|
||||||
|
|
||||||
avr910_send(pgm, "s", 1);
|
avr910_send(pgm, "s", 1);
|
||||||
avr910_recv(pgm, (char *)m->buf, 3);
|
avr910_recv(pgm, (char *)m->buf, 3);
|
||||||
|
/* Returned signature has wrong order. */
|
||||||
|
tmp = m->buf[2];
|
||||||
|
m->buf[2] = m->buf[0];
|
||||||
|
m->buf[0] = tmp;
|
||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
19
butterfly.c
19
butterfly.c
|
@ -227,7 +227,6 @@ static int butterfly_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
char buf[10];
|
char buf[10];
|
||||||
char type;
|
char type;
|
||||||
char c;
|
char c;
|
||||||
int dev_supported = 0;
|
|
||||||
|
|
||||||
no_show_func_info();
|
no_show_func_info();
|
||||||
|
|
||||||
|
@ -313,22 +312,9 @@ static int butterfly_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
break;
|
break;
|
||||||
fprintf(stderr, " Device code: 0x%02x\n", (unsigned int)(unsigned char)c);
|
fprintf(stderr, " Device code: 0x%02x\n", (unsigned int)(unsigned char)c);
|
||||||
|
|
||||||
/* FIXME: Need to lookup devcode and report the device. */
|
|
||||||
|
|
||||||
if (p->avr910_devcode == (int)(unsigned char)c)
|
|
||||||
dev_supported = 1;
|
|
||||||
};
|
};
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
|
|
||||||
if (!dev_supported) {
|
|
||||||
/* FIXME: if nothing matched, we should rather compare the device
|
|
||||||
signatures. */
|
|
||||||
fprintf(stderr,
|
|
||||||
"%s: error: selected device is not supported by programmer: %s\n",
|
|
||||||
progname, p->id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tell the programmer which part we selected. */
|
/* Tell the programmer which part we selected. */
|
||||||
|
|
||||||
buf[0] = 'T';
|
buf[0] = 'T';
|
||||||
|
@ -337,10 +323,9 @@ static int butterfly_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
butterfly_send(pgm, buf, 2);
|
butterfly_send(pgm, buf, 2);
|
||||||
butterfly_vfy_cmd_sent(pgm, "select device");
|
butterfly_vfy_cmd_sent(pgm, "select device");
|
||||||
|
|
||||||
if (dev_supported)
|
butterfly_enter_prog_mode(pgm);
|
||||||
butterfly_enter_prog_mode(pgm);
|
|
||||||
|
|
||||||
return dev_supported? 0: -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue