avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] EEPROM block-wise writing?


From: Lucius Windschuh
Subject: [avrdude-dev] EEPROM block-wise writing?
Date: Thu, 13 Aug 2009 22:50:57 +0200

Hi.
I'm using avrdude at home with an STK500v2 compatible programmer successfully.

But when I tried Peter Fleury's stk500v2 compatible boot loader
(http://homepage.hispeed.ch/peterfleury/stk500v2bootloader.zip) with
an AVR ATmega 644P, I could read but not write the EEPROM.
It boils down to a statement in avr.c where the decision is made
whether a paged write is issued or a byte-wise write.
Background: pages writes are issued directy, bytewise writes via the
SPI MULTI command. The latter is not implemented by the boot loader
except for signature reading.
I don't know if it is meant to be this way, but paged access is only
allowed by avrdude for EEPROM reads, but not for EEPROM writes.

Consequently, this obvious patch makes avrdude EEPROM writes work with
Peter Fleury's bootloader:
--- avrdude-5.8/avr.c.orig      2009-06-24 23:32:12.000000000 +0200
+++ avrdude-5.8/avr.c       2009-08-13 22:41:40.000000000 +0200
@@ -578,6 +578,7 @@
       (strcmp(m->desc, "apptable")==0) ||
       (strcmp(m->desc, "boot")==0) ||
       (strcmp(m->desc, "flash")==0) ||
+      (strcmp(m->desc, "eeprom")==0) ||
       (strcmp(m->desc, "prodsig")==0) ||
       (strcmp(m->desc, "usersig")==0)) {
     if (pgm->paged_write != NULL && m->page_size != 0) {

Is this wrong for other programmers / AVRs or was this line simply forgotten?

Kind regards,

Lucius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]