Skip to content

Commit

Permalink
boards/native: set and test for pyterm explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Jan 19, 2024
1 parent d0093cf commit e5618f7
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions boards/native/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,36 @@ endif
# only use pyterm wrapper if term target is requested
ifeq (,$(filter term,$(MAKECMDGOALS)))
RIOT_TERMINAL ?= native
else
RIOT_TERMINAL ?= pyterm
endif

RESET ?= $(RIOTBOARD)/native/dist/reset.sh
FLASHER ?=
FLASHFILE ?= $(ELFFILE)

ifeq (native,$(RIOT_TERMINAL))
ifeq (pyterm,$(RIOT_TERMINAL))
TERMFLAGS += -ps $(FLASHFILE)
PROCARGS := --process-args
else
TERMPROG ?= $(FLASHFILE)
endif

ZEP_IP ?= [::1]
ZEP_PORT_BASE ?= 17754
ifeq (1,$(USE_ZEP))
ifeq (pyterm,$(RIOT_TERMINAL))
TERMFLAGS += --process-args '-z $(ZEP_IP):$(ZEP_PORT_BASE)'
else
TERMFLAGS += -ps $(FLASHFILE)
ifeq (1,$(USE_ZEP))
ZEP_IP ?= [::1]
ZEP_PORT_BASE ?= 17754
TERMFLAGS += --process-args '-z $(ZEP_IP):$(ZEP_PORT_BASE)'
endif
ifneq (,$(ZEP_MAC))
TERMFLAGS += --process-args '\-\-eui64=$(ZEP_MAC)'
endif
TERMFLAGS += -z $(ZEP_IP):$(ZEP_PORT_BASE)
endif
endif
ifneq (,$(ZEP_MAC))
ifeq (pyterm,$(RIOT_TERMINAL))
TERMFLAGS += --process-args '\-\-eui64=$(ZEP_MAC)'
else
TERMFLAGS += --eui64=$(ZEP_MAC)
endif
endif

export VALGRIND ?= valgrind
Expand Down Expand Up @@ -106,23 +118,18 @@ LINKFLAGS += -ffunction-sections

# set the tap interface for term/valgrind
PORT ?= tap0

ifeq (native,$(RIOT_TERMINAL))
TERMFLAGS += $(PORT)
else
TERMFLAGS += --process-args $(PORT)
endif
TERMFLAGS += $(PROCARGS) $(PORT)

# Configure default eeprom file
EEPROM_FILE ?= $(BINDIR)/native.eeprom

# set the eeprom file flags only when the periph_eeprom feature is used.
ifneq (,$(filter periph_eeprom,$(FEATURES_USED)))
EEPROM_FILE_FLAGS = --eeprom $(EEPROM_FILE)
ifeq (native,$(RIOT_TERMINAL))
TERMFLAGS += $(EEPROM_FILE_FLAGS)
else
ifeq (pyterm,$(RIOT_TERMINAL))
TERMFLAGS += --process-args '$(EEPROM_FILE_FLAGS)'
else
TERMFLAGS += $(EEPROM_FILE_FLAGS)
endif
endif

Expand Down

0 comments on commit e5618f7

Please # to comment.