2017-05-23 10:25:45 +02:00
|
|
|
# define the cpu used by Arduino/Genuino MKR1000 board
|
2017-04-10 09:38:37 +02:00
|
|
|
export CPU = samd21
|
2017-05-23 10:25:45 +02:00
|
|
|
export CPU_MODEL = samd21g18a
|
2017-04-10 09:38:37 +02:00
|
|
|
|
2017-05-23 10:25:45 +02:00
|
|
|
#export needed for flash rule
|
|
|
|
export PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
2017-04-10 09:38:37 +02:00
|
|
|
|
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
2017-05-23 10:25:45 +02:00
|
|
|
# setup the flash tool used
|
|
|
|
ifeq ($(PROGRAMMER),jlink)
|
2017-09-22 14:52:12 +02:00
|
|
|
# in case J-Link is attached to SWD pins, use a plain CPU memory model
|
|
|
|
export JLINK_DEVICE := ${MKR_JLINK_DEVICE}
|
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
2017-05-23 10:25:45 +02:00
|
|
|
else
|
2017-09-22 14:52:12 +02:00
|
|
|
# on default, we use BOSSA to flash this board
|
|
|
|
export LINKER_SCRIPT ?= $(RIOTCPU)/sam0_common/ldscripts/$(CPU_MODEL)_mkr.ld
|
|
|
|
include $(RIOTMAKE)/tools/bossa.inc.mk
|
2017-05-23 10:25:45 +02:00
|
|
|
endif
|
|
|
|
|
2017-04-10 09:38:37 +02:00
|
|
|
INCLUDES += -I$(RIOTBOARD)/arduino-mkr-common/include
|
2017-05-23 10:25:45 +02:00
|
|
|
|
|
|
|
# setup the boards dependencies
|
|
|
|
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|