1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/samr21-xpro/Makefile.include
Kees Bakker 8644b5f7a0 cpu/samd21: introduce sam0.h so that we can select samr21.h or other
In the Makefile.include of the board it is required to set the correct
define.

Currently only SAMRG18A is supported, as required by samr21-xpro.
2016-09-21 19:43:30 +02:00

30 lines
1001 B
Makefile

# define the cpu used by SAMR21 Xplained Pro board
export CPU = samd21
export CPU_MODEL = samr21x18a
CFLAGS += -D__SAMR21G18A__
# set default port depending on operating system
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup the boards dependencies
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
# setup serial terminal
include $(RIOTBOARD)/Makefile.include.serial
# Add board selector (USB serial) to OpenOCD options if specified.
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
# Usage: SERIAL="ATML..." BOARD="samr21-xpro" make flash
ifneq (,$(SERIAL))
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
SERIAL_TTY = $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL)))
ifeq (,$(SERIAL_TTY))
$(error Did not find a device with serial $(SERIAL))
endif
PORT_LINUX := $(SERIAL_TTY)
endif
# this board uses openocd
include $(RIOTBOARD)/Makefile.include.openocd