All Projects → tinygo-org → Tinygo

tinygo-org / Tinygo

Licence: other
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.

Programming Languages

go
31211 projects - #10 most used programming language
assembly
5116 projects
Makefile
30231 projects
C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Tinygo

tinyfont
Text library for TinyGo displays
Stars: ✭ 37 (-99.59%)
Mutual labels:  arm, microcontroller, gpio, i2c, adafruit, stm32, spi, microbit, nrf52, samd21, nrf51, nrf52840, tinygo
Nf Interpreter
⚙️ nanoFramework Interpreter, CLR, HAL, PAL and reference target boards
Stars: ✭ 168 (-98.15%)
Mutual labels:  stm32, microcontroller, spi, i2c, gpio
terminal
Terminal inside the microcontroller (cli for mcu)
Stars: ✭ 31 (-99.66%)
Mutual labels:  avr, arm, microcontroller, stm32
Diozero
Java Device I/O library that is portable across Single Board Computers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
Stars: ✭ 167 (-98.16%)
Mutual labels:  arduino, spi, i2c, gpio
Xpcc
DEPRECATED, use our successor library https://modm.io instead
Stars: ✭ 177 (-98.05%)
Mutual labels:  arm, stm32, microcontroller, avr
Johnny Five
JavaScript Robotics and IoT programming framework, developed at Bocoup.
Stars: ✭ 12,498 (+37.83%)
Mutual labels:  arduino, spi, i2c, gpio
Blog
A set of various projects based on ESP8266, ESP32, ATtiny13, ATtiny85, ATtiny2313, ATmega8, ATmega328, ATmega32, STM32 and more.
Stars: ✭ 198 (-97.82%)
Mutual labels:  arduino, stm32, microcontroller, avr
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (-99.56%)
Mutual labels:  i2c, stm32, spi, nrf52840
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (-38.92%)
Mutual labels:  arduino, arm, microcontroller, avr
Ssd1306
Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
Stars: ✭ 303 (-96.66%)
Mutual labels:  arduino, spi, i2c
Elixir ale
Interact with hardware in Elixir - GPIOs, I2C and SPI
Stars: ✭ 336 (-96.29%)
Mutual labels:  spi, i2c, gpio
Lucet
Lucet, the Sandboxing WebAssembly Compiler.
Stars: ✭ 4,006 (-55.82%)
Mutual labels:  webassembly, wasm, wasi
SinricPro Generic
Simple way to control your IOT development boards like ESP8226, ESP32, Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE with Amazon Alexa or Google Home
Stars: ✭ 18 (-99.8%)
Mutual labels:  stm32, nrf52, samd21
node-wasi
WASI for Node.js
Stars: ✭ 64 (-99.29%)
Mutual labels:  webassembly, wasm, wasi
Modm
modm: a C++20 library generator for AVR and ARM Cortex-M devices
Stars: ✭ 375 (-95.86%)
Mutual labels:  stm32, microcontroller, avr
vmrp
mrp emulator, virtual machine, mrp模拟器
Stars: ✭ 126 (-98.61%)
Mutual labels:  arm, webassembly, wasm
Mightycore
Arduino hardware package for ATmega1284, ATmega644, ATmega324, ATmega324PB, ATmega164, ATmega32, ATmega16 and ATmega8535
Stars: ✭ 413 (-95.45%)
Mutual labels:  arduino, microcontroller, avr
Rppal
A Rust library that provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART peripherals.
Stars: ✭ 463 (-94.89%)
Mutual labels:  spi, i2c, gpio
ugo-compiler-book
📚 µGo语言实现(从头开发一个迷你Go语言编译器)[Go版本+Rust版本]
Stars: ✭ 996 (-89.02%)
Mutual labels:  llvm, webassembly, wasm
Cylon
JavaScript framework for robotics, drones, and the Internet of Things (IoT)
Stars: ✭ 3,862 (-57.41%)
Mutual labels:  arduino, i2c, gpio

TinyGo - Go compiler for small places

CircleCI Build Status

TinyGo is a Go compiler intended for use in small places such as microcontrollers, WebAssembly (Wasm), and command-line tools.

It reuses libraries used by the Go language tools alongside LLVM to provide an alternative way to compile programs written in the Go programming language.

Here is an example program that blinks the built-in LED when run directly on any supported board with onboard LED:

package main

import (
    "machine"
    "time"
)

func main() {
    led := machine.LED
    led.Configure(machine.PinConfig{Mode: machine.PinOutput})
    for {
        led.Low()
        time.Sleep(time.Millisecond * 1000)

        led.High()
        time.Sleep(time.Millisecond * 1000)
    }
}

The above program can be compiled and run without modification on an Arduino Uno, an Adafruit ItsyBitsy M0, or any of the supported boards that have a built-in LED, just by setting the correct TinyGo compiler target. For example, this compiles and flashes an Arduino Uno:

tinygo flash -target arduino examples/blinky1

Installation

See the getting started instructions for information on how to install TinyGo, as well as how to run the TinyGo compiler using our Docker container.

Supported boards/targets

You can compile TinyGo programs for microcontrollers, WebAssembly and Linux.

The following 71 microcontroller boards are currently supported:

For more information, see this list of boards. Pull requests for additional support are welcome!

Currently supported features:

For a description of currently supported Go language features, please see https://tinygo.org/lang-support/.

Documentation

Documentation is located on our web site at https://tinygo.org/.

You can find the web site code at https://github.com/tinygo-org/tinygo-site.

Getting help

If you're looking for a more interactive way to discuss TinyGo usage or development, we have a #TinyGo channel on the Gophers Slack.

If you need an invitation for the Gophers Slack, you can generate one here which should arrive fairly quickly (under 1 min): https://invite.slack.golangbridge.org

Contributing

Your contributions are welcome!

Please take a look at our CONTRIBUTING.md document for details.

Project Scope

Goals:

  • Have very small binary sizes. Don't pay for what you don't use.
  • Support for most common microcontroller boards.
  • Be usable on the web using WebAssembly.
  • Good CGo support, with no more overhead than a regular function call.
  • Support most standard library packages and compile most Go code without modification.

Non-goals:

  • Using more than one core.
  • Be efficient while using zillions of goroutines. However, good goroutine support is certainly a goal.
  • Be as fast as gc. However, LLVM will probably be better at optimizing certain things so TinyGo might actually turn out to be faster for number crunching.
  • Be able to compile every Go program out there.

Why this project exists

We never expected Go to be an embedded language and so its got serious problems...

-- Rob Pike, GopherCon 2014 Opening Keynote

TinyGo is a project to bring Go to microcontrollers and small systems with a single processor core. It is similar to emgo but a major difference is that we want to keep the Go memory model (which implies garbage collection of some sort). Another difference is that TinyGo uses LLVM internally instead of emitting C, which hopefully leads to smaller and more efficient code and certainly leads to more flexibility.

The original reasoning was: if Python can run on microcontrollers, then certainly Go should be able to run on even lower level micros.

License

This project is licensed under the BSD 3-clause license, just like the Go project itself.

Some code has been copied from the LLVM project and is therefore licensed under a variant of the Apache 2.0 license. This has been clearly indicated in the header of these files.

Some code has been copied and/or ported from Paul Stoffregen's Teensy libraries and is therefore licensed under PJRC's license. This has been clearly indicated in the header of these files.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].