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-26 09:32:10 +02:00
|
|
|
# by default, we use BOSSA to flash this board and take into account the
|
2017-10-24 15:29:41 +02:00
|
|
|
# preinstalled Arduino bootloader. ROM_OFFSET skips the space taken by
|
|
|
|
# such bootloader.
|
|
|
|
ROM_OFFSET ?= 0x2000
|
2017-09-22 14:52:12 +02:00
|
|
|
include $(RIOTMAKE)/tools/bossa.inc.mk
|
2017-05-23 10:25:45 +02:00
|
|
|
endif
|
|
|
|
|
2017-11-16 12:28:47 +01:00
|
|
|
INCLUDES += -I$(RIOTBOARD)/common/arduino-mkr/include
|
2017-05-23 10:25:45 +02:00
|
|
|
|
|
|
|
# setup the boards dependencies
|
|
|
|
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|