Last active
March 3, 2017 15:13
-
-
Save prasertsakd/a4f05aa46e7d751590c698fa6ad5c279 to your computer and use it in GitHub Desktop.
for reflash mega16u2 to usbserial use avrdude
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set arduino_path=c:\arduino-1.6.12 | |
set firmware=Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex | |
set avrdude.exe=%arduino_path%\hardware\tools\avr\bin\avrdude.exe | |
set avrdude.conf=%arduino_path%\hardware\tools\avr\etc\avrdude.conf | |
%avrdude_path% -c usbtiny -p m16u2 -C %avrdude_conf% -F -D -U flash:w:%firmware% -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment