Skip to content
Snippets Groups Projects
Unverified Commit 8bd839f0 authored by Alexandre Abadie's avatar Alexandre Abadie Committed by GitHub
Browse files

Merge pull request #10473 from cladmi/pr/make/flash_sh/get_flashfile_from_cli

board/*/flash.sh: get file to flash from command line
parents c8349372 4ef7511b
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) ...@@ -10,7 +10,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
PROGRAMMER ?= fscopy PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER)) ifeq (fscopy,$(PROGRAMMER))
export FFLAGS = export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = export DEBUGGER_FLAGS =
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
......
...@@ -18,6 +18,8 @@ OS=`uname` ...@@ -18,6 +18,8 @@ OS=`uname`
DID_MOUNT=false DID_MOUNT=false
NAME="MINI" NAME="MINI"
HEXFILE=$1
# set the mount path depending on the OS # set the mount path depending on the OS
if [ ${OS} = "Linux" ] if [ ${OS} = "Linux" ]
then then
......
...@@ -6,7 +6,7 @@ export DEBUGGER = ...@@ -6,7 +6,7 @@ export DEBUGGER =
export DEBUGSERVER = export DEBUGSERVER =
HEXFILE = $(BINFILE) HEXFILE = $(BINFILE)
export FFLAGS = export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = export DEBUGGER_FLAGS =
# define the default port depending on the host OS # define the default port depending on the host OS
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
OS=`uname` OS=`uname`
DID_MOUNT=false DID_MOUNT=false
BINFILE=$1
# set the mount path depending on the OS # set the mount path depending on the OS
if [ ${OS} = "Linux" ] if [ ${OS} = "Linux" ]
then then
...@@ -55,7 +57,7 @@ fi ...@@ -55,7 +57,7 @@ fi
# remove old binary # remove old binary
rm -f ${MOUNT}/*.bin rm -f ${MOUNT}/*.bin
# copy new binary to device # copy new binary to device
cp ${HEXFILE} ${MOUNT} cp ${BINFILE} ${MOUNT}
# make sure hexfile was written # make sure hexfile was written
sync sync
......
...@@ -10,7 +10,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) ...@@ -10,7 +10,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
PROGRAMMER ?= fscopy PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER)) ifeq (fscopy,$(PROGRAMMER))
export FFLAGS = export FFLAGS = $(HEXFILE)
export DEBUGGER_FLAGS = export DEBUGGER_FLAGS =
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
......
...@@ -18,6 +18,8 @@ OS=`uname` ...@@ -18,6 +18,8 @@ OS=`uname`
DID_MOUNT=false DID_MOUNT=false
NAME="MICROBIT" NAME="MICROBIT"
HEXFILE=$1
# set the mount path depending on the OS # set the mount path depending on the OS
if [ ${OS} = "Linux" ] if [ ${OS} = "Linux" ]
then then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment