I’m working with an ATmega1284p and an AVR pocket programmer. When flashing “normal” programs the usbtinyisp works perfectly. But when trying to burn the bootloader a verification error occurs. The bootloader is flashed correctly and works like intended, but there is still the verification error.
This ussue is similar to :
https://forum.sparkfun.com/viewtopic.ph … er#p204644
But no real solutions are found.
I’ve tracked down the issue to reading the flash memory. When using this command:
avrdude -p atmega1284p -c usbtiny -U flash:r:flash.hex:i
The flash.hex output file is fully empty, although the bootloader is on the device. When doing the same with an usbasp or avrisp2 programmer the bootloader shows up in the flash.hex file.
The bootloader starts at 0x1e000. I found out by reading the flash when a blink program is uploaded that the last address that is read is 0x100d0.
I’ve tried putting a newer version of the usbtiny protocol on the AVR pocket programmer but the issue is still there.
avrdude -e -p atmega1284p -c usbtiny -U flash:w:bootloader.hex -U lfuse:w:0xc6:m -U hfuse:w:0xd8:m -U efuse:w:0xff:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9705 (probably m1284p)
avrdude: erasing chip
avrdude: reading input file "bootloader.hex"
avrdude: input file bootloader.hex auto detected as Intel Hex
avrdude: writing flash (124512 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 124512 bytes of flash written
avrdude: verifying flash memory against bootloader.hex:
avrdude: load data flash data from input file bootloader.hex:
avrdude: input file bootloader.hex auto detected as Intel Hex
avrdude: input file bootloader.hex contains 124512 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x1e000
0xff != 0x0c
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK (E:FF, H:D8, L:C6)
avrdude done. Thank you.
Thanks in advance