Submitted by Mark Litwack:
patch #6261: avrdude won't use dragon/debugwire to write a file to eeprom * jtagmkII.c (jtagmkII_paged_write): when in debugWire mode, implement a paged write to EEPROM as a series of byte writes. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@792 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
ae566048c3
commit
5eea41bfce
|
@ -1,3 +1,11 @@
|
||||||
|
2009-02-16 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
Submitted by Mark Litwack:
|
||||||
|
patch #6261: avrdude won't use dragon/debugwire to write a file
|
||||||
|
to eeprom
|
||||||
|
* jtagmkII.c (jtagmkII_paged_write): when in debugWire mode,
|
||||||
|
implement a paged write to EEPROM as a series of byte writes.
|
||||||
|
|
||||||
2009-02-16 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2009-02-16 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
Submitted by Janos Sallai:
|
Submitted by Janos Sallai:
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -35,6 +35,8 @@ Current:
|
||||||
* Add preliminary support for ATxmega128A1 for the JTAG ICE mkII using
|
* Add preliminary support for ATxmega128A1 for the JTAG ICE mkII using
|
||||||
JTAG.
|
JTAG.
|
||||||
|
|
||||||
|
* Bugfixes.
|
||||||
|
|
||||||
Version 5.5:
|
Version 5.5:
|
||||||
|
|
||||||
* Add support for the USBtinyISP programmer (patch #6233)
|
* Add support for the USBtinyISP programmer (patch #6233)
|
||||||
|
|
18
jtagmkII.c
18
jtagmkII.c
|
@ -1534,14 +1534,26 @@ static int jtagmkII_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
|
||||||
PDATA(pgm)->flash_pageaddr = (unsigned long)-1L;
|
PDATA(pgm)->flash_pageaddr = (unsigned long)-1L;
|
||||||
page_size = PDATA(pgm)->flash_pagesize;
|
page_size = PDATA(pgm)->flash_pagesize;
|
||||||
} else if (strcmp(m->desc, "eeprom") == 0) {
|
} else if (strcmp(m->desc, "eeprom") == 0) {
|
||||||
cmd[1] = MTYPE_EEPROM_PAGE;
|
|
||||||
PDATA(pgm)->eeprom_pageaddr = (unsigned long)-1L;
|
|
||||||
page_size = PDATA(pgm)->eeprom_pagesize;
|
|
||||||
if (pgm->flag & PGM_FL_IS_DW) {
|
if (pgm->flag & PGM_FL_IS_DW) {
|
||||||
|
/*
|
||||||
|
* jtagmkII_paged_write() to EEPROM attempted while in
|
||||||
|
* DW mode. Use jtagmkII_write_byte() instead.
|
||||||
|
*/
|
||||||
|
for (addr = 0; addr < n_bytes; addr++) {
|
||||||
|
status = jtagmkII_write_byte(pgm, p, m, addr, m->buf[addr]);
|
||||||
|
report_progress(addr, n_bytes, NULL);
|
||||||
|
if (status < 0) {
|
||||||
free(cmd);
|
free(cmd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(cmd);
|
||||||
|
return n_bytes;
|
||||||
|
}
|
||||||
|
cmd[1] = MTYPE_EEPROM_PAGE;
|
||||||
|
PDATA(pgm)->eeprom_pageaddr = (unsigned long)-1L;
|
||||||
|
page_size = PDATA(pgm)->eeprom_pagesize;
|
||||||
|
}
|
||||||
|
|
||||||
serial_recv_timeout = 100;
|
serial_recv_timeout = 100;
|
||||||
for (addr = 0; addr < n_bytes; addr += page_size) {
|
for (addr = 0; addr < n_bytes; addr += page_size) {
|
||||||
|
|
Loading…
Reference in New Issue