Tinygo: ESP8266 WiFi support

Created on 7 Oct 2020  路  4Comments  路  Source: tinygo-org/tinygo

The docs (https://tinygo.org/microcontrollers/esp8266/) list that the ESP8266 WiFi feature is not supported by TinyGo.

Imo having this support is crucial for this board to make sense. What needs to be done so this can happen?

enhancement

Most helpful comment

Just wanted to comment and say how grateful I am for the tinygo project. I am truly terrible at c++, and I don鈥檛 like writing It, but I resonate with go. I鈥檓 really excited to do a project with an ESP chip and tinygo.

WiFi support would is HUGE. If I鈥檓 capable I鈥檇 be happy to help make it happen. But a major +1 to this request.

All 4 comments

Just wanted to comment and say how grateful I am for the tinygo project. I am truly terrible at c++, and I don鈥檛 like writing It, but I resonate with go. I鈥檓 really excited to do a project with an ESP chip and tinygo.

WiFi support would is HUGE. If I鈥檓 capable I鈥檇 be happy to help make it happen. But a major +1 to this request.

Unless, is it the case that we can use this driver to get WiFi functionality?

It looks like _theoretically_ you could use one esp8266 to control / use wifi over another esp8266 (over UART). The first esp8266 would use this driver to talk to the second esp8266 with the AT firmware (listed on driver's README).

Because I really want to write go on the esp8266, and because they are cheaper than something like the arduino nano 33 IoT, I may actually do this. I'll post code if I do.
Then I can always swap it out when tinygo supports the esp8266 wifi.

Imo having this support is crucial for this board to make sense. What needs to be done so this can happen?

Yes, I totally agree.
One of the first things is probably to get compiler-rt and picolibc to compile. They do appear to compile in the latest version of the Xtensa fork (Espressif pushed some bug fixes) but when testing the chip (at least the ESP32, didn't test the ESP8266 yet) the chip seems to hang.
Debugging this would be much easier with a proper debugger. I've ordered a FT2232 board to act as a JTAG debugger, so I should be able to see what's going on in a few weeks.

Also, for networking to work we'll also need:

  • interrupt support
  • a network goroutine/task (probably)

In other words, it'll require some low-level development.
If you would like to dive deep, you're very welcome to help out :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johanbrandhorst picture johanbrandhorst  路  7Comments

wdevore picture wdevore  路  5Comments

Nerzal picture Nerzal  路  5Comments

deadprogram picture deadprogram  路  9Comments

bradleypeabody picture bradleypeabody  路  7Comments