2019-06-25 19:16:43 +02:00
|
|
|
# set default port depending on operating system
|
2019-11-07 14:14:05 +01:00
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
2019-06-25 19:16:43 +02:00
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|
|
|
|
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
2020-07-02 09:14:35 +02:00
|
|
|
# Set default programmer as jlink
|
|
|
|
PROGRAMMER ?= jlink
|
|
|
|
|
|
|
|
ifeq (openocd,$(PROGRAMMER))
|
|
|
|
DEBUG_ADAPTER = jlink
|
|
|
|
OPENOCD_TRANSPORT = jtag
|
|
|
|
OPENOCD_PRE_FLASH_CMDS += "-c flash protect 0 1 last off"
|
|
|
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
|
|
|
else ifeq (jlink,$(PROGRAMMER))
|
|
|
|
# setup JLink for flashing
|
|
|
|
JLINK_DEVICE = FE310
|
|
|
|
JLINK_IF = JTAG
|
|
|
|
FLASH_ADDR = 0x20010000
|
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
|
|
|
else
|
|
|
|
$(error Programmer '$(PROGRAMMER)' not supported for board '$(BOARD)')
|
|
|
|
endif
|
2020-01-10 08:34:45 +01:00
|
|
|
|
|
|
|
TESTRUNNER_RESET_DELAY = 1
|
|
|
|
$(call target-export-variables,test,TESTRUNNER_RESET_DELAY)
|