I am running avrdude from a batch file with the following command.
avrdude -p ATMEGA328P -c avrispmkII -P usb -V -U flash:w:"AVRXXX.hex":i -U flash:v:"AVRXXX.hex":i -u -U efuse:w:"0xfd":m -u -U hfuse:w:"0xd9":m -u -U lfuse:w:"0xff":m -u -U efuse:v:"0xfd":m -u -U hfuse:v:"0xd9":m -u -U lfuse:v:"0xff":m
I have 2 targets that I an using, an ATTiny 84 and an ATMega328p. obviosly the part, fuse settings and hex file are changed for each target. Everyting works fine with the Tiny84 but the when i run it on the Mega328p it fails when it tries to verify the fuses. Is there something special about that part or am I just missing something?