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