From c43d92cc15986516d2ee5f4e56a7697d40e957b1 Mon Sep 17 00:00:00 2001 From: Dan White Date: Tue, 14 May 2013 14:24:49 -0500 Subject: [PATCH] msp4th: PC testing wrapper + make target --- msp4th/Makefile | 6 +++--- msp4th/pc4th | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 msp4th/pc4th 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" + ) -- 2.25.1