1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/mulle/Makefile.include
2024-05-01 21:01:43 +02:00

32 lines
1.2 KiB
Makefile

# MULLE_SERIAL is used to select which specific Mulle board we are compiling for.
ifdef MULLE_SERIAL
CFLAGS += -DMULLE_SERIAL=$(MULLE_SERIAL)
endif
# this board uses openocd
PROGRAMMER ?= openocd
PROGRAMMERS_SUPPORTED += openocd
OPENOCD_TRANSPORT := jtag
JLINK_DEVICE := MK60DN512XXX10
# Default debug adapter choice is to use the Mulle programmer board
OPENOCD_DEBUG_ADAPTER ?= mulle
# 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)
OPENOCD_PRE_VERIFY_CMDS += \
-c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \
-c 'resume 0x20000000'
OPENOCD_PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
# 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*)))
TTY_BOARD_FILTER := --model 'Mulle Programmer' --iface-num 0