chore: update espflash to espflasher

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2026-03-08 15:49:43 +01:00
parent b81a7c2bca
commit d9f6f3b81f
3 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -32,7 +32,7 @@ import (
"github.com/tinygo-org/tinygo/goenv"
"github.com/tinygo-org/tinygo/loader"
"golang.org/x/tools/go/buildutil"
"tinygo.org/x/espflash/pkg/espflash"
"tinygo.org/x/espflasher/pkg/espflasher"
"tinygo.org/x/go-llvm"
"go.bug.st/serial"
@@ -1046,14 +1046,14 @@ const (
)
func flashBinUsingEsp32(port, resetMode, tmppath string, options *compileopts.Options) error {
var opts *espflash.FlasherOptions
var opts *espflasher.FlasherOptions
// On Windows, we have to explicitly specify the reset mode to use USB JTAG.
if runtime.GOOS == "windows" && resetMode == jtagReset {
opts = espflash.DefaultOptions()
opts.ResetMode = espflash.ResetUSBJTAG
opts = espflasher.DefaultOptions()
opts.ResetMode = espflasher.ResetUSBJTAG
}
flasher, err := espflash.NewFlasher(port, opts)
flasher, err := espflasher.New(port, opts)
if err != nil {
return err
}