# HG changeset patch # User Malte Bayer # Date 1323891788 -3600 # Node ID 393b63b8c95f61c2c9aff73b2b2068d02e97b2f2 # Parent 027e164b32f310135a302c6275a07c65c4b47ddb added usb programmer option to blackbox makefile diff -r 027e164b32f3 -r 393b63b8c95f blackbox/Makefile --- a/blackbox/Makefile Tue Dec 13 18:41:13 2011 +0100 +++ b/blackbox/Makefile Wed Dec 14 20:43:08 2011 +0100 @@ -11,7 +11,12 @@ F_CPU = 8000000 BAUD=57600 -ISP_BAUD = 115200 +ISP_BAUD=115200 +ifdef USB +PORT=/dev/ttyUSB$(USB) +else +PORT=/dev/ttyS0 +endif #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c #SRC = main.c driver/rs232.c driver/manchester.c @@ -74,10 +79,10 @@ rm $(PRG).map program: code - $(AVRDUDE) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i + $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i fuse: - $(AVRDUDE) -c stk500 -p $(MCU) -V $(FUSES) + $(AVRDUDE) -P $(PORT) -c stk500v2 -p $(MCU) -V $(FUSES) clean: rm -rf *.o *.elf *.elf.src *.s *.i