altos: Add load-slow target for MicroPeak
authorKeith Packard <keithp@keithp.com>
Wed, 12 Dec 2012 18:57:03 +0000 (10:57 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 12 Dec 2012 18:57:03 +0000 (10:57 -0800)
This sets the programming clock to 1/4 of the 250kHz clock used by the
MicroPeak firmware, allowing the device to be reprogrammed.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/micropeak/Makefile

index 8cf608b..0c48ed6 100644 (file)
@@ -11,6 +11,7 @@ DUDECPUTYPE=t85
 #PROGRAMMER=stk500v2 -P usb
 PROGRAMMER=usbtiny
 LOADCMD=avrdude
+LOADSLOW=-i 32 -B 32
 LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w:
 CC=avr-gcc
 OBJCOPY=avr-objcopy
@@ -86,6 +87,9 @@ $(PROG).hex: $(PROG)
 load: $(PROG).hex
        $(LOADCMD) $(LOADARG)$(PROG).hex
 
+load-slow: $(PROG).hex
+       $(LOADCMD) $(LOADSLOW) $(LOADARG)$(PROG).hex
+
 ao_product.h: ao-make-product.5c ../Version
        $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@