author | Tero Marttila <terom@fixme.fi> |
Sun, 09 May 2010 23:17:14 +0300 | |
changeset 29 | 453550e69e07 |
parent 18 | 79b25e81721f |
child 30 | 5226e512755c |
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 |
||
29 | 12 |
PROG = timer |
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
|
13 |
|
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
|
14 |
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
|
15 |
|
29 | 16 |
led7seg.hex: spi.inc led7seg.inc adc.inc timer.inc delay.inc macros.inc |
17 |
timer.hex: timer.inc macros.inc |
|
18 |
||
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
|
19 |
%.hex: %.s |
5 | 20 |
$(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
|
21 |
mv $<.hex $@ |
5 | 22 |
|
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
|
23 |
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
|
24 |
$(AD) $(ADFLAGS) -U flash:w:$< |
5 | 25 |
|
10 | 26 |
SERIAL_BAUD = 9600 |
27 |
SERIAL_FLOW = n |
|
28 |
SERIAL_PARITY = n |
|
29 |
SERIAL_BITS = 8 |
|
30 |
SERIAL_PORT = $(AD_PORT) |
|
31 |
||
32 |
SERIAL_TERM = picocom |
|
33 |
SERIAL_FLAGS = -b $(SERIAL_BAUD) -f $(SERIAL_FLOW) -p $(SERIAL_PARITY) -d $(SERIAL_BITS) |
|
34 |
||
35 |
chat: |
|
36 |
$(SERIAL_TERM) $(SERIAL_FLAGS) $(SERIAL_PORT) |
|
37 |