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:
parent
0f5af86c9f
commit
715249e2d4
|
@ -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>
|
2013-09-03 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
Submitted by Fred (magister):
|
Submitted by Fred (magister):
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -90,6 +90,7 @@ Current:
|
||||||
- bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0
|
- bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0
|
||||||
- bug #39691 Buffer overrun when reading EEPROM byte with JTAGICE3
|
- bug #39691 Buffer overrun when reading EEPROM byte with JTAGICE3
|
||||||
- bug #38951: AVR109 use byte offset instead of word offset
|
- bug #38951: AVR109 use byte offset instead of word offset
|
||||||
|
- patch #7769: Write flash fails for AVR910 programmers
|
||||||
|
|
||||||
* Keep track of input file contents
|
* Keep track of input file contents
|
||||||
|
|
||||||
|
|
10
avr910.c
10
avr910.c
|
@ -612,13 +612,19 @@ static int avr910_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||||
unsigned int max_addr = addr + n_bytes;
|
unsigned int max_addr = addr + n_bytes;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
unsigned int blocksize = PDATA(pgm)->buffersize;
|
unsigned int blocksize = PDATA(pgm)->buffersize;
|
||||||
|
int wr_size;
|
||||||
|
|
||||||
if (strcmp(m->desc, "flash") && strcmp(m->desc, "eeprom"))
|
if (strcmp(m->desc, "flash") && strcmp(m->desc, "eeprom"))
|
||||||
return -2;
|
return -2;
|
||||||
|
|
||||||
if (m->desc[0] == 'e')
|
if (m->desc[0] == 'e') {
|
||||||
blocksize = 1; /* Write to eeprom single bytes only */
|
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);
|
cmd = malloc(4 + blocksize);
|
||||||
if (!cmd) return -1;
|
if (!cmd) return -1;
|
||||||
|
|
Loading…
Reference in New Issue