I need to program an ATTiny via ISP with a bootloader, and then rewrite the fuse settings to disable the reset pin functionality.
The problem is that it appears to erase the flash, then write the fuse settings, then write the bootloader code. This means that if I set the fuse such that it disables the reset pin, then it cannot write the bootloader as suddenly ISP becomes not possible.
I thought then if I burn the bootloader with the fuses set to have the reset pin enabled (that gets the bootloader code successfully onto the chip), then run the burn bootloader process again only this time with a fuse setting which disables the reset pin, then all would be well. The bootloader would remain from the first pass and the fuse settings from the second. However it would appear that the bootloader written by the first pass is erased in the second meaning I am left with a tiny with no bootloader and no reset pin (= need a high voltage programmer to recover it).
Does anyone know if it is possible to get the ArduinoISP sketch to only change the Fuse settings without modifying the flash?
Or failing that is there a way to change the order of things and make it fuse-erase-write instead of erase-fuse-write.
avrdude in conjunction with Arduino Uno flashed with ArduinoISP should be able to change the fuses after a bootloader or some other hex file has been uploaded to the target Attiny.
simplex:
avrdude in conjunction with Arduino Uno flashed with ArduinoISP should be able to change the fuses after a bootloader or some other hex file has been uploaded to the target Attiny.
Yup, thanks for that I totally forgot about using avrdude as a standalone.
Rather pleasingly the blink sketch I uploaded to check with continued blinking away after avrdude finished
Edit:
Just checked and the bootloader is still functioning properly. I have to remember to do a power cycle just before the program starts to download to get back into the bootloader, but that was to be expected. Bye bye autoreset