root / paintboard / code / Makefile @ 351481ed
History | View | Annotate | Download (368 Bytes)
1 | 351481ed | Tom Mullins | SRC = main.c twi.c motor.c servo.c sol.c |
---|---|---|---|
2 | HDR = twi.h motor.h servo.h sol.h |
||
3 | 4319e0bc | Tom Mullins | |
4 | paint: paint.hex |
||
5 | @ |
||
6 | |||
7 | %.hex: %.elf |
||
8 | avr-objcopy -j .text -j .data -O ihex $< $@ |
||
9 | |||
10 | paint.elf: $(SRC) $(HDR) |
||
11 | avr-gcc -mmcu=atmega168 -DF_CPU=8000000UL $(SRC) -o paint.elf -Os |
||
12 | |||
13 | download: paint.hex |
||
14 | avrdude -c avrispmkII -p m168 -P usb -B 1 -U flash:w:paint.hex |
||
15 | |||
16 | clean: |
||
17 | rm -f paint.elf paint.hex |