@echo off if not exist %1.c goto ERROR avr-gcc -Os -mmcu=attiny2313 %1.c -o %1.elf if ERRORLEVEL 1 pause avr-objcopy -O ihex %1.elf %1.hex avrspx -pu -d4 -fl11100100 %1.hex if ERRORLEVEL 1 pause erase %1.elf erase %1.hex goto END :ERROR %1.c not found :END