Compare commits
1 Commits
04949c4abd
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
34e6e50c61
|
26
run
26
run
@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env nu
|
|
||||||
|
|
||||||
# Build, flash, and run the firmware.
|
|
||||||
#
|
|
||||||
# Will also attach to serial logs
|
|
||||||
def main [
|
|
||||||
bin: string # Which firmware to run, 'left' or 'right'.
|
|
||||||
--serial (-s): string # The serial device to get logs from.
|
|
||||||
--probe (-p): bool # Flash & run using probe-run instead of elf2uf2
|
|
||||||
] {
|
|
||||||
if $probe == true {
|
|
||||||
cargo build --bin $bin
|
|
||||||
probe-run --chip RP2040 --speed 4000 ("./target/thumbv6m-none-eabi/debug/" + $bin)
|
|
||||||
} else {
|
|
||||||
cargo run --bin $bin
|
|
||||||
}
|
|
||||||
|
|
||||||
let log_script = ($env.FILE_PWD | path join "serial-logs")
|
|
||||||
|
|
||||||
if $serial == null {
|
|
||||||
nu $log_script
|
|
||||||
} else {
|
|
||||||
nu $log_script --serial $serial
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user