diff --git a/avrdude/main.c b/avrdude/main.c index e2c1e27b..9dba4706 100644 --- a/avrdude/main.c +++ b/avrdude/main.c @@ -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 */ diff --git a/avrdude/stk500.c b/avrdude/stk500.c index f18a8895..03779f11 100644 --- a/avrdude/stk500.c +++ b/avrdude/stk500.c @@ -540,19 +540,7 @@ static int stk500_initialize(PROGRAMMER * pgm, AVRPART * p) } } - pgm->program_enable(pgm, p); - - /* - * Return success even if program_enable() failed. Otherwise, if - * someone has turned off the STK500 oscillator (or set it to an - * unreasonably slow master clock), they were hosed at this point, - * since to reset fosc to a reasonable value, they at least need to - * get avrdude to start up in terminal mode. The luser has already - * seen a "failed to enter programming mode" message in that case, - * and he also needs to specify -F at program startup since the - * device ID bytes cannot be read in this situation. - */ - return 0; + return pgm->program_enable(pgm, p); }