TinyGo is a Go compiler for producing small executables on microcontrollers and other resource-constrained devices. It is source compatible with Go, but its smaller standard library means that networking, cryptography, runtime, reflect, and other features may require changes or may behave differently. section 12.3 section 12.4
Use TinyGo to:
- Compile Go programs for microcontrollers with very limited CPU and memory. section 12.0 section 12.3
- Target WebAssembly as well as embedded and IoT hardware. section 12.3
- Map hardware pins through TinyGo’s machine library and connect LEDs, sensors, and other components. section 12.4
- Debug through USB print statements, Delve, the GDB-based TinyGo debugger, or a connected debug probe. section 12.3.3
Flashing an Arduino Nano 33 IoT
After compiling a TinyGo program for the target board, flash it through the board’s serial port with: tinygo flash -target=arduino-nano33 -port=/dev/ttyUSB0. Without a physical board, the TinyGo playground emulates a microcontroller with virtual LEDs. section 12.3.3 section 12.3
> tinygo flash -target=arduino-nano33 -port=/dev/ttyUSB0
Use the deployment command as a starting point for flashing TinyGo programs to an Arduino Nano 33 IoT. section 12.3.3
