Submitted by Brane Zdralo:

patch #7769: Write flash fails for AVR910 programmers
* avr910.c (avr910_paged_write): Fix flash addresses in
'A' command.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1206 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2013-09-03 21:43:24 +00:00
parent 2f00bdcac5
commit bc52ef2cf5
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2013-09-03 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Brane Ždralo:
patch #7769: Write flash fails for AVR910 programmers
* avr910.c (avr910_paged_write): Fix flash addresses in
'A' command.
2013-09-03 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Fred (magister):

1
NEWS
View File

@ -90,6 +90,7 @@ Current:
- bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0
- bug #39691 Buffer overrun when reading EEPROM byte with JTAGICE3
- bug #38951: AVR109 use byte offset instead of word offset
- patch #7769: Write flash fails for AVR910 programmers
* Keep track of input file contents

View File

@ -612,13 +612,19 @@ static int avr910_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned int max_addr = addr + n_bytes;
char *cmd;
unsigned int blocksize = PDATA(pgm)->buffersize;
int wr_size;
if (strcmp(m->desc, "flash") && strcmp(m->desc, "eeprom"))
return -2;
if (m->desc[0] == 'e')
if (m->desc[0] == 'e') {
blocksize = 1; /* Write to eeprom single bytes only */
avr910_set_addr(pgm, addr);
wr_size = 1;
} else {
wr_size = 2;
}
avr910_set_addr(pgm, addr / wr_size);
cmd = malloc(4 + blocksize);
if (!cmd) return -1;