From 0f7bed0c731da85b1239df7662c65db616c6d397 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 13 Dec 2023 20:54:49 +0100 Subject: [PATCH] native: only set TERMFLAGS for pyterm If TERMPROG is unset the default is pyterm. If TERMPROG is pyterm we need to set the native flag. --- boards/native/Makefile.include | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 8283cf5cefe72..6917387b39770 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -14,7 +14,23 @@ RESET ?= $(RIOTBOARD)/native/dist/reset.sh FLASHER ?= FLASHFILE ?= $(ELFFILE) -TERMFLAGS ?= -n $(FLASHFILE) +SETPYTERMFLAGS := 0 +ifdef RIOT_TERMINAL + SETPYTERMFLAGS = 0 +else ifdef TERMPROG + SETPYTERMFLAGS = 0 +else + SETPYTERMFLAGS = 1 +endif +ifneq (,$(findstring pyterm,$(TERMPROG))) + SETPYTERMFLAGS = 1 +endif + +ifeq (1, $(SETPYTERMFLAGS)) + TERMFLAGS += -n $(FLASHFILE) +else + TERMPROG ?= $(FLASHFILE) +endif export VALGRIND ?= valgrind export CGANNOTATE ?= cg_annotate