mbed_lpc1768/flash: get BINFILE from cli

This commit is contained in:
Gaëtan Harter 2018-03-26 18:29:25 +02:00
parent 44da86f2ee
commit 8b2ff285be
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
2 changed files with 4 additions and 2 deletions

View File

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

View File

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