2017-02-28 15:35:28 +01:00
|
|
|
# define the cpu used by Arduino/Genuino MKR1000 board
|
|
|
|
export CPU = samd21
|
2017-05-03 10:18:45 +02:00
|
|
|
export CPU_MODEL = samd21g18a
|
2017-02-28 15:35:28 +01:00
|
|
|
|
2017-05-03 10:18:45 +02:00
|
|
|
#export needed for flash rule
|
|
|
|
export PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
2017-02-28 15:35:28 +01:00
|
|
|
|
2017-05-17 11:57:15 +02:00
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
|
|
|
# setup the flash tool used
|
2017-05-03 10:18:45 +02:00
|
|
|
ifeq ($(PROGRAMMER),jlink)
|
|
|
|
# in case J-Link is attached to SWD pins, use a plain CPU memory model
|
|
|
|
export JLINK_DEVICE := atsamw25
|
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
|
|
|
else
|
2017-05-17 11:57:15 +02:00
|
|
|
# on default, we use BOSSA to flash this board
|
2017-05-03 10:18:45 +02:00
|
|
|
export LINKER_SCRIPT ?= $(RIOTCPU)/sam0_common/ldscripts/$(CPU_MODEL)_mkr1000.ld
|
2017-05-17 11:57:15 +02:00
|
|
|
include $(RIOTMAKE)/tools/bossa.inc.mk
|
2017-05-03 10:18:45 +02:00
|
|
|
endif
|
2017-02-28 15:35:28 +01:00
|
|
|
|
2017-05-03 10:18:45 +02:00
|
|
|
# setup the boards dependencies
|
|
|
|
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|