Merge pull request #11608 from haukepetersen/opt_calliope_rmfscopyflasher

board/calliope-mini: use openocd as default flasher and rm fscopy
This commit is contained in:
Martine Lenders 2019-06-04 22:09:48 +02:00 committed by GitHub
commit fcc8427ff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 78 deletions

View File

@ -5,18 +5,10 @@ export CPU_MODEL = nrf51x22xxab
PORT_LINUX ?= /dev/ttyACM0 PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# this board supports flashing through plain fscopy, using JLink or using # for this board we support flashing via openocd or pyocd
# openocd PROGRAMMER ?= openocd
PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER)) ifeq (openocd,$(PROGRAMMER))
FFLAGS = $(HEXFILE)
DEBUGGER_FLAGS =
FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
DEBUGGER =
DEBUGSERVER =
else ifeq (openocd,$(PROGRAMMER))
DEBUG_ADAPTER = dap DEBUG_ADAPTER = dap
else ifeq (pyocd,$(PROGRAMMER)) else ifeq (pyocd,$(PROGRAMMER))
# PyOCD doesn't recognize automatically the board ID, so target type has to # PyOCD doesn't recognize automatically the board ID, so target type has to

View File

@ -1,67 +0,0 @@
#!/bin/sh
# Copyright (C) 2014 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
# The Calliope mini can be flashed through accessing it as a mass storage
# device. To upload a new firmware, simply copy your binary onto this device.
#
# Under Ubuntu/Mint the default mount-point is /media/$(USER)/MINI
#
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
# @author Oliver Hahm <oliver.hahm@inria.fr>
OS=`uname`
DID_MOUNT=false
NAME="MINI"
HEXFILE=$1
# set the mount path depending on the OS
if [ ${OS} = "Linux" ]
then
MOUNT=/media/${USER}/${NAME}
elif [ ${OS} = "Darwin" ]
then
MOUNT=/Volumes/${NAME}
else
echo ""
echo "ERROR: No mount point defined for your OS"
echo "Please copy the binary manually to your Calliope mini"
echo ""
exit
fi
# check if device was mounted
mount | grep ${MOUNT} > /dev/null
if [ $? -eq 1 ]
then
mount ${MOUNT}
if [ $? -eq 1 ]
then
echo ""
echo "ERROR: could not mount your Calliope mini"
echo ""
exit
else
DID_MOUNT=true
fi
fi
# copy new binary to device
cp ${HEXFILE} ${MOUNT}
# make sure hexfile was written
sync
# unmount the device if we have manually mounted it before
if [ ${DID_MOUNT} = true ]
then
umount ${MOUNT}
fi
echo ""
echo "UPLOAD SUCCESFUL"
echo ""