Конвертор кода: Go -> C++ и Python (форк https://github.com/andygeiss/esp32-transpiler)
Найти файл
2024-01-22 04:02:35 +03:00
cmd/go-tr Пакеты переименованы в service* и задвинуты в pkg 2024-01-22 01:35:39 +03:00
pkg Сценарий: Структура с полем 2024-01-22 04:02:35 +03:00
.travis.yml cleanup & refactoring 2020-01-10 19:54:17 +01:00
go.mod Добавлены godog тесты 2024-01-22 02:50:27 +03:00
go.sum Добавлены godog тесты 2024-01-22 02:50:27 +03:00
Magefile.go Сборка без дебаг символов 2022-12-08 05:17:33 +03:00
README.md Update README.md 2021-07-19 13:06:31 +02:00

ESP32 Transpiler

Go Report Card Build Status BCH compliance

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.

Installation

go get -u github.com/andygeiss/esp32-transpiler

Usage

Usage of esp32-transpiler:
  -source string
        Golang source file
  -target string
        Arduino sketch file