From 7ab8d6100c83b77cd7e60c9cb411f13a2b95545c Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 27 May 2021 13:32:08 +0200 Subject: [PATCH] tools/renode: add support for target reset --- makefiles/tools/renode.inc.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/makefiles/tools/renode.inc.mk b/makefiles/tools/renode.inc.mk index 29c8fc7834..fa56f1c3d5 100644 --- a/makefiles/tools/renode.inc.mk +++ b/makefiles/tools/renode.inc.mk @@ -27,6 +27,11 @@ endif RENODE_LOG_LEVEL ?= 2 # Warning level RENODE_CONFIG_FLAGS += -e "logLevel $(RENODE_LOG_LEVEL)" +# Configure renode telnet port to allow sending command to the monitor while +# the emulator is running (used to send reset command) +RENODE_TELNET_PORT ?= 1234 +RENODE_CONFIG_FLAGS += -P $(RENODE_TELNET_PORT) + # Renode GUI RENODE_SHOW_GUI ?= 0 ifneq (1,$(RENODE_SHOW_GUI)) @@ -62,6 +67,9 @@ DEBUGSERVER_FLAGS ?= $(RENODE_DEBUG_FLAGS) DEBUGGER_FLAGS ?= $(BOARD) $(APPDIR) $(DEBUG_ELFFILE) $(GDB_REMOTE) $(EMULATOR_TMP_DIR) "-ex \"monitor start\"" DEBUGGER ?= $(RIOTTOOLS)/emulator/debug.sh +RESET ?= bash +RESET_FLAGS ?= -c "{ sleep 0.2;echo machine RequestReset; } | telnet localhost $(RENODE_TELNET_PORT)" || true + # No flasher available with renode emulator FLASHER ?= FFLAGS ?=