From 7ab8d6100c83b77cd7e60c9cb411f13a2b95545c Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 27 May 2021 13:32:08 +0200 Subject: [PATCH 1/4] 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 ?= From b6628dddd6ab40706a7e4512a8e9a166aa2325b8 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 10 Mar 2023 11:51:00 +0100 Subject: [PATCH 2/4] boards/stm32f4discovery: use default port to access stdio via cdc acm --- boards/stm32f4discovery/Makefile.include | 4 ---- 1 file changed, 4 deletions(-) diff --git a/boards/stm32f4discovery/Makefile.include b/boards/stm32f4discovery/Makefile.include index 39dd1d7221..9d8d743da0 100644 --- a/boards/stm32f4discovery/Makefile.include +++ b/boards/stm32f4discovery/Makefile.include @@ -1,10 +1,6 @@ # we use shared STM32 configuration snippets INCLUDES += -I$(RIOTBOARD)/common/stm32/include -# set default port depending on operating system -PORT_LINUX ?= /dev/ttyUSB0 -PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) - # this board uses openocd with st-link PROGRAMMER ?= openocd OPENOCD_DEBUG_ADAPTER ?= stlink From f30abc4200c65dfd3e296df53196e9af8fa1f007 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 10 Mar 2023 12:42:47 +0100 Subject: [PATCH 3/4] pkg/tinyusb/tinyusb_board_reset: define feature as RIOT internal Defining the feature as RIOT internal avoids that the board has to set USB_VID and USB_PID explicit to USB_VID_TESTInG/USB_PID_TESTING if tinyUSB board reset feature is used. --- pkg/tinyusb/contrib/tinyusb_board_reset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/tinyusb/contrib/tinyusb_board_reset.c b/pkg/tinyusb/contrib/tinyusb_board_reset.c index c511d9649e..1c2ce14991 100644 --- a/pkg/tinyusb/contrib/tinyusb_board_reset.c +++ b/pkg/tinyusb/contrib/tinyusb_board_reset.c @@ -8,6 +8,8 @@ #if MODULE_TINYUSB_DEVICE && MODULE_TINYUSB_CLASS_CDC && MODULE_USB_BOARD_RESET +#define USB_H_USER_IS_RIOT_INTERNAL + #include "usb_board_reset_internal.h" #include "class/cdc/cdc.h" From a7347592dfe1185cbc392cf2bae7fef7d19ee1cc Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 10 Mar 2023 12:43:22 +0100 Subject: [PATCH 4/4] boards/esp32s2-wemos-mini: remove default setting of USB_VID/USB_PID --- boards/esp32s2-wemos-mini/Makefile.include | 3 --- 1 file changed, 3 deletions(-) diff --git a/boards/esp32s2-wemos-mini/Makefile.include b/boards/esp32s2-wemos-mini/Makefile.include index 4f38951c63..e0dc0e02c2 100644 --- a/boards/esp32s2-wemos-mini/Makefile.include +++ b/boards/esp32s2-wemos-mini/Makefile.include @@ -1,8 +1,5 @@ PORT_LINUX ?= /dev/ttyACM0 -USB_VID ?= $(USB_VID_TESTING) -USB_PID ?= $(USB_PID_TESTING) - CFLAGS += -DCONFIG_CONSOLE_UART_TX=39 CFLAGS += -DCONFIG_CONSOLE_UART_RX=37