mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-06-02 09:46:34 +03:00
Try jtag page erase for classic part usersig memory
This commit is contained in:
@@ -1474,8 +1474,9 @@ static void jtag3_disable(const PROGRAMMER *pgm) {
|
||||
}
|
||||
|
||||
static void jtag3_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
if(!(p->prog_modes & (PM_PDI | PM_UPDI)))
|
||||
pgm->page_erase = NULL;
|
||||
// pgm->erase might be useful for usersig
|
||||
// if(!(p->prog_modes & (PM_PDI | PM_UPDI)))
|
||||
// pgm->page_erase = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1833,7 +1834,7 @@ static int jtag3_page_erase(const PROGRAMMER *pgm, const AVRPART *p, const AVRME
|
||||
|
||||
pmsg_notice2("jtag3_page_erase(.., %s, 0x%x)\n", m->desc, addr);
|
||||
|
||||
if (!(p->prog_modes & (PM_PDI | PM_UPDI))) {
|
||||
if(!(p->prog_modes & (PM_PDI | PM_UPDI)) && !str_eq(m->desc, "usersig")) {
|
||||
pmsg_error("page erase not supported\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1373,8 +1373,9 @@ static void jtagmkII_disable(const PROGRAMMER *pgm) {
|
||||
|
||||
static void jtagmkII_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
// Unset page_erase when part or programmer not capable of it
|
||||
if(!(p->prog_modes & (PM_PDI | PM_UPDI)))
|
||||
pgm->page_erase = NULL;
|
||||
// BUT might be useful for classic part usersig memory
|
||||
// if(!(p->prog_modes & (PM_PDI | PM_UPDI)))
|
||||
// pgm->page_erase = NULL;
|
||||
if(pgm->flag & PGM_FL_IS_DW)
|
||||
pgm->page_erase = NULL;
|
||||
|
||||
@@ -1835,8 +1836,8 @@ static int jtagmkII_page_erase(const PROGRAMMER *pgm, const AVRPART *p, const AV
|
||||
|
||||
pmsg_notice2("jtagmkII_page_erase(.., %s, 0x%x)\n", m->desc, addr);
|
||||
|
||||
if (!(p->prog_modes & (PM_PDI | PM_UPDI))) {
|
||||
pmsg_error("not an Xmega nor a UPDI device\n");
|
||||
if (!(p->prog_modes & (PM_PDI | PM_UPDI)) && !str_eq(m->desc, "usersig")) {
|
||||
pmsg_error("not an Xmega nor a UPDI device nor classic part usersig memory\n");
|
||||
return -1;
|
||||
}
|
||||
if ((pgm->flag & PGM_FL_IS_DW)) {
|
||||
|
||||
Reference in New Issue
Block a user