Tue 25 Jul 2006 11:50:12 AM UTC, original submission:
See list for past discussion.
If you are using a parallel port dongle like
the pony-stk200 and you have defined
the loadpage_lo/writepage sections in
the part entry for the EEPROM area,
avrdude seems to become confused.
Doing so seems to cause avrdude
to use the loadpage_lo op-code where
it should be using the write op-code,
when using the parallel port dongle.
Simple solution is to removed the loadpage_lo and writepage
from the eeprom section. Then the EEPROM programs
and verifies just fine.
The downside to that solution is that
the STK500V2 then stops working with the
error "load page instruction not defined".
This parallel dongle issue probably effects the Mega169 as well,
but I did not have one to test with at hand.
What happens in this function when you have
only LOADPAGE_LO defined (Mega645 does not
list a LOADPAGE_HI for the EEPROM)?:
avr.c:
int avr_write_byte_default(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
{
...
/*
* determine which memory opcode to use
*/
if (mem->op[AVR_OP_WRITE_LO]) {
if (addr & 0x01)
writeop = mem->op[AVR_OP_WRITE_HI];
else
writeop = mem->op[AVR_OP_WRITE_LO];
caddr = addr / 2;
}
else if (mem->op[AVR_OP_LOADPAGE_LO]) {
if (addr & 0x01)
writeop = mem->op[AVR_OP_LOADPAGE_HI];
else
writeop = mem->op[AVR_OP_LOADPAGE_LO];
caddr = addr / 2;
}
else {
writeop = mem->op[AVR_OP_WRITE];
caddr = addr;
}
...
}
|