From 63401235580b77c2efd3f965af5936f4f5d8b80a Mon Sep 17 00:00:00 2001
From: Oleg Hahm <oleg@hobbykeller.org>
Date: Thu, 31 Jul 2014 17:31:49 +0200
Subject: [PATCH] make: introduced TERMFLAGS

Also added the missing -p flag for the new pyterm version where
necessary.
---
 Makefile.include                         | 2 +-
 boards/arduino-due/Makefile.include      | 1 +
 boards/msb-430-common/Makefile.include   | 1 +
 boards/msba2-common/Makefile.include     | 1 +
 boards/redbee-econotag/Makefile.include  | 1 +
 boards/stm32f0discovery/Makefile.include | 1 +
 boards/stm32f4discovery/Makefile.include | 1 +
 boards/telosb/Makefile.include           | 1 +
 boards/udoo/Makefile.include             | 1 +
 boards/z1/Makefile.include               | 1 +
 10 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Makefile.include b/Makefile.include
index cfac151c21..c2867acfe5 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -149,7 +149,7 @@ flash: all
 	$(FLASHER) $(FFLAGS)
 
 term:
-	$(TERMPROG) $(PORT)
+	$(TERMPROG) $(TERMFLAGS) $(PORT)
 
 doc:
 	make -BC $(RIOTBASE) doc
diff --git a/boards/arduino-due/Makefile.include b/boards/arduino-due/Makefile.include
index 5ece90ddcb..a3f65f1715 100644
--- a/boards/arduino-due/Makefile.include
+++ b/boards/arduino-due/Makefile.include
@@ -36,6 +36,7 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
 export LINKFLAGS += -T$(LINKERSCRIPT)
 export OFLAGS += -O binary
 export FFLAGS += -R -e -w -v -b bin/$(BOARD)/$(APPLICATION).hex
+export TERMFLAGS += -p
 
 # use the nano-specs of the NewLib when available
 ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
diff --git a/boards/msb-430-common/Makefile.include b/boards/msb-430-common/Makefile.include
index 8d0455ddca..06ba075b9c 100644
--- a/boards/msb-430-common/Makefile.include
+++ b/boards/msb-430-common/Makefile.include
@@ -22,6 +22,7 @@ export FFLAGS += -j $(PROGRAMMER)
 ifeq ($(strip $(PROGRAMMER)),uif)
 	export FFLAGS += -d $(PORT)
 endif
+export TERMFLAGS += -p
 
 export FFLAGS += "prog $(HEXFILE)"
 
diff --git a/boards/msba2-common/Makefile.include b/boards/msba2-common/Makefile.include
index 77d96a4e58..5869e5554d 100644
--- a/boards/msba2-common/Makefile.include
+++ b/boards/msba2-common/Makefile.include
@@ -20,6 +20,7 @@ ifeq ($(strip $(PORT)),)
 	export PORT = /dev/ttyUSB0
 endif
 export FFLAGS = $(PORT) $(HEXFILE)
+export TERMFLAGS += -p
 include $(RIOTBOARD)/msba2-common/Makefile.dep
 
 export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-common/drivers/include
diff --git a/boards/redbee-econotag/Makefile.include b/boards/redbee-econotag/Makefile.include
index 69dd9385fb..2f9f818624 100644
--- a/boards/redbee-econotag/Makefile.include
+++ b/boards/redbee-econotag/Makefile.include
@@ -26,6 +26,7 @@ ifeq ($(strip $(PORT)),)
 endif
 export FFLAGS = -t $(PORT) -f $(HEXFILE) -c 'bbmc -l redbee-econotag reset'
 export OFLAGS = -O binary --gap-fill=0xff
+export TERMFLAGS += -p
 
 export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/
 export INCLUDES += -I$(RIOTCPU)/$(CPU)/maca/include
diff --git a/boards/stm32f0discovery/Makefile.include b/boards/stm32f0discovery/Makefile.include
index d523cfd0f3..4632840167 100644
--- a/boards/stm32f0discovery/Makefile.include
+++ b/boards/stm32f0discovery/Makefile.include
@@ -38,6 +38,7 @@ export LINKFLAGS += -T$(LINKERSCRIPT)
 export OFLAGS = -O binary
 export FFLAGS = write bin/$(BOARD)/$(APPLICATION).hex 0x08000000
 export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf bin/$(BOARD)/$(APPLICATION).elf
+export TERMFLAGS += -p
 
 # use the nano-specs of the NewLib when available
 ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
diff --git a/boards/stm32f4discovery/Makefile.include b/boards/stm32f4discovery/Makefile.include
index 7306ca20cb..d65c6efd6b 100644
--- a/boards/stm32f4discovery/Makefile.include
+++ b/boards/stm32f4discovery/Makefile.include
@@ -37,6 +37,7 @@ export LINKFLAGS += -T$(LINKERSCRIPT)
 export OFLAGS = -O binary
 export FFLAGS = write bin/$(BOARD)/$(APPLICATION).hex 0x8000000
 export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(BINDIR)/$(APPLICATION).elf
+export TERMFLAGS += -p
 
 # use newLib nano-specs if available
 ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
diff --git a/boards/telosb/Makefile.include b/boards/telosb/Makefile.include
index f12f1d35bd..1e5790f70c 100644
--- a/boards/telosb/Makefile.include
+++ b/boards/telosb/Makefile.include
@@ -20,6 +20,7 @@ ifeq ($(strip $(PORT)),)
     export PORT = /dev/ttyUSB0
 endif
 export FFLAGS = --telosb -c $(PORT) -r -e -I -p $(HEXFILE)
+export TERMFLAGS += -p
 
 export INCLUDES += -I$(RIOTCPU)/msp430-common/include -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/sys/net/include
 export OFLAGS = -O ihex
diff --git a/boards/udoo/Makefile.include b/boards/udoo/Makefile.include
index d3245e52f7..f924c592e6 100644
--- a/boards/udoo/Makefile.include
+++ b/boards/udoo/Makefile.include
@@ -36,6 +36,7 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
 export LINKFLAGS += -T$(LINKERSCRIPT)
 export OFLAGS += -O binary
 export FFLAGS += -R -e -w -v -b bin/$(BOARD)/$(APPLICATION).hex
+export TERMFLAGS += -p
 
 # use the nano-specs of the NewLib when available
 ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
diff --git a/boards/z1/Makefile.include b/boards/z1/Makefile.include
index 53c115d447..843f2e1331 100644
--- a/boards/z1/Makefile.include
+++ b/boards/z1/Makefile.include
@@ -21,6 +21,7 @@ ifeq ($(strip $(PORT)),)
 endif
 export FFLAGS = --z1 -I -c $(PORT) -r -e -p $(HEXFILE)
 export OFLAGS = -O ihex
+export TERMFLAGS += -p
 
 export INCLUDES += -I $(RIOTCPU)/msp430-common/include -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/sys/net/include
 
-- 
GitLab