Always use paged access for programmers that serve bootloaders
This commit is contained in:
parent
b864d7e73a
commit
b9396bcd02
|
@ -377,8 +377,9 @@ int avr_read_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, con
|
||||||
return avr_mem_hiaddr(mem);
|
return avr_mem_hiaddr(mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pgm->paged_load != NULL && mem->page_size > 1 &&
|
// HW programmers need a page size > 1, bootloader typ only offer paged r/w
|
||||||
mem->size % mem->page_size == 0) {
|
if ((pgm->paged_load && mem->page_size > 1 && mem->size % mem->page_size == 0) ||
|
||||||
|
((pgm->prog_modes & PM_SPM) && avr_has_paged_access(pgm, mem))) {
|
||||||
/*
|
/*
|
||||||
* the programmer supports a paged mode read
|
* the programmer supports a paged mode read
|
||||||
*/
|
*/
|
||||||
|
@ -894,7 +895,9 @@ int avr_write_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *m, int
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pgm->paged_write != NULL && m->page_size > 1) {
|
// HW programmers need a page size > 1, bootloader typ only offer paged r/w
|
||||||
|
if ((pgm->paged_load && m->page_size > 1 && m->size % m->page_size == 0) ||
|
||||||
|
((pgm->prog_modes & PM_SPM) && avr_has_paged_access(pgm, m))) {
|
||||||
/*
|
/*
|
||||||
* the programmer supports a paged mode write
|
* the programmer supports a paged mode write
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue