Revert to honoring the return code from pgm->pgm_enable() within the

stk500 initialization routine.  However, allow one to use the -F
option to ignore a bad return code from that function.  I think this
still allows what Joerg intended, i.e., providing a way to still get
into terminal mode so that one can recover from setting bad STK500
values which may keep the chip from entering programming mode.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@359 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean
2003-08-31 15:40:59 +00:00
parent 6acb859507
commit ede8a48d52
2 changed files with 9 additions and 15 deletions

View File

@@ -1258,8 +1258,14 @@ int main(int argc, char * argv [])
rc = pgm->initialize(pgm, p);
if (rc < 0) {
fprintf(stderr, "%s: initialization failed, rc=%d\n", progname, rc);
exitrc = 1;
goto main_exit;
if (!ovsigck) {
fprintf(stderr, "%sDouble check connections and try again, "
"or use -F to override\n"
"%sthis check.\n\n",
progbuf, progbuf);
exitrc = 1;
goto main_exit;
}
}
/* indicate ready */