Program optiboot to chinese arduino nano / pro mini that comes without a working bootloader
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
455 B

#!/bin/bash
set -e
# Settings:
# LFUSE: no ckdiv, no ckout, maximum settle time, external 8MHz crystal
# HFUSE: smallest bootloader (optiboot uses 512B = 256W), bootloader enabled
# EFUSE: Brown-out level set to 1.8V
# LOCK: disable bootloader overwrite from app section
avrdude -p m328p -c dragon_isp \
-U lfuse:w:0xff:m \
-U hfuse:w:0xde:m \
-U efuse:w:0xfe:m \
-U lock:w:0xef:m \
-U flash:w:optiboot_atmega328.hex
echo "Done."