Skip to content

Commit

Permalink
Remove the old 'make upload' target, since it doesn't make as much se…
Browse files Browse the repository at this point in the history
…nse anymore. Add a script to do uploads instead.
  • Loading branch information
Mike Smith authored and Mike Smith committed Nov 3, 2011
1 parent 41df7b4 commit 9237f20
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Firmware/include/rules.mk
Expand Up @@ -108,11 +108,6 @@ $(OBJROOT)/%.rel: $(PRODUCT_DIR)/%.asm
$(v)cp $< $(subst $(PRODUCT_DIR),$(OBJROOT),$<)
$(v)$(AS) $(ASFLAGS) $(subst $(PRODUCT_DIR),$(OBJROOT),$<)

.PHONY: upload
upload: $(PRODUCT_HEX)
@echo UPLOAD $<
$(v)$(EC2FLASH) $(EC2FLASH_ARGS) $<

clean:
$(v)rm -rf $(OBJROOT)

Expand Down
21 changes: 21 additions & 0 deletions Firmware/tools/upload
@@ -0,0 +1,21 @@
#!/bin/sh
#
# Trivial uploader script, assumes that you have the EC2 tools somewhere on your path.
#

EWF=`which ec2writeflash`

if [ -z $EWF ]; then
echo "Could not find ec2writeflash on your path - did you install the EC2 tools?"
exit 1
fi
if [ -z $1 ]; then
echo "Missing firmware filename."
exit 1
fi
if [ ! -r $1 ]; then
echo "Input file '$1' not readable."
exit 1
fi

${EWF} --port=USB --mode=c2 --run --hex $1

0 comments on commit 9237f20

Please sign in to comment.