Fix for previous fix: add memtype for "flash".

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1088 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2012-04-26 11:01:19 +00:00
parent 374cc8f212
commit 90e4a54e12
1 changed files with 2 additions and 0 deletions

View File

@ -1894,6 +1894,7 @@ static int jtagmkII_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
if (strcmp(m->desc, "flash") == 0) { if (strcmp(m->desc, "flash") == 0) {
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;
cmd[1] = jtagmkII_memtype(pgm, p, addr);
if (p->flags & AVRPART_HAS_PDI) if (p->flags & AVRPART_HAS_PDI)
/* dynamically decide between flash/boot memtype */ /* dynamically decide between flash/boot memtype */
dynamic_memtype = 1; dynamic_memtype = 1;
@ -2028,6 +2029,7 @@ static int jtagmkII_paged_load(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
cmd[0] = CMND_READ_MEMORY; cmd[0] = CMND_READ_MEMORY;
if (strcmp(m->desc, "flash") == 0) { if (strcmp(m->desc, "flash") == 0) {
cmd[1] = jtagmkII_memtype(pgm, p, addr);
if (p->flags & AVRPART_HAS_PDI) if (p->flags & AVRPART_HAS_PDI)
/* dynamically decide between flash/boot memtype */ /* dynamically decide between flash/boot memtype */
dynamic_memtype = 1; dynamic_memtype = 1;