Makefile
author Tero Marttila <terom@fixme.fi>
Sun, 29 Aug 2010 22:49:32 +0300
changeset 38 f430b507a885
parent 37 df0bdaf0eb08
child 39 d7eac199d323
permissions -rw-r--r--
Working font rendering on LED matrix
AS = avra
ASFLAGS = 

AD_PART = m328p
AD_PROG = arduino
AD_BAUD = 57600
AD_PORT = /dev/ttyUSB1

AD = avrdude
ADFLAGS = -p $(AD_PART) -c $(AD_PROG) -b $(AD_BAUD) -P $(AD_PORT)

PROG = matrix

all: $(PROG).hex

matrix.hex: spi.inc matrix.inc timer.inc delay.inc macros.inc font.inc
led7seg.hex: spi.inc led7seg.inc adc.inc timer.inc delay.inc macros.inc
timer.hex: timer.inc macros.inc

font.inc: font.def

%.hex: %.s
	$(AS) $(ASFLAGS) $<
	mv $<.hex $@

font.def: font.txt font-compile.py
	python font-compile.py $< $@ > /dev/null

upload: $(PROG).hex
	$(AD) $(ADFLAGS) -U flash:w:$<

SERIAL_BAUD = 9600
SERIAL_FLOW = n
SERIAL_PARITY = n
SERIAL_BITS = 8
SERIAL_PORT = $(AD_PORT)

SERIAL_TERM = picocom
SERIAL_FLAGS = -b $(SERIAL_BAUD) -f $(SERIAL_FLOW) -p $(SERIAL_PARITY) -d $(SERIAL_BITS)

chat:
	$(SERIAL_TERM) $(SERIAL_FLAGS) $(SERIAL_PORT)