diff --git a/harrogate/flash.sh b/harrogate/flash.sh index a211018..b32a043 100755 --- a/harrogate/flash.sh +++ b/harrogate/flash.sh @@ -2,6 +2,8 @@ set -e +cd "$(dirname "$0")" + cargo build --release --features $1 APPLET=harrogate @@ -11,12 +13,12 @@ test -e "$TARGET_BIN" || { exit 1 } -arm-none-eabi-objcopy -O binary "$TARGET_BIN" flash.bin -uf2conv-rs flash.bin -o flash.uf2 +arm-none-eabi-objcopy -O binary "$TARGET_BIN" image.bin +uf2conv-rs image.bin -o image.uf2 sudo mount LABEL=ITSYBOOT mnt/ echo "Flashing..." -sudo cp flash.uf2 mnt/flash.uf2 +sudo cp image.uf2 mnt/image.uf2 sync echo "Done." sudo umount mnt/