TinyGo 0.45.0 adds runtime type creation, ESP32-P4 support and a watchdog package
TinyGo 0.45.0 makes the reflect package usable for building types and calling methods at runtime, while extending ESP32 family support to the ESP32-P4 and adding WiFi, PWM and SPI on the ESP32-C6.
Summary
The TinyGo project has published version 0.45.0, described as its largest release to date. TinyGo is a Go compiler targeting microcontrollers and WebAssembly, and this release focuses on closing gaps in the Go runtime and standard library that previously limited what firmware written in Go could do.
The most substantial change is a far more complete reflect package: programs can now construct new types at runtime, invoke functions and methods through Value.Call, and use channels. Compilation is also faster. On the hardware side the release brings initial ESP32-P4 support, working PSRAM on the ESP32 WROVER, capacitive touch on the ESP32, and WiFi, PWM and SPI on the ESP32-C6, plus a new watchdog package and new board targets including the Arduino Nano R4.
What changes in TinyGo 0.45.0
- Reflect package: Runtime type construction is now supported, so programs can create new types while running rather than only inspecting types fixed at compile time; Value.Call allows functions and methods to be invoked dynamically, and channels are functional.
- Compiler throughput: The release states that the compiler builds faster, reducing iteration time for firmware projects that previously paid a high cost on each rebuild.
- ESP32 family coverage: Initial support lands for the ESP32-P4, PSRAM is enabled on the ESP32 WROVER, capacitive touch works on the ESP32, and the ESP32-C6 gains WiFi, PWM and SPI peripherals.
- Watchdog package: A new watchdog package gives TinyGo programs a standard way to configure and service hardware watchdogs instead of relying on board-specific code.
- Board targets: New targets include the Arduino Nano R4, extending the set of boards TinyGo can build for out of the box.
Why it matters
A more complete reflect implementation removes one of the main reasons Go code and libraries could not be reused on microcontrollers, which matters for developers porting existing Go logic to embedded targets. The ESP32-P4 and ESP32-C6 peripheral work widens TinyGo's reach across Espressif's current chip lineup, a family already popular in open hardware designs. The watchdog package and additional board targets lower the amount of board-specific glue firmware authors must maintain themselves.
Original reference: blog.adafruit.com →