Awesome Go

esp32

CategoryGo Compilers
SubcategoryGo Compilers
Stars0

Transpile Go into Arduino code

About esp32

ESP32 Transpiler

License Releases Go Report Card Maintainability

Purpose

The Arduino IDE is easy to use. But I faced problems like maintainability and testability at more complicated IoT projects. I needed to compile and flash the ESP32 before testing my code functionality by doing it 100% manually.

This solution transpiles Golang into Arduino code, which can be compiled to an image by using the ESP32 toolchain. Now I am able to use a fully automated testing approach instead of doing it 100% manually.

Important:

The Transpiler only supports a small subset of the Golang Language Specification. Look at the mapping and the tests to get the current functionality. It is also not possible to trigger the C/C++ Garbage Collection, because Golang handles it automatically "under the hood". Go strings will be transpiled to C constant char arrays, which could be handled on the stack.

Prerequisites

  1. Install the latest version of Go.
  2. Install the latest version of Just.
  3. Include $HOME/bin in your $PATH.

Installation

Clone the repository and install the esp32-transpiler binary into $HOME/bin:

just install

Usage

Transpile a Golang source file into an Arduino sketch file:

    esp32-transpiler -source my_source.go -target my_target.ino

Frequently Asked Questions

What is esp32?

esp32 is a Go Compilers library for the Go programming language. Transpile Go into Arduino code

How do I install esp32?

Install esp32 with the Go module system using `go get andygeiss/esp32-transpiler`. Check the repository for the current installation instructions.

What category does esp32 belong to?

esp32 is listed under Go Compilers, specifically Go Compilers.

← Back to Go Compilers