mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-24 01:56:25 +03:00
Adapt dryrun.c to new XMEGA memories
This commit is contained in:
10
src/dryrun.c
10
src/dryrun.c
@@ -557,12 +557,10 @@ static void dryrun_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
} else if(mem_is_sigrow(m) && m->size >= 6) {
|
||||
prodsigm = m;
|
||||
memset(m->buf, 0xff, m->size);
|
||||
if(q->prog_modes & PM_PDI) {
|
||||
m->buf[0] = m->buf[1] = 'U';
|
||||
} else if(q->prog_modes & PM_Classic) { // Signature at even addresses
|
||||
// Classic parts: signature at even addresses @@@ but not t102/t104
|
||||
if(q->prog_modes & PM_Classic)
|
||||
for(int i=0; i<3; i++)
|
||||
m->buf[2*i] = q->signature[i];
|
||||
}
|
||||
} else if(mem_is_io(m)) { // Initialise reset values (if known)
|
||||
int nr;
|
||||
const Register_file *rf = avr_locate_register_file(q, &nr);
|
||||
@@ -575,7 +573,7 @@ static void dryrun_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
}
|
||||
}
|
||||
if(prodsigm) {
|
||||
if(q->prog_modes & PM_UPDI) {
|
||||
if(q->prog_modes & (PM_UPDI | PM_PDI)) {
|
||||
for (LNODEID ln=lfirst(q->mem); ln; ln=lnext(ln)) {
|
||||
AVRMEM *m = ldata(ln);
|
||||
if(m->buf == prodsigm->buf) // Skip prodsig memory
|
||||
@@ -588,7 +586,7 @@ static void dryrun_enable(PROGRAMMER *pgm, const AVRPART *p) {
|
||||
}
|
||||
}
|
||||
if((q->prog_modes & PM_Classic) && (calm = avr_locate_calibration(q))) {
|
||||
// Calibration bytes of classic parts are interspersed with signature
|
||||
// Calibration bytes of classic parts are interspersed with signature @@@ but not t102/104
|
||||
for(int i=0; i<calm->size; i++)
|
||||
if(2*i+1 < prodsigm->size)
|
||||
prodsigm->buf[2*i+1] = 'U';
|
||||
|
||||
Reference in New Issue
Block a user