add runner scrip to allow cargo run

This commit is contained in:
foosinn 2021-07-10 23:56:43 +02:00
parent 878a8032af
commit 91f01c0b62
3 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,7 @@
target = "thumbv6m-none-eabi" target = "thumbv6m-none-eabi"
[target.thumbv6m-none-eabi] [target.thumbv6m-none-eabi]
runner = "./flash.sh"
rustflags = [ rustflags = [
"-C", "link-arg=-Tlink.x", "-C", "link-arg=-Tlink.x",
] ]

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
target/ target/
Cargo.lock Cargo.lock
firmware.bin

5
flash.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
binary="$1"
arm-none-eabi-objcopy -O binary "$binary" firmware.bin
sudo dfu-util -a 0 -s 0x08000000:leave -D firmware.bin