2012-07-22 08:37:19 +03:00
|
|
|
Index: avrdude/avr.c
|
2011-03-09 06:50:51 +02:00
|
|
|
===================================================================
|
2012-07-22 08:37:19 +03:00
|
|
|
--- avrdude.orig/avr.c 2011-03-08 23:46:53.000000000 -0300
|
|
|
|
+++ avrdude/avr.c 2011-03-08 23:50:06.000000000 -0300
|
2011-03-09 06:50:51 +02:00
|
|
|
@@ -192,7 +192,8 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- for (i=0; i<size; i++) {
|
|
|
|
+ i = mem->paged ? mem->low_addr : 0;
|
|
|
|
+ for (; i<size; i++) {
|
|
|
|
rc = pgm->read_byte(pgm, p, mem, i, &rbyte);
|
|
|
|
if (rc != 0) {
|
|
|
|
fprintf(stderr, "avr_read(): error reading address 0x%04lx\n", i);
|
|
|
|
@@ -580,7 +581,8 @@
|
|
|
|
pgm->write_setup(pgm, p, m);
|
|
|
|
}
|
|
|
|
|
|
|
|
- for (i=0; i<wsize; i++) {
|
|
|
|
+ i = m->paged ? m->low_addr-(m->low_addr % m->page_size) : 0;
|
|
|
|
+ for (; i<wsize; i++) {
|
|
|
|
data = m->buf[i];
|
|
|
|
report_progress(i, wsize, NULL);
|
|
|
|
|
2012-07-22 08:37:19 +03:00
|
|
|
Index: avrdude/update.c
|
2011-03-09 06:50:51 +02:00
|
|
|
===================================================================
|
2012-07-22 08:37:19 +03:00
|
|
|
--- avrdude.orig/update.c 2011-03-08 23:46:53.000000000 -0300
|
|
|
|
+++ avrdude/update.c 2011-03-08 23:47:45.000000000 -0300
|
2011-03-09 06:50:51 +02:00
|
|
|
@@ -224,6 +224,7 @@
|
|
|
|
progname, mem->desc);
|
|
|
|
}
|
|
|
|
report_progress(0,1,"Reading");
|
|
|
|
+ mem->low_addr = 0; /* @@@ hackish */
|
|
|
|
rc = avr_read(pgm, p, upd->memtype, 0, 1);
|
|
|
|
if (rc < 0) {
|
|
|
|
fprintf(stderr, "%s: failed to read all of %s memory, rc=%d\n",
|