forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards/arduino-mkr1000: Updated periph config and SWD flashing (RIOT-…
- Loading branch information
Showing
8 changed files
with
135 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,35 @@ | ||
# define the cpu used by Arduino/Genuino MKR1000 board | ||
export CPU = samd21 | ||
export CPU_MODEL = samd21g18a_mkr1000 | ||
export CFLAGS += -D__SAMD21G18A__ | ||
|
||
# set default port depending on operating system | ||
PORT_LINUX ?= /dev/ttyACM0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) | ||
ifeq ($(PROGRAMMER),jlink) | ||
# in case J-Link is attached to SWD pins, use a plain CPU memory model | ||
export CPU_MODEL = samd21g18a | ||
|
||
# define board specific flasher options | ||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh | ||
export OFLAGS = -O binary | ||
# setup JLink for flashing | ||
export JLINK_DEVICE := atsamw25 | ||
include $(RIOTMAKE)/tools/jlink.inc.mk | ||
|
||
# setup the boards dependencies | ||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep | ||
# set default serial port depending on operating system | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) | ||
else | ||
# when BOSSA is used, use a different flash map | ||
# refer https://github.com/shumatech/BOSSA for this programmer | ||
export PROGRAMMER = bossa | ||
export CPU_MODEL = samd21g18a_mkr1000 | ||
export CFLAGS += -D__SAMD21G18A__ | ||
|
||
# define board specific flasher options | ||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh | ||
export OFLAGS = -O binary | ||
|
||
#export needed for flash rule | ||
export PORT_LINUX ?= /dev/ttyACM0 | ||
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) | ||
endif | ||
|
||
# setup serial terminal | ||
include $(RIOTMAKE)/tools/serial.inc.mk | ||
|
||
# setup the boards dependencies | ||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source [find interface/cmsis-dap.cfg] | ||
|
||
set CHIPNAME at91samd21g18 | ||
set ENDIAN little | ||
set telnet_port 0 | ||
|
||
source [find target/at91samdXX.cfg] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters