blackbox/Makefile

changeset 80
393b63b8c95f
parent 33
c261350bb394
child 103
52fd4283cd2c
equal deleted inserted replaced
79:027e164b32f3 80:393b63b8c95f
9 #F_CPU = 14318000 9 #F_CPU = 14318000
10 10
11 F_CPU = 8000000 11 F_CPU = 8000000
12 12
13 BAUD=57600 13 BAUD=57600
14 ISP_BAUD = 115200 14 ISP_BAUD=115200
15 ifdef USB
16 PORT=/dev/ttyUSB$(USB)
17 else
18 PORT=/dev/ttyS0
19 endif
15 20
16 #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c 21 #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c
17 #SRC = main.c driver/rs232.c driver/manchester.c 22 #SRC = main.c driver/rs232.c driver/manchester.c
18 SRC = main.c driver/rs232.c driver/adc.c 23 SRC = main.c driver/rs232.c driver/adc.c
19 SRC += lowlevel.c 24 SRC += lowlevel.c
72 $(OBJCOPY) -j .text -j .data -O ihex $< $@ 77 $(OBJCOPY) -j .text -j .data -O ihex $< $@
73 rm $(PRG).elf 78 rm $(PRG).elf
74 rm $(PRG).map 79 rm $(PRG).map
75 80
76 program: code 81 program: code
77 $(AVRDUDE) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i 82 $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:w:$(PRG).hex:i
78 83
79 fuse: 84 fuse:
80 $(AVRDUDE) -c stk500 -p $(MCU) -V $(FUSES) 85 $(AVRDUDE) -P $(PORT) -c stk500v2 -p $(MCU) -V $(FUSES)
81 86
82 clean: 87 clean:
83 rm -rf *.o *.elf *.elf.src *.s *.i 88 rm -rf *.o *.elf *.elf.src *.s *.i
84 rm -rf driver/*.o 89 rm -rf driver/*.o
85 90

mercurial