bug #30451: Accessing some Xmega memory sections gives not

supported error
* stk500v2.c: Handle all Xmega memory sections (except
"prodsig" which is not documented in AVR079)
* fileio.c: Treat the "boot", "application", and "apptable"
regions (which are actually subregions of "flash") all as
being flash, i.e. suppress trailing 0xFF bytes when reading
them
* avr.c: (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1075 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2012-03-29 14:32:18 +00:00
parent 3fdeef1f16
commit 0025747234
5 changed files with 42 additions and 11 deletions

10
avr.c
View File

@@ -302,7 +302,10 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype,
report_progress(pageaddr, mem->size, NULL);
}
if (!failure) {
if (strcasecmp(mem->desc, "flash") == 0)
if (strcasecmp(mem->desc, "flash") == 0 ||
strcasecmp(mem->desc, "application") == 0 ||
strcasecmp(mem->desc, "apptable") == 0 ||
strcasecmp(mem->desc, "boot") == 0)
return avr_mem_hiaddr(mem);
else
return mem->size;
@@ -333,7 +336,10 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype,
report_progress(i, mem->size, NULL);
}
if (strcasecmp(mem->desc, "flash") == 0)
if (strcasecmp(mem->desc, "flash") == 0 ||
strcasecmp(mem->desc, "application") == 0 ||
strcasecmp(mem->desc, "apptable") == 0 ||
strcasecmp(mem->desc, "boot") == 0)
return avr_mem_hiaddr(mem);
else
return i;