* avr910.c: As there is a lot of ambiguity about the AVR910

device codes, allow the user to override the device code
verification with the -F option.
* main.c: Make ovsigck a global variable.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@665 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2006-09-20 21:32:18 +00:00
parent de852979ad
commit 73cfe88386
3 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2006-09-20 Joerg Wunsch <j@uriah.heep.sax.de>
* avr910.c: As there is a lot of ambiguity about the AVR910
device codes, allow the user to override the device code
verification with the -F option.
* main.c: Make ovsigck a global variable.
2006-09-20 Joerg Wunsch <j@uriah.heep.sax.de>
Add the "stk500generic" programmer that auto-probes for STK500

View File

@ -40,6 +40,7 @@
extern char * progname;
extern int do_cycles;
extern int ovsigck;
static char has_auto_incr_addr;
@ -134,7 +135,7 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
char hw[2];
char buf[10];
char type;
char c;
char c, devtype_1st;
int dev_supported = 0;
AVRPART * part;
@ -173,8 +174,11 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
avr910_send(pgm, "t", 1);
fprintf(stderr, "\nProgrammer supports the following devices:\n");
devtype_1st = 0;
while (1) {
avr910_recv(pgm, &c, 1);
if (devtype_1st == 0)
devtype_1st = c;
if (c == 0)
break;
part = locate_part_by_avr910_devcode(part_list, c);
@ -190,15 +194,18 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
if (!dev_supported) {
fprintf(stderr,
"%s: error: selected device is not supported by programmer: %s\n",
progname, p->id);
exit(1);
"%s: %s: selected device is not supported by programmer: %s\n",
progname, ovsigck? "warning": "error", p->id);
if (!ovsigck)
exit(1);
}
/* Tell the programmer which part we selected. */
/* Tell the programmer which part we selected.
If the user forced the selection, use the first device
type that is supported by the programmer. */
buf[0] = 'T';
buf[1] = p->avr910_devcode;
buf[1] = ovsigck? devtype_1st: p->avr910_devcode;
avr910_send(pgm, buf, 2);
avr910_vfy_cmd_sent(pgm, "select device");

2
main.c
View File

@ -76,6 +76,7 @@ char * version = VERSION;
int verbose; /* verbose output */
int quell_progress; /* un-verebose output */
int ovsigck; /* 1=override sig check, 0=don't */
char * progname;
char progbuf[PATH_MAX]; /* temporary buffer of spaces the same
length as progname; used for lining up
@ -683,7 +684,6 @@ int main(int argc, char * argv [])
int erase; /* 1=erase chip, 0=don't */
int auto_erase; /* 0=never erase unless explicity told to do
so, 1=erase if we are going to program flash */
int ovsigck; /* 1=override sig check, 0=don't */
char * port; /* device port (/dev/xxx) */
int terminal; /* 1=enter terminal mode, 0=don't */
int nowrite; /* don't actually write anything to the chip */