[tasks.build] description = "Build the executable" command = "cargo" args = ["build", "--release"] [tasks.objcopy] description = "Transform the binary for upload" command = "arm-none-eabi-objcopy" args = [ "-O", "binary", "target/thumbv6m-none-eabi/release/neowatch", "target/thumbv6m-none-eabi/release/neowatch.bin", ] dependencies = ["build"] [tasks.wait_for_tty] description = "Wait for serial port to be available for upload" script = [ ''' #!/bin/sh while :; do if touch /dev/ttyACM0; then break else sleep 1 fi done ''' ] [tasks.test] disabled = true [tasks.upload] description = "Upload the program to the device" command = "bossac" args = [ "--info", "--debug", "--port=/dev/ttyACM0", "--force_usb_port=true", "--erase", "--write", "--verify", "target/thumbv6m-none-eabi/release/neowatch.bin", "--reset", ] dependencies = ["objcopy", "wait_for_tty"]