double click any hex to flash

Nothing revolutionary here but if you make a batch file like the following, then right click on a hex file, choose open with, more apps, scroll down, look for another app on this pc, then choose this bat file, then you'll associate all hex files with it. Then just a double-click any hex file to flash it. It's useful if you happen to be testing many hex files. Check that you like the fuses first.

@rem flashany.bat -Flinkrock

@echo off
SET width=180
SET height=40
SET bufheight=500
SET bufwidth=500

mode con: cols=%width% lines=%height%
powershell -command "&{$H=get-host;$W=$H.ui.rawui;$B=$W.buffersize;$B.width=%bufwidth%;$B.height=%bufheight%;$W.buffersize=$B;}"


SET file=%~d1%~p1%~n1.hex

REM Reconstruct the elf file:

del tmp.elf tmp.bin tmp.hex > nul
avr-objcopy -I ihex -O elf32-avr "%file%" tmp.elf > nul
avr-objcopy -I ihex -O binary "%file%" tmp.bin > nul
avr-objcopy -I binary -O elf32-avr tmp.bin tmp.elf > nul

copy "%file%" tmp.hex > nul

rem #fuses: high DD disabled DE 1.8V DF 2.7V > nul
rem #low C2, D2, E2 for 0ms, 4ms and 64ms startup. > nul

@echo on
avrdude -p attiny25 -c usbasp -u -e
avrdude -c usbasp -p attiny25 -U lfuse:w:0xD2:m -U hfuse:w:0xdDE:m -U efuse:w:0xff:m
avrdude -c usbasp -p attiny25 -U flash:w:tmp.hex
avr-size -C --mcu=attiny25 tmp.elf

@del tmp.elf tmp.bin tmp.hex

@ECHO This window will self destruct in 45 seconds:
@ECHO " "
@ECHO " "

@ping -n 45 127.0.0.1 > nul

Hello friend! I had not noticed that you have been back after a long break. I’m am very glad to see your posts! When you stop posting for a while I really missed your very detailed and intelligent posts. You have offered a lot to the forum so thanks much and great to see you are back!!!