From: Dan White Date: Tue, 14 May 2013 19:24:49 +0000 (-0500) Subject: msp4th: PC testing wrapper + make target X-Git-Tag: cheetah~71 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=c43d92cc15986516d2ee5f4e56a7697d40e957b1;p=430.git msp4th: PC testing wrapper + make target --- diff --git a/msp4th/Makefile b/msp4th/Makefile index 15d2e47..2ec2a13 100644 --- a/msp4th/Makefile +++ b/msp4th/Makefile @@ -133,8 +133,8 @@ bootrom.rcf: $(SOURCES) flashboot.s $(MAKE) -B DEFINE=-DBOOTROM LDSCRIPT=ldscript_ns430_bootrom all ../ihex2rcf.py --width=16 --start=0x3000 --length=0x1000 --default=0x0000 main.hex > $@ -pc4th: test4th.c msp4th.c msp4th.h - gcc -Wall -o pc4th test4th.c msp4th.c +_pc4th: test4th.c msp4th.c msp4th.h + gcc -Wall -o _pc4th test4th.c msp4th.c .PHONY: flash flash: $(TARGET).hex @@ -147,5 +147,5 @@ clean: $(RM) $(TARGET).{elf,hex,txt,map,xout} $(RM) $(SOURCES:.c=.lst) $(RM) $(DEPEND) - $(RM) pc4th + $(RM) _pc4th diff --git a/msp4th/pc4th b/msp4th/pc4th new file mode 100755 index 0000000..5d1b5a9 --- /dev/null +++ b/msp4th/pc4th @@ -0,0 +1,16 @@ +#!/bin/bash + +make _pc4th >/dev/null && ( + OLD_STTY=$(stty -g) + stty cbreak + stty -echo + stty -icrnl + + if [ "$1" == "" ]; then + ./_pc4th + else + ./_pc4th < $1 + fi + + stty "$OLD_STTY" + )