Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
This is a very major release that adds some long-awaited capabilities to TinyGo, like support for Bluetooth Low Energy via the Nordic Semiconductor nRF51/nRF52. and also support for the Espressif ESP32/ESP8266.
compileopts
: add support for custom binary formatscompiler
: improve display of goroutine wrappersinterp
: don't panic in the Store methodinterp
: replace some panics with error messagesinterp
: show error line in first line of the tracebackloader
: be more robust when creating the cached GOROOTloader
: rewrite/refactor much of the code to use go list directlyloader
: use ioutil.TempDir to create a temporary directorystacksize
: deal with DW_CFA_advance_loc1runtime
: use waitForEvents when appropriatewasm
: Remove --no-threads from wasm-ld calls.wasm
: update wasi-libc dependencyarduino-mega2560
: fix flashing on Windowsarm
: automatically determine stack sizesarm64
: make dynamic loader structs and constants privateavr
: configure emulator in board filescortexm
: fix stack size calculation with interruptsflash
: add openocd settings to atsamd21 / atsamd51flash
: add openocd settings to nrf5microbit
: reelboard: flash using OpenOCD when needednintendoswitch
: Add dynamic loader for runtime loading PIE sectionsnintendoswitch
: fix import cycle on dynamic_arm64.gonintendoswitch
: Fix invalid memory read / write in print callsnintendoswitch
: simplified assembly codenintendoswitch
: support outputting .nro files directlyarduino-zero
: Adding support for the Arduino Zero (#1365)atsamd2x
: fix BAUD valueatsamd5x
: fix BAUD valuebluepill
: Enable stm32's USART2 for the board and map it to UART1 tinygo's devicedevice/atsamd51x
: add all remaining bitfield values for PCHCTRLm Mappingesp32
: add libgcc ROM functions to linker scriptesp32
: add SPI supportesp32
: add support for basic GPIOesp32
: add support for the Espressif ESP32 chipesp32
: configure the I/O matrix for GPIO pinsesp32
: export machine.PortMask* for bitbanging implementationsesp8266
: add support for this chipmachine/atsamd51x,runtime/atsamd51x
: fixes needed for full support for all PWM pins. Also adds some useful constants to clarify peripheral clock usagemachine/itsybitsy-nrf52840
: add support for Adafruit Itsybitsy nrf52840 (#1243)machine/stm32f4
: refactor common code and add new build tag stm32f4 (#1332)nrf
: add SoftDevice support for the Circuit Playground Bluefruitnrf
: call sd_app_evt_wait when the SoftDevice is enablednrf52840
: add build tags for SoftDevice supportnrf52840
: use higher priority for USB-CDC coderuntime/atsamd51x
: use PCHCTRL_GCLK_SERCOMX_SLOW for setting clocks on all SERCOM portsstm32f405
: add basic UART handlerstm32f405
: add STM32F405 machine/runtime, and new board/target feather-stm32f405all
: run test binaries in the correct directorybuild
: Fix arch release jobci
: run tinygo test
for known-working packagesci
: set git-fetch-depth to 1docker
: fix the problem with the wasm build (#1357)Makefile
: check whether submodules have been downloaded in some common casesThis is a patch release specifically for compatibility with Go 1.15.
This is a big release with lots of small improvements. Some of the highlights include Go module support and the support for channel operations in interrupts for a few chips. This release also includes support for a number of new boards: the Adafruit Feather nRF52840 Express, the Adafruit PyGamer, the Sipeed MAix BiT with a 64-bit RISC-V MCU, the Teensy 3.6, the Seed WioTerminal, and the Seeed Xiao. Perhaps more interesting, it includes initial support for the Nintendo Switch.
getDefaultPort()
on non-English Windows locales-gc=none
[]byte
slice conversionMOSI
->SDO
etc)internal/bytealg
: reimplement bytealg in pure Gointernal/task
: fix nil panic in (*internal/task.Stack).Popos
: add Args and stub it with mock dataos
: implement virtual filesystem supportreflect
: add Cap and Len support for map and chanruntime
: fix return address in scheduler on RISC-Vruntime
: avoid recursion in printuint64 functionruntime
: replace ReadRegister with AsmFull inline assemblyruntime
: fix compilation errors when using gc.extallocruntime
: add cap and len support for chansruntime
: refactor time handling (improving accuracy)runtime
: make channels work in interruptsruntime/interrupt
: add cross-chip disable/restore interrupt supportsync
: implement sync.Cond
sync
: add WaitGrouparm
: allow nesting in DisableInterrupts and EnableInterruptsarm
: make FPU configuraton consistentarm
: do not mask fault handlers in critical sectionsatmega2560
: fix pin mapping for pins D2, D5 and the L portatsamd
: return an error when an incorrect PWM pin is usedatsamd
: add support for pin change interruptsatsamd
: add DAC supportatsamd21
: add more ADC pinsatsamd51
: fix ROM / RAM size on atsamd51j20atsamd51
: add more pinsatsamd51
: add more ADC pinsatsamd51
: add pin change interrupt settingsatsamd51
: extend pinPadMappingarduino-nano33
: use (U)SB flag to ensure that device can be found when not on default portarduino-nano33
: remove (d)ebug flag to reduce console noise when flashingavr
: use standard pin numberingavr
: unify GPIO pin/port codeavr
: add support for PinInputPullupavr
: work around codegen bug in LLVM 10avr
: fix target triplefe310
: remove extra println left in by mistakefeather-nrf52840
: add support for the Feather nRF52840maixbit
: add board definition and dummy runtimenintendoswitch
: Add experimental Nintendo Switch support without CRTnrf
: expose the RAM base addressnrf
: add support for pin change interruptsnrf
: add microbit-s110v8 targetnrf
: fix bug in SPI.Txnrf
: support debugging the PCA10056pygamer
: add Adafruit PyGamer suportriscv
: fix interrupt configuration bugriscv
: disable linker relaxations during gp initstm32f4disco
: add new target with ST-Link v2.1 debuggerteensy36
: add Teensy 3.6 supportwasm
: fix event handlingwasm
: add --no-demangle linker optionwioterminal
: add support for the Seeed Wio Terminalxiao
: add support for the Seeed XIAOThis is a patch release that fixes a few bugs in the previous 0.13.0 release related to the GC and in support for the GameBoy Advance.
runtime
: do not put scheduler and GC code in the same sectionruntime
: copy stack scan assembly for GBAgameboy-advance
: always use ARM mode instead of Thumb modeThis new release adds support for Go 1.14 and LLVM 10. It fixes a number of compiler and runtime bugs and also has had some significant refactoring in goroutine support. Perhaps most visible is that USB-CDC now works on all major OSes (Windows, macOS, and Linux) so that you can flash Adafruit boards without manually entering the bootloader.
This release adds support for five new boards: the Adafruit CLUE, Arduino Mega 2560, and the Particle Argon, Boron and Xenon.
Note that this release requires Go 1.14 to support WebAssembly.
Here is a detailed list of changes with this release:
gdb-multiarch
for debugging Cortex-M chipstinygo run
with simavrabort
function as noreturndereferenceable_or_null
attribute to pointer parametersunsafe.Pointer
runtime.isnil
hackmemcpy
/memmove
/memzero
functions-fshort-enums
consistently-I
and -L
paths absolutemachine
: set the USB VID and PID to the manufacturer valuesmachine
: correct USB CDC composite descriptorsmachine
: move errors.New
calls to globalsruntime
: support operations on nil mapsruntime
: fix copy builtin return value on AVRruntime
: refactor goroutinesruntime
: support -scheduler=none
on most platformsruntime
: run package initialization in the main goroutineruntime
: export malloc
/ free
for use from Cruntime
: add garbage collector that uses an external allocatorruntime
: scan callee-saved registers while marking the stackruntime
: remove recursion from conservative GCruntime
: fix blocking select on nil channelruntime/volatile
: include ReplaceBits
methodsync
: implement trivial sync.Map
arm
: use -fomit-frame-pointer
atmega1284
: support this chip for testing purposesatsamd51
: make QSPI available on all boardsatsamd51
: add support for ADC1atsamd51
: use new interrupt registration in UART codeattiny
: clean up pin definitionsavr
: use the correct RAM start addressavr
: pass the correct -mmcu
flag to the linkeravr
: add support for tasks scheduler (disabled by default)avr
: fix linker problem with overlapping program/data areasnrf
: fix typo in pin configuration optionsnrf
: add lib/nrfx/mdk to include dirsnrf52840
: implement USB-CDCriscv
: implement VirtIO target and add RISC-V integration testriscv
: add I2C support for the HiFive1 rev B boardstm32
: refactor GPIO pin handlingstm32
: refactor UART codestm32f4
: add SPIwasm
: support Go 1.14 (breaking previous versions)wasm
: support syscall/js.CopyBytesToJS
wasm
: sync polyfills from Go 1.14.arduino-mega2560
: add the Arduino Mega 2560clue-alpha
: add the Adafruit CLUE Alphagameboy-advance
: enable debugging with GDBparticle-argon
: add the Particle Argon boardparticle-boron
: add the Particle Boron boardparticle-xenon
: add the Particle Xenon boardreelboard
: add reelboard-s140v7
SoftDevice targetThis release incorporates a ton of smaller changes over more than a month. Notable changes are the addition of 3 new boards (Adafruit PyPortal, Adafruit Circuit Playground Bluefruit, Arduino Nano), improved support for interrupts, improved CGo support, and a number of improvements for the atsamd51 chip (for "M4" branded boards). Take a look below for a more detailed list of changes.
types.Invalid
#define
machine
: avoid bytes package in USB logicruntime
: fix external address declarationsruntime
: provide implementation for internal/bytealg.IndexByte
atsamd51
: fix volatile usageatsamd51
: fix ADC, updating to 12-bits precisionatsamd51
: refactor SPI pin configuration to only look at pin numbersatsamd51
: switch UART to use new pin configurationatsamd51
: fix obvious bug in I2C codeatsamd51
: use only the necessary UART interruptsatsamd51
: refactor I2C pin handling to auto-detect pin modeavr
: use a garbage collectorfe310
: use CLINT peripheral for timekeepingfe310
: add support for PLIC interruptsfe310
: implement UART receive interruptsriscv
: support sleeping in QEMUriscv
: add bare-bones interrupt supportriscv
: print exception PC and codewasm
: implement memcpy and memsetwasm
: include wasi-libcwasm
: use wasi ABI for basic startup/stdoutarduino
: make avrdude command line compatible with Windowsarduino-nano
: add this boardarduino-nano33
: fix UART1 and UART2circuitplay-bluefruit
: add this boarddigispark
: add clock speed and pin mappingsgameboy-advance
: include compiler-rt in buildgameboy-advance
: implement interrupt handlerhifive1b
: add support for gdb subcommandpyportal
: add this boardpyportal
: remove manual SPI pin mapping as now handled by defaultThis release includes a few significant usability improvements: it bundles Clang in the release tarball, auto-detects the serial port on macOS, and adds support for tinygo flash
on Windows. There are also other changes, such as the addition of the Adafruit PyBadge and a critical fix to RISC-V support.
gdb
subcommandtinygo flash
directly by using win32 wmimachine
: add support for SPI.Tx()
on play.tinygo.orgmachine
: rename CPU_FREQUENCY
to CPUFrequency()
adafruit-pybadge
: add Adafruit Pybadgearduino-nano33
: allow simulation on play.tinygo.orgarduino-nano33
: fix default SPI pin numbers to be D13/D11/D12circuitplay-express
: allow simulation on play.tinygo.orghifive1-qemu
: add target for testing RISC-V bare metal in QEMUriscv
: fix heap corruption due to changes in LLVM 9riscv
: add support for compiler-rtqemu
: rename to cortex-m-qemu
This release adds support for blocking select, switches to LLVM 9, improves CGo support, improves support for the ATSAMD51 ("M4") chip, and generally has a lot of improvements and bug fixes throughout. It also adds support for a number of new boards: the Adafruit Feather M4, the Adafruit Metro M4 Express AirLift, the PineTime dev kit, and the "X9 Pro" smartwatch.
gdb
subcommand-ocd-output
info
subcommand-programmer
flaglinkerscript
key to target JSON filestodo: store
panic#define
) as a real parsertype
"unsafe" imported but not used
error#cgo CFLAGS
reflect
: add implementation of array alignmentruntime
: improve scheduler performance when no goroutines are queuedruntime
: add blocking selectruntime
: implement interface equality in non-trivial casesruntime
: add AdjustTimeOffset to update current timeruntime
: only implement CountString for required platformsruntime
: use MSP/PSP registers for scheduling on Cortex-Marm
: add system timer registersatmega
: add port C GPIO supportatsamd21
: correct handling of pins >= 32atsamd21
: i2s initialization fixesatsamd51
: fix clock init codeatsamd51
: correct initialization for RTCatsamd51
: fix pin function selectionatsamd51
: pin method cleanupatsamd51
: allow setting pin mode for each of the SPI pinsatsamd51
: correct channel init and pin map for ADC based on ItsyBitsy-M4feather-m4
: add Adafruit Feather M4 boardhifive1b
: add support for SPI1hifive1b
: fix compiling in simulationlinux
: fix time on arm32metro-m4
: add support for Adafruit Metro M4 Express Airlift boardmetro-m4
: fixes for UART2pinetime-devkit0
: add support for the PineTime dev kitx9pro
: add support for this smartwatchpca10040-s132v6
: add support for SoftDevicepca10056-s140v7
: add support for SoftDevicearduino-nano33
: added SPI1 connected to NINA-W102 chip on Arduino Nano 33 IOThis release adds experimental support for Windows, updates to support Go 1.13, improves flashing experience of many boards (no more button pressing), and adds support for buffered channels. There are also lots of other smaller changes, see the list below.
tinygo env
tinygo env
//go:align
pragmamachine
: do not check for nil slices in SPI.Tx
reflectlite
: add support for Go 1.13runtime
: implement internal/bytealg.CountString
sync
: properly handle nil New
func in sync.Pool
arduino
: fix .bss section initializationfe310
: implement Pin.Get
gameboy-advance
: support directly outputting .gba filessamd
: reduce code size by avoiding reflectionsamd21
: do not hardcode pin numbers for peripheralsstm32f103
: avoid issue with time.Sleep
less than 200µsThis release improves reflect support, extends and improves the scheduler, and has a whole list of improvements to microcontroller boards. In particular, it adds supports for the ItsyBitsy M4, the NUCLEO-F103RB, and even adds some preliminary support for the GameBoy Advance.
-target
flag better to not panic on an invalid targets[:2:4]
[]rune
to string conversiongo
on func valuesreflect
: add support for named typesreflect
: add support for t.Bits()
reflect
: add basic support for t.AssignableTo()
reflect
: implement t.Align()
reflect
: add support for struct typesreflect
: fix bug in v.IsNil
and v.Pointer
for addressable valuesreflect
: implement support for array typesreflect
: implement t.Comparable()
runtime
: implement stack-based schedulerruntime
: fix bug in the sleep queue of the schedulerruntime
: implement memcpy
for Cortex-Mtesting
: implement stub testing.B
structtesting
: add common test logging methods such as Errorf/Fatalf/Printf386
: add support for linux/386 syscallsatsamd21
: make SPI pins configurable so that multiple SPI ports can be
usedatsamd21
: correct issue with invalid first reading coming from ADCatsamd21
: add support for reset-to-bootloader using 1200baud over USB-CDCatsamd21
: make pin selection more flexible for peripheralsatsamd21
: fix minimum delay in time.Sleep
atsamd51
: fix minimum delay in time.Sleep
nrf
: improve SPI write-only speed, by making use of double bufferingstm32f103
: fix SPI frequency selectionstm32f103
: add machine.Pin.Get method for reading GPIO valuesstm32f103
: allow board specific UART usagenucleo-f103rb
: add support for NUCLEO-F103RB boarditsybitsy-m4
: add support for this board with a SAMD51 family chipcortex-m
: add support for arm.SystemReset()
gameboy-advance
: add initial support for the GameBoy Advancewasm
: add //go:wasm-module
magic comment to set the wasm module namewasm
: add syscall/js.valueSetIndex
supportwasm
: add syscall/js.valueInvoke
support