TinyGo v0.16.0 Release Notes

Release Date: 2020-11-18 // 3 months ago
  • ๐Ÿš€ This is the next release of TinyGo, this time featuring the addition of the Teensy 4.0 and the addition of initial WASI support, apart from numerous fixes and improvements (such as improved tinygo test support). See the full changelog below.

    • command-line
      • add initial support for LLVM 11
      • make lib64 clang include path check more robust
      • build: improve support for GOARCH=386 and add tests
      • gdb: add support for qemu-user targets
      • test: support non-host tests
      • test: add support for -c and -o flags
      • test: implement some benchmark stubs
    • compiler
      • builder: improve detection of clang on Fedora
      • compiler: fix floating point comparison bugs
      • compiler: implement negate for complex numbers
      • loader: fix linkname in test binaries
      • transform: add missing return pointer restore for regular coroutine tail calls
    • standard library
      • machine: switch default frequency to 4MHz
      • machine: clarify caller's responsibility in SetInterrupt
      • os: add LookupEnv() stub
      • reflect: implement Swapper
      • runtime: fix UTF-8 decoding
      • runtime: gc: use raw stack access whenever possible
      • runtime: use dedicated printfloat32
      • runtime: allow ranging over a nil map
      • runtime: avoid device/nxp dependency in HardFault handler
      • testing: implement dummy Helper method
      • testing: add Run method
    • targets
      • arm64: add support for SVCall intrinsic
      • atsamd51: avoid panic when configuring SPI with SDI=NoPin
      • avr: properly support the .rodata section
      • esp8266: implement Pin.Get function
      • nintendoswitch: fix crash when printing long lines (> 120)
      • nintendoswitch: add env parser and removed unused stuff
      • nrf: add I2C error checking
      • nrf: give more flexibility in picking SPI speeds
      • nrf: fix nrf52832 flash size
      • stm32f103: support wakeups from interrupts
      • stm32f405: add SPI support
      • stm32f405: add I2C support
      • wasi: add support for this target
      • wasi: use 'generic' ABI by default
      • wasi: remove --no-threads flag from wasm-ld
      • wasm: add instanceof support for WebAssembly
      • wasm: use fixed length buffer for putchar
    • boards
      • d1mini: add this ESP8266 based board
      • esp32: use board definitions instead of chip names
      • qtpy: add board definition for Adafruit QTPy
      • teensy40: add this board

Previous changes from v0.15.0

  • ๐Ÿš€ 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.

    • command-line
      • add cached GOROOT to info subcommand
      • embed git-hash in tinygo-dev executable
      • implement tinygo targets to list usable targets
      • use simpler file copy instead of file renaming to avoid issues on nrf52840 UF2 bootloaders
      • use ToSlash() to specify program path
      • support flashing esp32/esp8266 directly from tinygo
      • when flashing call PortReset only on other than openocd
    • compiler
      • compileopts: add support for custom binary formats
      • compiler: improve display of goroutine wrappers
      • interp: don't panic in the Store method
      • interp: replace some panics with error messages
      • interp: show error line in first line of the traceback
      • loader: be more robust when creating the cached GOROOT
      • loader: rewrite/refactor much of the code to use go list directly
      • loader: use ioutil.TempDir to create a temporary directory
      • stacksize: deal with DW_CFA_advance_loc1
    • standard library
      • runtime: use waitForEvents when appropriate
    • wasm
      • wasm: Remove --no-threads from wasm-ld calls.
      • wasm: update wasi-libc dependency
    • targets
      • arduino-mega2560: fix flashing on Windows
      • arm: automatically determine stack sizes
      • arm64: make dynamic loader structs and constants private
      • avr: configure emulator in board files
      • cortexm: fix stack size calculation with interrupts
      • flash: add openocd settings to atsamd21 / atsamd51
      • flash: add openocd settings to nrf5
      • microbit: reelboard: flash using OpenOCD when needed
      • nintendoswitch: Add dynamic loader for runtime loading PIE sections
      • nintendoswitch: fix import cycle on dynamic_arm64.go
      • nintendoswitch: Fix invalid memory read / write in print calls
      • nintendoswitch: simplified assembly code
      • nintendoswitch: support outputting .nro files directly
    • boards
      • arduino-zero: Adding support for the Arduino Zero (#1365)
      • atsamd2x: fix BAUD value
      • atsamd5x: fix BAUD value
      • bluepill: Enable stm32's USART2 for the board and map it to UART1 tinygo's device
      • device/atsamd51x: add all remaining bitfield values for PCHCTRLm Mapping
      • esp32: add libgcc ROM functions to linker script
      • esp32: add SPI support
      • esp32: add support for basic GPIO
      • esp32: add support for the Espressif ESP32 chip
      • esp32: configure the I/O matrix for GPIO pins
      • esp32: export machine.PortMask* for bitbanging implementations
      • esp8266: add support for this chip
      • machine/atsamd51x,runtime/atsamd51x: fixes needed for full support for all PWM pins. Also adds some useful constants to clarify peripheral clock usage
      • machine/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 Bluefruit
      • nrf: call sd_app_evt_wait when the SoftDevice is enabled
      • nrf52840: add build tags for SoftDevice support
      • nrf52840: use higher priority for USB-CDC code
      • runtime/atsamd51x: use PCHCTRL_GCLK_SERCOMX_SLOW for setting clocks on all SERCOM ports
      • stm32f405: add basic UART handler
      • stm32f405: add STM32F405 machine/runtime, and new board/target feather-stm32f405
    • ๐Ÿ— build
      • all: run test binaries in the correct directory
      • build: Fix arch release job
      • ci: run tinygo test for known-working packages
      • ci: set git-fetch-depth to 1
      • docker: fix the problem with the wasm build (#1357)
      • Makefile: check whether submodules have been downloaded in some common cases
    • ๐Ÿ“„ docs
      • add ESP32, ESP8266, and Adafruit Feather STM32F405 to list of supported boards