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