* main.c: Remember whether the device initialization worked, and
allow to continue with -F if it failed yet do not attempt to perform anything on the device itself. That way, -tF could be specified for programmers like the STK500/STK600 even without a device connected, just in order to allow changing parameters on the programmer itself. * avrdude.1: Document that possible use of the -F option. * doc/avrdude.texi: (Ditto.) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@779 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
e7808ca80f
commit
a37bbfab57
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-07-29 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* main.c: Remember whether the device initialization worked, and
|
||||
allow to continue with -F if it failed yet do not attempt to
|
||||
perform anything on the device itself. That way, -tF could be
|
||||
specified for programmers like the STK500/STK600 even without a
|
||||
device connected, just in order to allow changing parameters on
|
||||
the programmer itself.
|
||||
* avrdude.1: Document that possible use of the -F option.
|
||||
* doc/avrdude.texi: (Ditto.)
|
||||
|
||||
2008-07-29 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* stk500v2.c (stk600_xprog_paged_write): Fix a fatal miscalculation
|
||||
|
|
4
NEWS
4
NEWS
|
@ -28,6 +28,10 @@ Current:
|
|||
* Add support for ATxmega128A1 (including the revision D engineering
|
||||
samples) for STK600 tools using PDI
|
||||
|
||||
* The option combination -tF now enters terminal mode even if the
|
||||
device initialization failed, so the user can modify programmer
|
||||
parameters (like Vtarget).
|
||||
|
||||
Version 5.5:
|
||||
|
||||
* Add support for the USBtinyISP programmer (patch #6233)
|
||||
|
|
|
@ -367,6 +367,12 @@ reasonable before continuing. Since it can happen from time to time
|
|||
that a device has a broken (erased or overwritten) device signature
|
||||
but is otherwise operating normally, this options is provided to
|
||||
override the check.
|
||||
Also, for programmers like the Atmel STK500 and STK600 which can
|
||||
adjust parameters local to the programming tool (independent of an
|
||||
actual connection to a target controller), this option can be used
|
||||
together with
|
||||
.Fl t
|
||||
to continue in terminal mode.
|
||||
.It Fl i Ar delay
|
||||
For bitbang-type programmers, delay for approximately
|
||||
.Ar delay
|
||||
|
|
|
@ -563,6 +563,10 @@ the part is reasonable before continuing. Since it can happen from time
|
|||
to time that a device has a broken (erased or overwritten) device
|
||||
signature but is otherwise operating normally, this options is provided
|
||||
to override the check.
|
||||
Also, for programmers like the Atmel STK500 and STK600 which can
|
||||
adjust parameters local to the programming tool (independent of an
|
||||
actual connection to a target controller), this option can be used
|
||||
together with @option{-t} to continue in terminal mode.
|
||||
|
||||
@item -i @var{delay}
|
||||
For bitbang-type programmers, delay for approximately
|
||||
|
|
24
main.c
24
main.c
|
@ -279,6 +279,7 @@ int main(int argc, char * argv [])
|
|||
int ispdelay; /* Specify the delay for ISP clock */
|
||||
int safemode; /* Enable safemode, 1=safemode on, 0=normal */
|
||||
int silentsafe; /* Don't ask about fuses, 1=silent, 0=normal */
|
||||
int init_ok; /* Device initialization worked well */
|
||||
unsigned char safemode_lfuse = 0xff;
|
||||
unsigned char safemode_hfuse = 0xff;
|
||||
unsigned char safemode_efuse = 0xff;
|
||||
|
@ -823,8 +824,8 @@ int main(int argc, char * argv [])
|
|||
/*
|
||||
* initialize the chip in preperation for accepting commands
|
||||
*/
|
||||
rc = pgm->initialize(pgm, p);
|
||||
if (rc < 0) {
|
||||
init_ok = (rc = pgm->initialize(pgm, p)) >= 0;
|
||||
if (!init_ok) {
|
||||
fprintf(stderr, "%s: initialization failed, rc=%d\n", progname, rc);
|
||||
if (!ovsigck) {
|
||||
fprintf(stderr, "%sDouble check connections and try again, "
|
||||
|
@ -851,6 +852,7 @@ int main(int argc, char * argv [])
|
|||
* against 0xffffff / 0x000000 should ensure that the signature bytes
|
||||
* are valid.
|
||||
*/
|
||||
if (init_ok) {
|
||||
rc = avr_signature(pgm, p);
|
||||
if (rc != 0) {
|
||||
fprintf(stderr, "%s: error reading signature data, rc=%d\n",
|
||||
|
@ -858,6 +860,7 @@ int main(int argc, char * argv [])
|
|||
exitrc = 1;
|
||||
goto main_exit;
|
||||
}
|
||||
}
|
||||
|
||||
sig = avr_locate_mem(p, "signature");
|
||||
if (sig == NULL) {
|
||||
|
@ -917,7 +920,7 @@ int main(int argc, char * argv [])
|
|||
}
|
||||
}
|
||||
|
||||
if (safemode == 1) {
|
||||
if (init_ok && safemode == 1) {
|
||||
/* If safemode is enabled, go ahead and read the current low, high,
|
||||
and extended fuse bytes as needed */
|
||||
|
||||
|
@ -989,7 +992,8 @@ int main(int argc, char * argv [])
|
|||
*
|
||||
* The cycle count will be displayed anytime it will be changed later.
|
||||
*/
|
||||
if ((set_cycles == -1) && ((erase == 0) || (do_cycles == 0))) {
|
||||
if (init_ok &&
|
||||
(set_cycles == -1) && ((erase == 0) || (do_cycles == 0))) {
|
||||
/*
|
||||
* see if the cycle count in the last four bytes of eeprom seems
|
||||
* reasonable
|
||||
|
@ -1005,7 +1009,7 @@ int main(int argc, char * argv [])
|
|||
}
|
||||
}
|
||||
|
||||
if (set_cycles != -1) {
|
||||
if (init_ok && set_cycles != -1) {
|
||||
rc = avr_get_cycle_count(pgm, p, &cycles);
|
||||
if (rc == 0) {
|
||||
/*
|
||||
|
@ -1028,7 +1032,7 @@ int main(int argc, char * argv [])
|
|||
}
|
||||
|
||||
|
||||
if (erase) {
|
||||
if (init_ok && erase) {
|
||||
/*
|
||||
* erase the chip's flash and eeprom memories, this is required
|
||||
* before the chip can accept new programming
|
||||
|
@ -1047,6 +1051,14 @@ int main(int argc, char * argv [])
|
|||
exitrc = terminal_mode(pgm, p);
|
||||
}
|
||||
|
||||
if (!init_ok) {
|
||||
/*
|
||||
* If we came here by the -tF options, bail out now.
|
||||
*/
|
||||
exitrc = 1;
|
||||
goto main_exit;
|
||||
}
|
||||
|
||||
|
||||
for (ln=lfirst(updates); ln; ln=lnext(ln)) {
|
||||
upd = ldata(ln);
|
||||
|
|
Loading…
Reference in New Issue