Add dispatch loop, copy_to_ram, retry picotool load without sleep

This commit is contained in:
Ian Gulliver
2026-04-06 17:36:41 +09:00
parent b197f0bfa7
commit 00b960d81d
7 changed files with 87 additions and 116 deletions

View File

@@ -112,18 +112,6 @@ func run(buildDir string) error {
}
}
for i := range 2 {
wg.Go(func() {
errs[i] = picotool.WaitForBootsel(serials[i], 10*time.Second)
})
}
wg.Wait()
for i, err := range errs {
if err != nil {
return fmt.Errorf("wait %s: %w", serials[i], err)
}
}
uf2s := []string{
filepath.Join(buildDir, "picomap.uf2"),
filepath.Join(buildDir, "picomap_test.uf2"),
@@ -132,7 +120,7 @@ func run(buildDir string) error {
fmt.Println("Loading firmware...")
for i := range 2 {
wg.Go(func() {
errs[i] = picotool.Load(uf2s[i], serials[i])
errs[i] = picotool.Load(uf2s[i], serials[i], 10*time.Second)
})
}
wg.Wait()