mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
esp32: support flashing directly from tinygo
Right now this requires setting the -port parameter, but other than that it totally works (if esptool.py is installed). It works by converting the ELF file to the custom ESP32 image format and flashing that using esptool.py.
This commit is contained in:
committed by
Ron Evans
parent
9a17698d6a
commit
0df4a7a35f
@@ -279,6 +279,13 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(stri
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
case "esp32":
|
||||
// Special format for the ESP32 chip (parsed by the ROM bootloader).
|
||||
tmppath = filepath.Join(dir, "main"+outext)
|
||||
err := makeESP32FirmareImage(executable, tmppath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("unknown output binary format: %s", outputBinaryFormat)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user