author | Tero Marttila <terom@fixme.fi> |
Sat, 08 May 2010 17:27:27 +0300 | |
changeset 18 | 79b25e81721f |
parent 17 | a7c668003a19 |
child 29 | 453550e69e07 |
permissions | -rw-r--r-- |
5 | 1 |
AS = avra |
2 |
ASFLAGS = |
|
3 |
||
4 |
AD_PART = m328p |
|
5 |
AD_PROG = arduino |
|
6 |
AD_BAUD = 57600 |
|
17
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
7 |
AD_PORT = /dev/ttyUSB0 |
5 | 8 |
|
9 |
AD = avrdude |
|
10 |
ADFLAGS = -p $(AD_PART) -c $(AD_PROG) -b $(AD_BAUD) -P $(AD_PORT) |
|
11 |
||
17
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
12 |
PROG = led7seg |
5 | 13 |
|
18 | 14 |
led7seg.hex: spi.inc led7seg.inc adc.inc timer.inc delay.inc |
17
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
15 |
|
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
16 |
all: $(PROG).hex |
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
17 |
|
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
18 |
%.hex: %.s |
5 | 19 |
$(AS) $(ASFLAGS) $< |
17
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
20 |
mv $<.hex $@ |
5 | 21 |
|
17
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
22 |
upload: $(PROG).hex |
a7c668003a19
split led7seg.s into .inc modules, and update Makefile to use .s -> .hex, and above .inc's for led7seg
Tero Marttila <terom@fixme.fi>
parents:
10
diff
changeset
|
23 |
$(AD) $(ADFLAGS) -U flash:w:$< |
5 | 24 |
|
10 | 25 |
SERIAL_BAUD = 9600 |
26 |
SERIAL_FLOW = n |
|
27 |
SERIAL_PARITY = n |
|
28 |
SERIAL_BITS = 8 |
|
29 |
SERIAL_PORT = $(AD_PORT) |
|
30 |
||
31 |
SERIAL_TERM = picocom |
|
32 |
SERIAL_FLAGS = -b $(SERIAL_BAUD) -f $(SERIAL_FLOW) -p $(SERIAL_PARITY) -d $(SERIAL_BITS) |
|
33 |
||
34 |
chat: |
|
35 |
$(SERIAL_TERM) $(SERIAL_FLAGS) $(SERIAL_PORT) |
|
36 |