1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:52:44 +01:00

boards/arduino-mkr1000: used shared BOSSA tooling

This commit is contained in:
Hauke Petersen 2017-05-17 11:57:15 +02:00
parent 0ab8295932
commit d0b959df1c
4 changed files with 6 additions and 24 deletions

View File

@ -6,23 +6,19 @@ export CPU_MODEL = samd21g18a
export PORT_LINUX ?= /dev/ttyACM0
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# setup the flash tool used
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
# when BOSSA is used (default), use a different flash map
# refer https://github.com/shumatech/BOSSA for this programmer
export PROGRAMMER = bossa
# on default, we use BOSSA to flash this board
export LINKER_SCRIPT ?= $(RIOTCPU)/sam0_common/ldscripts/$(CPU_MODEL)_mkr1000.ld
# define board specific flasher options
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
export OFLAGS = -O binary
include $(RIOTMAKE)/tools/bossa.inc.mk
endif
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# setup the boards dependencies
include $(RIOTBOARD)/$(BOARD)/Makefile.dep

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +0,0 @@
#!/bin/sh
# To put the board in update mode, manually double press the reset button before
# running `make flash`.
if [ `uname` = "Linux" ]; then
stty -F "${PORT}" raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
"${RIOTBOARD}"/"${BOARD}"/dist/bossac --port=${PORT} -i -b -U true -i -e -w -v "${HEXFILE}" -R
elif [ `uname` = "Darwin" ]; then
stty -f ${PORT} raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
"${RIOTBOARD}"/"${BOARD}"/dist/bossac_osx --port=${PORT} -i -b -U true -i -e -w -v "${HEXFILE}" -R
else
echo "CAUTION: No flash tool for your host system found!"
fi