I'm trying to make a simple Hello World with tinygo and esp32, but I get an error when I upload it. In that context, a hello world would be a led blink.
`
package main
import (
"machine"
"time"
)
func main() {
println("START")
var pin machine.Pin = 2
pin.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
pin.Low()
time.Sleep(time.Millisecond * 500)
pin.High()
time.Sleep(time.Millisecond * 500)
}
}
`
to upload it to the esp32, I'm using:
tinygo flash -target=esp32-coreboard-v2 -port=/dev/ttyUSB0 test1.go
(test1 is the name of the file). Then the following error occurs:
`error: failed to link /tmp/tinygo456060352/main: exec: "xtensa-esp32-elf-ld": executable file not found in $PATH
How can I fix it ?`
I tried exposing the global path and changing the usb port of the esp32. I was expecting that the code would be uploaded.