#!/bin/sh # 25.06.2005 mbanzi # # Arduino project http://arduino.berlios.de # # quick and dirty script to set the proper fuses and lock bits # while loading the bootloader onto a brand new arduino board # # very useful also when for some reasons the bootloader disappears # # TODO: cleanup and make it more user friendly # TODO: move this (and related) scripts to platform dist/ dirs # # expects an STK500 compatible programmer on the specified serial port # if you use the parallel port programmer you need to change the dprog # parametre and run: mknod /dev/parport0 c 99 0 # #BINDIR=/usr/local/avr/bin #BINDIR=../build/macosx/work/tools/avr/bin PORT=/dev/parport0 #PORT=/dev/tty.usbserial0 #PORT=/dev/tty.USA19QW3b1P1.1 #PORT=/dev/tty.USA19QW1b1P1.1 # -dspeed=19200 uisp -dpart=ATmega8 -dprog=dapa -dserial=$PORT --wr_lock=0xFF uisp -dpart=ATmega8 -dprog=dapa -dserial=$PORT --wr_fuse_l=0xdf --wr_fuse_h=0xca uisp -dpart=ATmega8 -dprog=dapa -dserial=$PORT --erase --upload if=ATmegaBOOT.hex -v uisp -dpart=ATmega8 -dprog=dapa -dserial=$PORT --wr_lock=0xCF