Browse Source

boards/arduino-mkr1000: used shared BOSSA tooling

master
Hauke Petersen 6 years ago
parent
commit
d0b959df1c
  1. 16
      boards/arduino-mkr1000/Makefile.include
  2. BIN
      boards/arduino-mkr1000/dist/bossac
  3. BIN
      boards/arduino-mkr1000/dist/bossac_osx
  4. 14
      boards/arduino-mkr1000/dist/flash.sh

16
boards/arduino-mkr1000/Makefile.include

@ -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

BIN
boards/arduino-mkr1000/dist/bossac vendored

Binary file not shown.

BIN
boards/arduino-mkr1000/dist/bossac_osx vendored

Binary file not shown.

14
boards/arduino-mkr1000/dist/flash.sh vendored

@ -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
Loading…
Cancel
Save