Ignore target memories not present in part

$ avrdude -qp m8 -c ... -U efuse:w:0xff:m && echo OK

avrdude: AVR device initialized and ready to accept instructions
avrdude: skipping -U efuse:... as memory not defined for part ATmega8

avrdude done.  Thank you.

OK
This commit is contained in:
Stefan Rueger 2022-08-03 00:23:15 +01:00
parent 9604a3ef36
commit 648f3319a9
2 changed files with 4 additions and 4 deletions

View File

@ -1243,7 +1243,7 @@ int main(int argc, char * argv [])
for (ln=lfirst(updates); ln; ln=lnext(ln)) { for (ln=lfirst(updates); ln; ln=lnext(ln)) {
upd = ldata(ln); upd = ldata(ln);
rc = do_op(pgm, p, upd, uflags); rc = do_op(pgm, p, upd, uflags);
if (rc) { if (rc && rc != LIBAVRDUDE_SOFTFAIL) {
exitrc = 1; exitrc = 1;
break; break;
} }

View File

@ -335,9 +335,9 @@ int do_op(PROGRAMMER * pgm, struct avrpart * p, UPDATE * upd, enum updateflags f
mem = avr_locate_mem(p, upd->memtype); mem = avr_locate_mem(p, upd->memtype);
if (mem == NULL) { if (mem == NULL) {
avrdude_message(MSG_INFO, "%s memory type not defined for part %s\n", avrdude_message(MSG_INFO, "%s: skipping -U %s:... as memory not defined for part %s\n",
upd->memtype, p->desc); progname, upd->memtype, p->desc);
return LIBAVRDUDE_GENERAL_FAILURE; return LIBAVRDUDE_SOFTFAIL;
} }
AVRMEM_ALIAS * alias_mem = avr_find_memalias(p, mem); AVRMEM_ALIAS * alias_mem = avr_find_memalias(p, mem);