]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/makefile
Work on second mbed
[~andy/csm213a-hw] / hw2 / makefile
index 0f9b65d4c80e4f2bac64d3747e6f18b2a882aca7..b32f808bd8aab647de4043adab4be95f2f069788 100644 (file)
@@ -1,10 +1,22 @@
 PROG = mbed
-OBJS = main.o test.o serial_dma.o timer_dma.o
+UART = /dev/ttyACM0
+OBJS = main.o test.o serial_irq.o serial_dma.o timer_dma.o
 
 CPPFLAGS =
 LDFLAGS  = -lm
 
-default: info install
+default: info run
+
+control: control.c
+       gcc -Wall -o control control.c
+
+run: all control install.sh
+       @./install.sh $(PROG).bin
+       @./control $(UART)
+
+terms:
+       term /dev/ttyACM0 &
+       term /dev/ttyACM1 &
 
 dist:
        zip mbed.zip makefile ../common.mk *.{c,cpp,h} */*.{cpp,.h}