Add dispatch loop, copy_to_ram, retry picotool load without sleep
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user