I have been using usbasploader with avrdude on linux for a good while now. But I have noticed that the -e "erase flash" option does not work.
sudo avrdude -c usbasp -p atmega328p -e
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: safemode: Fuses OK
avrdude done. Thank you.
After the alleged erase operation, the application still runs on the chip. I also think this is causing problems during programming as the chip I do not think is being erase before flashing. This is particularly a problem when flashing a program smaller than the one currently loaded.
Does anyone know if there is a fix?
usbasploader not erasing flash
Re: usbasploader not erasing flash
just read the usbasploader source code, there's nothing in there that does a simple erase
Re: usbasploader not erasing flash
how did you compile it? you must enable HAVE_CHIP_ERASE and disable NO_FLASH_WRITE