From 4ef7511b7ea19b7d805961f67108804ac127d82c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= <gaetan.harter@fu-berlin.de>
Date: Mon, 26 Mar 2018 18:32:05 +0200
Subject: [PATCH] microbit/flash: get BINFILE from cli

---
 boards/microbit/Makefile.include | 2 +-
 boards/microbit/dist/flash.sh    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/boards/microbit/Makefile.include b/boards/microbit/Makefile.include
index 8eb617dd3b..e5907b5336 100644
--- a/boards/microbit/Makefile.include
+++ b/boards/microbit/Makefile.include
@@ -10,7 +10,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
 PROGRAMMER ?= fscopy
 
 ifeq (fscopy,$(PROGRAMMER))
-  export FFLAGS =
+  export FFLAGS = $(HEXFILE)
   export DEBUGGER_FLAGS =
 
   export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
diff --git a/boards/microbit/dist/flash.sh b/boards/microbit/dist/flash.sh
index ceeeb0f00e..657307e5fb 100755
--- a/boards/microbit/dist/flash.sh
+++ b/boards/microbit/dist/flash.sh
@@ -18,6 +18,8 @@ OS=`uname`
 DID_MOUNT=false
 NAME="MICROBIT"
 
+HEXFILE=$1
+
 # set the mount path depending on the OS
 if [ ${OS} = "Linux" ]
 then
-- 
GitLab