From 5a0289945788bf09780391e34b8a6f5e18fd3d8b Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sun, 4 Aug 2024 10:28:41 +0200 Subject: [PATCH] boards/weact-g030f6: fix use with stdio_rtt Running USEMODULE=stdio_rtt make BOARD=weact-g030f6 -C ... flash term failed due the programmer not being specified by the time the serial is configured: makefiles/tools/serial.inc.mk:44: "Warning: No RIOT_TERMINAL set, but using stdio_rtt: The default terminal is likely not to work." This reorders the setup of the board to first configure the programmer and then the serial, so that using stdio_rtt now works out of the box. --- boards/weact-g030f6/Makefile.include | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/boards/weact-g030f6/Makefile.include b/boards/weact-g030f6/Makefile.include index 15a610973e..232ae1d6e6 100644 --- a/boards/weact-g030f6/Makefile.include +++ b/boards/weact-g030f6/Makefile.include @@ -1,18 +1,13 @@ # we use shared STM32 configuration snippets INCLUDES += -I$(RIOTBASE)/boards/common/stm32/include -# define the default port depending on the host OS -PORT_LINUX ?= /dev/ttyACM0 -PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) - -# setup serial terminal -include $(RIOTMAKE)/tools/serial.inc.mk - +# setup programmer +PROGRAMMERS_SUPPORTED += openocd PROGRAMMER ?= openocd OPENOCD_DEBUG_ADAPTER ?= stlink - -# openocd programmer is supported -PROGRAMMERS_SUPPORTED += openocd - -# this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk + +# setup serial terminal +PORT_LINUX ?= /dev/ttyACM0 +PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) +include $(RIOTMAKE)/tools/serial.inc.mk