Improve build+flash script ergonomics
This commit is contained in:
parent
5cd4d306f8
commit
6112d634af
1 changed files with 5 additions and 3 deletions
|
@ -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/
|
||||
|
|
Loading…
Reference in a new issue