1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #18749 from benpicco/bootterm

makefiles/tools/serial.inc.mk: add support for bootterm
This commit is contained in:
Marian Buschsieweke 2022-10-15 14:02:04 +02:00 committed by GitHub
commit 2c4d6bf160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 0 deletions

1
dist/tools/bootterm/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
bt

25
dist/tools/bootterm/Makefile vendored Normal file
View File

@ -0,0 +1,25 @@
PKG_NAME=bootterm
PKG_URL=https://github.com/wtarreau/bootterm
PKG_VERSION=2d50ab50c3259dbc82d75775c37bbf436d06fb89
PKG_LICENSE=MIT
# manually set some RIOT env vars, so this Makefile can be called stand-alone
RIOTBASE ?= $(CURDIR)/../../..
RIOTTOOLS ?= $(CURDIR)/..
PKG_SOURCE_DIR = $(CURDIR)/bin
PKG_BUILD_OUT_OF_SOURCE = 0
include $(RIOTBASE)/pkg/pkg.mk
all: $(CURDIR)/bt
$(CURDIR)/bt:
# Start bootterm build in a clean environment, so variables set by RIOT's build process
# for cross compiling a specific target platform are reset and bootterm can
# be built cleanly for the native platform.
env -i PATH="$(PATH)" TERM="$(TERM)" "$(MAKE)" -C "$(PKG_BUILD_DIR)"
mv $(PKG_BUILD_DIR)/bin/bt .
clean::
rm -f $(CURDIR)/bt

View File

@ -61,4 +61,9 @@ else ifeq (${RIOT_TERMINAL},openocd-rtt)
TERMENV = RAM_START_ADDR=${RAM_START_ADDR} RAM_LEN=${RAM_LEN}
TERMPROG = $(RIOTTOOLS)/openocd/openocd.sh
TERMFLAGS = term-rtt
else ifeq (${RIOT_TERMINAL},bootterm)
TERMENV = BT_PORT_CRLF=1
TERMPROG = $(RIOTTOOLS)/bootterm/bt
TERMFLAGS = $(BOOTTERMFLAGS) -a -b $(BAUD) $(PORT)
TERMDEPS += $(TERMPROG)
endif

View File

@ -17,6 +17,11 @@ $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py: $(RIOTTOOLS)/cc2538-bsl/Makefile
@CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/cc2538-bsl
@echo "[INFO] cc2538-bsl.py successfully fetched!"
$(RIOTTOOLS)/bootterm/bt: $(RIOTTOOLS)/bootterm/Makefile
@echo "[INFO] bt binary not found - building it from source now"
@CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/bootterm
@echo "[INFO] bt binary successfully built!"
$(PKGDIRBASE)/cosy/cosy.py: $(RIOTTOOLS)/cosy/Makefile
@echo "[INFO] cosy.py not found - fetching it from GitHub now"
@CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/cosy