* 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:
parent
de852979ad
commit
73cfe88386
|
@ -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>
|
2006-09-20 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
Add the "stk500generic" programmer that auto-probes for STK500
|
Add the "stk500generic" programmer that auto-probes for STK500
|
||||||
|
|
19
avr910.c
19
avr910.c
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
extern char * progname;
|
extern char * progname;
|
||||||
extern int do_cycles;
|
extern int do_cycles;
|
||||||
|
extern int ovsigck;
|
||||||
|
|
||||||
static char has_auto_incr_addr;
|
static char has_auto_incr_addr;
|
||||||
|
|
||||||
|
@ -134,7 +135,7 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
char hw[2];
|
char hw[2];
|
||||||
char buf[10];
|
char buf[10];
|
||||||
char type;
|
char type;
|
||||||
char c;
|
char c, devtype_1st;
|
||||||
int dev_supported = 0;
|
int dev_supported = 0;
|
||||||
AVRPART * part;
|
AVRPART * part;
|
||||||
|
|
||||||
|
@ -173,8 +174,11 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
|
|
||||||
avr910_send(pgm, "t", 1);
|
avr910_send(pgm, "t", 1);
|
||||||
fprintf(stderr, "\nProgrammer supports the following devices:\n");
|
fprintf(stderr, "\nProgrammer supports the following devices:\n");
|
||||||
|
devtype_1st = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
avr910_recv(pgm, &c, 1);
|
avr910_recv(pgm, &c, 1);
|
||||||
|
if (devtype_1st == 0)
|
||||||
|
devtype_1st = c;
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
break;
|
break;
|
||||||
part = locate_part_by_avr910_devcode(part_list, c);
|
part = locate_part_by_avr910_devcode(part_list, c);
|
||||||
|
@ -190,15 +194,18 @@ static int avr910_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
|
|
||||||
if (!dev_supported) {
|
if (!dev_supported) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: error: selected device is not supported by programmer: %s\n",
|
"%s: %s: selected device is not supported by programmer: %s\n",
|
||||||
progname, p->id);
|
progname, ovsigck? "warning": "error", p->id);
|
||||||
exit(1);
|
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[0] = 'T';
|
||||||
buf[1] = p->avr910_devcode;
|
buf[1] = ovsigck? devtype_1st: p->avr910_devcode;
|
||||||
|
|
||||||
avr910_send(pgm, buf, 2);
|
avr910_send(pgm, buf, 2);
|
||||||
avr910_vfy_cmd_sent(pgm, "select device");
|
avr910_vfy_cmd_sent(pgm, "select device");
|
||||||
|
|
2
main.c
2
main.c
|
@ -76,6 +76,7 @@ char * version = VERSION;
|
||||||
|
|
||||||
int verbose; /* verbose output */
|
int verbose; /* verbose output */
|
||||||
int quell_progress; /* un-verebose output */
|
int quell_progress; /* un-verebose output */
|
||||||
|
int ovsigck; /* 1=override sig check, 0=don't */
|
||||||
char * progname;
|
char * progname;
|
||||||
char progbuf[PATH_MAX]; /* temporary buffer of spaces the same
|
char progbuf[PATH_MAX]; /* temporary buffer of spaces the same
|
||||||
length as progname; used for lining up
|
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 erase; /* 1=erase chip, 0=don't */
|
||||||
int auto_erase; /* 0=never erase unless explicity told to do
|
int auto_erase; /* 0=never erase unless explicity told to do
|
||||||
so, 1=erase if we are going to program flash */
|
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) */
|
char * port; /* device port (/dev/xxx) */
|
||||||
int terminal; /* 1=enter terminal mode, 0=don't */
|
int terminal; /* 1=enter terminal mode, 0=don't */
|
||||||
int nowrite; /* don't actually write anything to the chip */
|
int nowrite; /* don't actually write anything to the chip */
|
||||||
|
|
Loading…
Reference in New Issue