Release Of Tinygo 0.45, Go Compiler For Low-power Systems

Published release of the project Tinygo 0.45, developing a compiler for the Go language. The compiler is suitable for generating compact executable files for low-power systems such as microcontrollers and embedded devices, programs for which must consume minimal memory and computing resources. Compilation for supported target platforms is implemented using LLVM, and function libraries are borrowed from the main Go project toolkit. The code is distributed under the BSD license.

The compiled program can directly run on microcontrollers, which allows you to use the subset of the Go language to write automation scripts. More than one hundred microcontroller models are supported, including various boards from Adafruit, Arduino, BBC micro, ESP32, M5Stack, ST Micro, Digispark, Raspberry Pi Pico, Nordic Semiconductor, SiFive HiFive1, STM32, Makerdiary and Phytec. To interact with sensors and connected external devices, as well as to support interfaces such as I2C, GPIO and SPI, special drivers are provided.

Unlike the similar compiler emgo, which has not been updated recently four years old, tinygo retains the original Go memory management model using garbage collection, and instead of compiling to a C representation, uses LLVM to directly generate machine code. Programs can use existing standard Go code without modification, as well as most standard packages. In addition to generating machine code, tinygo provides support for generating WebAssembly bytecode with the ability to create stand-alone WebAssembly applications using the WASI interface (WebAssembly System Interface).

In the new version:

  • Implemented support for Waveshare ESP32-P4-NANO, Elecrow CrowPanel ESP32-P4, Adafruit ESP32-S3 Feather TFT and Arduino Nano R4 boards.
  • Added initial support for the ESP32-P4 microcontroller.
  • The ability to run a multi-core goroutine scheduler (-scheduler=cores) on the original ESP32 microcontroller has been implemented.
  • For ESP32 WROVER, ESP32-S3 Octal and Pimoroni Pico Plus 2 boards, PSRAM support has been implemented.
  • For SoC ESP32-C6, support for WiFi, PWM, SPI and flash memory.
  • The capabilities associated with the support of the reflect package have been expanded, for example, you can now create new types using the StructOf, FuncOf and MapOf functions, call functions and methods through Value.Call and MakeFunc, and also use channels.
  • In the os The launch of processes in Linux using the posix_spawn function has been ensured, which made it possible to implement full support for the Wait, Kill and Signal functions.
/Reports, release notes, official announcements.