mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-10-09 04:01:01 +00:00
Submitted by Janos Sallai:
patch #6542: paged_load fails on the MIB510 programming board * stk500.c: Add a workaround for the different signon sequence on MIB510 programmers. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@791 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
14
stk500.c
14
stk500.c
@@ -971,7 +971,9 @@ static int stk500_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||
|
||||
if (stk500_recv(pgm, buf, 1) < 0)
|
||||
exit(1);
|
||||
if (buf[0] != Resp_STK_OK) {
|
||||
|
||||
if(strcmp(ldata(lfirst(pgm->id)), "mib510") == 0) {
|
||||
if (buf[0] != Resp_STK_INSYNC) {
|
||||
fprintf(stderr,
|
||||
"\n%s: stk500_paged_load(): (a) protocol error, "
|
||||
"expect=0x%02x, resp=0x%02x\n",
|
||||
@@ -979,6 +981,16 @@ static int stk500_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (buf[0] != Resp_STK_OK) {
|
||||
fprintf(stderr,
|
||||
"\n%s: stk500_paged_load(): (a) protocol error, "
|
||||
"expect=0x%02x, resp=0x%02x\n",
|
||||
progname, Resp_STK_OK, buf[0]);
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return n_bytes;
|
||||
}
|
||||
|
Reference in New Issue
Block a user