Fix programming of write-only memories (such as lock bits on the

2313).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@116 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean
2002-01-12 01:26:09 +00:00
parent 3f9134a161
commit 3138b91aa7
2 changed files with 47 additions and 11 deletions

7
term.c
View File

@@ -278,6 +278,9 @@ int cmd_dump(int fd, struct avrpart * p, int argc, char * argv[])
if (rc != 0) {
fprintf(stderr, "error reading %s address 0x%05lx of part %s\n",
mem->desc, addr+i, p->desc);
if (rc == -1)
fprintf(stderr, "read operation not supported on memory type \"%s\"\n",
mem->desc);
return -1;
}
}
@@ -370,6 +373,10 @@ int cmd_write(int fd, struct avrpart * p, int argc, char * argv[])
if (rc) {
fprintf(stderr, "%s (write): error writing 0x%02x at 0x%05lx\n",
progname, buf[i], addr+i);
if (rc == -1)
fprintf(stderr,
"write operation not supported on memory type \"%s\"\n",
mem->desc);
werror = 1;
}
if (werror) {