04 January 2009

Sanguino burn bootloader script

So, got a script that will burn a bootloader from the command line, taking the clock speed as an option.

cat <burn.sh
# For example: sh burn.sh 8
sudo avrdude \
-c avrisp2 \
-P usb \
-p m644\
-e \
-U lock:w:0x3F:m \
-U efuse:w:0xFD:m \
-U hfuse:w:0xDC:m \
-U lfuse:w:0xFF:m \
-B $1
sudo avrdude \
-c avrisp2 \
-P usb \
-p m644\
-e \
-U flash:w:arduino-0012/hardware/bootloaders/atmega644/ATmegaBOOT_644.hex:i \
-U lock:w:0x0F:m \
DONE

No comments:

Post a Comment