TinyGo GO Compiler for Microcontrollers Now Works on Arduino Boards

Powerful, yet simple to use, TinyGo is making a significant mark in the open-hardware sector. This was well stated in the Arduino blog interview of Ron Evans, Technologist for Hire, as  Arduino is now working with TinyGo on an ongoing basis.

What is TinyGo?

The whole purpose of TinyGo is to bring Go to the microcontroller and the latest web browsers, to have that powerful language able to function in tiny processor formats, such as the Arduino Uno and Arm-based processors such as the Cortex-M type processors and also the BBC Micro: bit, STM32 Bluepill, and some other MCU boards, from any web browser.

How It Functions

It does this through LLVM toolchain and that format allows TinyGo to compile Go programs to a fraction of their original size, then flash the reduced Go program directly onto the microcontroller.

Web Browser Applications With WebAssembly

TinyGo can be used with WebAssembly (WASM) for applications that are browser-based, high-performance code. The use of TinyGo, through a JavaScript function, and then going to call a GO function from WebAssembly is straight forward. From there it is as simple as providing a target if TinyGo is already installed. GitHub is providing a number of files for multiple languages using TinyGo, including WASM (see link below)

How to run TinyGo

The compiler is very handy for developers, as the reduction in the overall size of the code, necessary to run Go, helps in those small places and processors where developers of commercial IoT are working. TinyGo can be installed on Linux, macOS, Windows, and Docker, as well as from the source code, found on GitHub.

Arduino and TinyGo

TinyGo can be paired with Arduino Nano 33 IoT, a board that hosts the Microchip SAMD21 Cortex-M0+ microcontroller, as well as a WiFi and Bluetooth module. There is a sample on GitHub of how TinyGo programs can be flashed to the board directly, where program execution is directly on the microcontroller.

Excellent Security Approaches

Security in development, deployment, and operations using TinyGo can be a boon in edge computing applications, which need a higher order of security. The code for TinyGo is compiled directly to binary, so code signing and many of the most utilized security methods and approaches can be performed.

Extra Security Ability

Also, device encryption is made between any device and any cloud storage or analytics. TinyGo and The Arduino Nano 33 IoT can use standard APIs for SSL communication to cloud services. The idea is to use an API like Eclipse Foundation’s Paho MQTT client for Go. That takes the guesswork out of when and where to make the system secure, it happens right upfront.

Information about programing using TinyGo can be found on the “Tiny Gopher” website where you can buy the book. Or read the Getting Started on the TinyGo website. TinyGo on GitHub has a lot of code for many different types of situations when using TinyGo.

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus

Memfault Embedded Device Reliability Platform
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
Weller PCB manufacturer