From c333b7e896a95c64a96a3e95af3be65766ea3ba4 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Mon, 4 May 2020 16:31:27 +0200 Subject: [PATCH] mk/boards/stm32: add JLink support --- makefiles/boards/stm32.inc.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/makefiles/boards/stm32.inc.mk b/makefiles/boards/stm32.inc.mk index daf82e3beb..0ba48978d3 100644 --- a/makefiles/boards/stm32.inc.mk +++ b/makefiles/boards/stm32.inc.mk @@ -1,6 +1,6 @@ PROGRAMMER ?= openocd -PROGRAMMERS_SUPPORTED := bmp dfu-util openocd stm32flash +PROGRAMMERS_SUPPORTED := bmp dfu-util openocd stm32flash jlink ifeq (,$(filter $(PROGRAMMER), $(PROGRAMMERS_SUPPORTED))) $(error Programmer $(PROGRAMMER) not supported) @@ -37,6 +37,11 @@ ifeq (bmp,$(PROGRAMMER)) include $(RIOTMAKE)/tools/bmp.inc.mk endif +ifeq (jlink,$(PROGRAMMER)) + JLINK_DEVICE ?= $(CPU_MODEL) + include $(RIOTMAKE)/tools/jlink.inc.mk +endif + ifeq (dfu-util,$(PROGRAMMER)) # optionally, use dfu-util to flash via usb # note: needs a bootloader flashed before, config below is compatible