Skip to content

Commit 5390f61

Browse files
facchinmumbynosper1234
authored
Add verify to picotool load command (#6)
* Add verify to picotool load command This is needed to debug early flash failures * Update main.go Co-authored-by: per1234 <[email protected]> * Verify flash only if specified from commandline Co-authored-by: Umberto Baldi <[email protected]> Co-authored-by: per1234 <[email protected]>
1 parent 0cf0d0a commit 5390f61

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
var (
1616
verbose = flag.Bool("v", false, "Show verbose logging")
1717
binary = flag.String("D", "", "Path of the elf file to load")
18+
verify = flag.Bool("y", false, "Verify flash after upload")
1819
version = "0.0.0-dev" // CI will take care of it
1920
)
2021

@@ -51,7 +52,11 @@ func main() {
5152
os.Exit(1)
5253
}
5354

54-
load := []string{filepath.Join(path, "picotool"), "load", *binary + ".uf2"}
55+
load := []string{filepath.Join(path, "picotool"), "load"}
56+
if *verify {
57+
load = append(load, "-v")
58+
}
59+
load = append(load, *binary+".uf2")
5560
err, _, _ = launchCommandAndWaitForOutput(load, true, false)
5661
if err != nil {
5762
fmt.Println("")

0 commit comments

Comments
 (0)