2015-01-12 14:42:48 +01:00
|
|
|
# MULLE_SERIAL is used to select which specific Mulle board we are compiling for.
|
|
|
|
ifdef MULLE_SERIAL
|
|
|
|
CFLAGS += -DMULLE_SERIAL=$(MULLE_SERIAL)
|
|
|
|
endif
|
|
|
|
|
2020-11-19 18:38:41 +01:00
|
|
|
# this board uses openocd
|
|
|
|
PROGRAMMER ?= openocd
|
2021-02-23 15:15:38 +01:00
|
|
|
PROGRAMMERS_SUPPORTED += openocd
|
2024-05-01 18:57:38 +02:00
|
|
|
OPENOCD_TRANSPORT := jtag
|
2020-11-19 18:38:41 +01:00
|
|
|
|
2024-05-01 20:25:31 +02:00
|
|
|
JLINK_DEVICE := MK60DN512XXX10
|
|
|
|
|
2017-10-06 14:59:07 +02:00
|
|
|
# Default debug adapter choice is to use the Mulle programmer board
|
2021-02-18 17:15:55 +01:00
|
|
|
OPENOCD_DEBUG_ADAPTER ?= mulle
|
2015-05-30 12:10:56 +02:00
|
|
|
|
2015-05-23 11:05:57 +02:00
|
|
|
# We need special handling of the watchdog if we want to speed up the flash
|
|
|
|
# verification by using the MCU to compute the image checksum after flashing.
|
|
|
|
# wdog-disable.bin is a precompiled binary which will disable the watchdog and
|
|
|
|
# return control to the debugger (OpenOCD)
|
2020-03-26 09:20:51 +01:00
|
|
|
OPENOCD_PRE_VERIFY_CMDS += \
|
2017-10-27 01:26:26 +02:00
|
|
|
-c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \
|
2015-05-23 11:05:57 +02:00
|
|
|
-c 'resume 0x20000000'
|
2021-02-18 18:18:54 +01:00
|
|
|
OPENOCD_PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
2015-05-23 11:05:57 +02:00
|
|
|
|
2020-11-19 18:38:41 +01:00
|
|
|
# Fall back to PROGRAMMER_SERIAL for backwards compatibility
|
|
|
|
DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL)
|
|
|
|
|
|
|
|
# Define the default port depending on the host OS
|
|
|
|
PORT_LINUX ?= /dev/ttyUSB0
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
2024-05-01 18:58:37 +02:00
|
|
|
TTY_BOARD_FILTER := --model 'Mulle Programmer' --iface-num 0
|