mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-10-09 04:01:01 +00:00
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/avrdude@359 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
14
stk500.c
14
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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user