mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-08-22 13:25:52 +03:00
- series, low-addr.patch: record the lowest address touched (only for ihex, all others default to 0) - series, skip-low-addr.patch: skip untouched addresses in avr_read and avr_write
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
Index: avrdude/avrdude-5.10/avr.c
|
|
===================================================================
|
|
--- avrdude.orig/avrdude-5.10/avr.c 2011-03-08 23:46:53.000000000 -0300
|
|
+++ avrdude/avrdude-5.10/avr.c 2011-03-08 23:50:06.000000000 -0300
|
|
@@ -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);
|
|
|
|
Index: avrdude/avrdude-5.10/update.c
|
|
===================================================================
|
|
--- avrdude.orig/avrdude-5.10/update.c 2011-03-08 23:46:53.000000000 -0300
|
|
+++ avrdude/avrdude-5.10/update.c 2011-03-08 23:47:45.000000000 -0300
|
|
@@ -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",
|