1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: Fix TERMFLAGS

Sometimes boards/*/Makefile.include (e. g. in case of the msba2) gets included
twice somehow, leading the TERMFLAG to be set twice and faulty. This
fixes that.
This commit is contained in:
Martine Lenders 2014-08-10 05:20:57 +02:00
parent eaed2f1b89
commit 248a8531a5
14 changed files with 17 additions and 13 deletions

View File

@ -193,7 +193,7 @@ flash: all
$(FLASHER) $(FFLAGS)
term:
$(TERMPROG) $(TERMFLAGS) $(PORT)
$(TERMPROG) $(TERMFLAGS)
doc:
make -BC $(RIOTBASE) doc

View File

@ -36,7 +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
export TERMFLAGS += -p "$(PORT)"
# 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)

View File

@ -26,7 +26,7 @@ export DEBUGSERVER = $(FLASHER)
export DEBUGSERVER_FLAGS = $(MSPDEBUGFLAGS) gdb
export DEBUGGER = $(PREFIX)gdb
export DEBUGGER_FLAGS = --tui --ex="target remote localhost:2000" --ex "monitor reset halt" --ex load -ex "monitor reset halt" $(ELFFILE)
export TERMFLAGS += -p
export TERMFLAGS += -p "$(PORT)"
export FFLAGS = $(MSPDEBUGFLAGS) "prog $(HEXFILE)"

View File

@ -20,7 +20,7 @@ ifeq ($(strip $(PORT)),)
export PORT = /dev/ttyUSB0
endif
export FFLAGS = $(PORT) $(HEXFILE)
export TERMFLAGS += -p
export TERMFLAGS += -p "$(PORT)"
include $(RIOTBOARD)/msba2-common/Makefile.dep
export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-common/drivers/include

View File

@ -84,6 +84,10 @@ else
export PORT =
endif
ifeq (,$(filter $(PORT),$(TERMFLAGS)))
export TERMFLAGS += $(PORT)
endif
all: # do not override first target
all-debug: all

View File

@ -39,7 +39,7 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O binary
export HEXFILE = $(ELFFILE:.elf=.bin)
export TERMFLAGS = -p
export TERMFLAGS += -p "$(PORT)"
export FFLAGS = $(BINDIR) $(HEXFILE)
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
export RESET_FLAGS = $(BINDIR)

View File

@ -36,7 +36,7 @@ export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endi
# $(LINKERSCRIPT) is specified in cpu/Makefile.include
export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O binary
export TERMFLAGS = -p
export TERMFLAGS += -p "$(PORT)"
# 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)

View File

@ -26,7 +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 TERMFLAGS += -p "$(PORT)"
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include/
export INCLUDES += -I$(RIOTCPU)/$(CPU)/maca/include

View File

@ -39,7 +39,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
export TERMFLAGS += -p "$(PORT)"
# 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)

View File

@ -38,7 +38,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
export TERMFLAGS += -p "$(PORT)"
# use newLib nano-specs if available
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)

View File

@ -38,7 +38,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
export TERMFLAGS += -p "$(PORT)"
# use newLib nano-specs if available
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)

View File

@ -20,7 +20,7 @@ ifeq ($(strip $(PORT)),)
export PORT = /dev/ttyUSB0
endif
export FFLAGS = --telosb -c $(PORT) -r -e -I -p $(HEXFILE)
export TERMFLAGS += -p
export TERMFLAGS += -p "$(PORT)"
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

View File

@ -36,7 +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
export TERMFLAGS += -p "$(PORT)"
# 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)

View File

@ -21,7 +21,7 @@ ifeq ($(strip $(PORT)),)
endif
export FFLAGS = --z1 -I -c $(PORT) -r -e -p $(HEXFILE)
export OFLAGS = -O ihex
export TERMFLAGS += -p
export TERMFLAGS += -p "$(PORT)"
export INCLUDES += -I $(RIOTCPU)/msp430-common/include -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/sys/net/include