]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/makefile
Cleanup comments and move test.cpp
[~andy/csm213a-hw] / hw2 / makefile
index 00a0a47d361319f10d1999e5d97bce672332161c..80fdcb8140ea34552a1dc37a50d92422d7145a20 100644 (file)
@@ -1,10 +1,24 @@
-PROG = mbed
-OBJS = main.o
+PROG  = mbed
+UART0 = /dev/ttyACM0
+UART1 = /dev/ttyACM1
+OBJS  = main.o serial_irq.o serial_dma.o timer_dma.o
 
 CPPFLAGS =
 LDFLAGS  = -lm
 
-default: info install
+default: info run
+
+control: control.c messages.h
+       gcc -Wall -o $@ $<
+
+run: all control install.sh
+       @./install.sh $(PROG).bin
+       @./control $(UART0) 1
+       @./control $(UART1) 2 sync
+
+terms:
+       term /dev/ttyACM0 &
+       term /dev/ttyACM1 &
 
 dist:
        zip mbed.zip makefile ../common.mk *.{c,cpp,h} */*.{cpp,.h}