trackswitch/Makefile

changeset 104
95b2c23cb973
parent 21
8b7cdb655e7b
equal deleted inserted replaced
103:52fd4283cd2c 104:95b2c23cb973
11 11
12 F_CPU = 8000000 12 F_CPU = 8000000
13 BAUD=38400 13 BAUD=38400
14 14
15 ISP_BAUD = 115200 15 ISP_BAUD = 115200
16 ifdef USB
17 PORT=/dev/ttyUSB$(USB)
18 else
19 PORT=/dev/ttyS0
20 endif
16 21
17 #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c 22 #SRC = main.c seriald.c driver/ADC.c driver/clock.c driver/timer.c
18 #SRC = main.c driver/rs232.c driver/manchester.c 23 #SRC = main.c driver/rs232.c driver/manchester.c
19 SRC = main.c driver/rs232.c 24 SRC = main.c driver/rs232.c
20 25
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
83
84 backup:
85 $(AVRDUDE) -P $(PORT) -c stk500v2 -b $(ISP_BAUD) -i 1 -p $(MCU) -V -U flash:r:$(PRG)_backup.hex:i
78 86
79 fuse: 87 fuse:
80 $(AVRDUDE) -c stk500 -p $(MCU) -V $(FUSES) 88 $(AVRDUDE) -c stk500 -p $(MCU) -V $(FUSES)
81 89
82 clean: 90 clean:

mercurial