Omit verify after write failure in term.c

This commit is contained in:
Stefan Rueger 2022-11-09 15:43:57 +00:00
parent 20b86fb739
commit ea65918dca
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 8 additions and 8 deletions

View File

@ -667,14 +667,14 @@ static int cmd_write(PROGRAMMER *pgm, AVRPART *p, int argc, char *argv[]) {
if (rc == -1) if (rc == -1)
imsg_error("%*swrite operation not supported on memory type %s\n", 8, "", mem->desc); imsg_error("%*swrite operation not supported on memory type %s\n", 8, "", mem->desc);
werror = true; werror = true;
} } else {
uint8_t b;
uint8_t b; rc = pgm->read_byte_cached(pgm, p, mem, addr+i, &b);
rc = pgm->read_byte_cached(pgm, p, mem, addr+i, &b); if (b != buf[i]) {
if (b != buf[i]) { pmsg_error("(write) verification error writing 0x%02x at 0x%05lx cell=0x%02x\n", buf[i], (long) addr+i, b);
pmsg_error("(write) error writing 0x%02x at 0x%05lx cell=0x%02x\n", buf[i], (long) addr+i, b); werror = true;
werror = true; }
} }
if (werror) if (werror)
pgm->err_led(pgm, ON); pgm->err_led(pgm, ON);