mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-11 06:59:31 +00:00
02021b5853
C malloc storage has explicit lifetime: it must remain allocated until free even when no GC-visible pointer references it. Treating it as an ordinary NoPtrs allocation breaks bare-metal C object graphs, while conservatively scanning arbitrary C bytes creates false Go roots. Add allocManual/freeManual so collectors can represent pointer-free, explicitly managed storage. Block GC keeps these objects permanently marked and releases their blocks on free; Boehm uses atomic uncollectable allocations; leaking and custom collectors provide equivalent behavior. Wasm keeps its allocation map only for validation and sizes, and WASIp2 realloc now copies min(oldSize, newSize). Bump the Boehm library cache version because enabling atomic uncollectable allocations changes its compiled flags and exported API. Also handle zero-size and overflowing allocations, serialize allocation registries, reject Go finalizers on manual storage, and add CGo regressions for C pointer graphs, hidden until-free allocations, repeated free/reuse, and allocation edge cases.
135 KiB
135 KiB
0.42.0
- general
- all: add LLVM 22 support, and support LLVM 19 and LLVM 20 on Fedora 43
- all: build and test using Go 1.27, and raise the max supported Go version to 1.27
- all: modernize and clean up code with Go 1.24+ in mind (#5489, #5498)
- all: use unsafe.SliceData where appropriate
- all: update golang.org/x/tools and go-llvm
- cli: add basic probe-rs support
- cli: clarify the runtime.alloc linker error with -gc=none
- main: allow the -o flag to point to a directory
- main: make the -monitor flag on flash respect the port
- main: update to espflasher 0.8.0 with fixes for esp32c3 and esp32s3
- cgo: add CGO_CFLAGS support (#5453)
- version: update to 0.42.0 for the new dev cycle
- docs: add agents.md guideline for use of ASD-STE100 (#5566)
- compiler
- compiler, runtime: make runtime, map, and channel panics recoverable
- compiler, runtime: support recover on riscv64
- compiler, runtime, reflect: generate type-specific hash/equal (#5359)
- support Go 1.27 generic methods via the x/tools upgrade
- canonicalize generic instance and method signature identities
- disambiguate function-local named types and generic instance link names (#5336)
- exclude generic methods from runtime method sets
- support file-level //go:linkname directives and the //go:linknamestd pragma
- add the //go:noheap pragma
- pass large aggregates by pointer
- use LLVM intrinsics for math trig operations
- optimize zero-sized allocations
- consistently pass layout and alignment to createAlloc
- handle nested unsigned shift being untyped after type resolution (#5497)
- store the defer list head in the defer frame and centralize deferred call records
- centralize SSA loads, stores, result handling, and LLVM function type construction
- transform, compiler: support the captures(none) attribute of LLVM 21
- compiler: make composite map hashes order dependent
- core
- reflect: add Type.ConvertibleTo and complex, rune, and integer string conversions
- reflect: implement MakeChan
- reflect: add missing iterator methods
- reflect, reflectlite: make IsRO and MakeRO package methods
- sync: add Map.CompareAndSwap and Map.CompareAndDelete
- sync: fix deadlock in the Map.Range callback
- os, syscall: add Statfs and Fstatfs stubs and Getpagesize for non-hosted targets
- os: add File.Chown on the unix path
- runtime, syscall, internal/poll, os: wasip1 poll_oneoff scheduler integration and net.FileListener (#5386)
- runtime, testing: support Goexit, SkipNow, and FailNow
- syscall: remove sliceHeader, use unsafe.SliceData more
- builder, cgo, syscall: replace fixed-size array casts with unsafe.Slice
- builder, loader: fix -ldflags -X not overriding variables with default values
- builder: build SSA before compiling packages
- builder: increase the stack size margin for automatic stack allocation
- builder: do not count non-writable SHT_NOBITS sections as RAM or bss
- builder: link stack probes on Windows amd64 and arm64, and add chkstk2.S for windows/386
- builder: add strlen to the wasm builtins
- builder: retry cached archive renames on Windows (#5462)
- loader: avoid a race condition when loading the package list, and skip object resolution
- interp: bail out of loops that iterate too many times (#5395)
- interp: fix partial store aliasing and avoid repeated object clones
- interp: defer out-of-bounds loads to runtime instead of crashing
- interp: mark pointers in aggregate call operands as external
- interp: fix switch-instruction handling for the new case-value API of LLVM 22
- transform: follow returned pointer and aggregate alloc aliases
- transform: add -print-allocs-cover and restore the -print-allocs reason output
- device: add device/uefi and device/amd64
- wasm: patch wasm_exec.js and wasm_exec_node.js from Go 1.18+ (#5483)
- net
- update the net module with a roundtrip fix for js/wasm
- runtime
- make divide-by-zero and nil dereference panics recoverable
- add a Windows vectored exception handler for recoverable panics
- make Goexit exit host threads, and encode a pending Goexit in the panic state
- make out-of-memory and fatal failures unrecoverable
- improve the hardfault handler and stack reporting on Cortex-M
- prevent timer starvation in the cores scheduler
- do not access the timer queue outside of the lock
- fix ticker not stopping when Stop races with its callback (#5487)
- wake channel waiters after releasing locks (#5513)
- implement SetFinalizer and run syscall/js finalizers without a manual GC (#5545)
- implement MemStats.NumGC
- add runtime.fastrandn (#5502)
- make arrays and struct field hashes order dependent
- add critical-section fallbacks for atomic And and Or
- gc: pause all cores before scanning the stack and globals
- gc: correct the old size calculation in block realloc
- gc: correct the leaking allocator bounds and overflow checks
- gc: move objHeader to the end of the block header
- cgo: keep malloc allocations alive until free and stop the program for invalid or repeated free calls
- fix the leaking GC build with the cores scheduler
- rp2040: fix -gc=leaking and -gc=none
- rp2: handle the RP2350 shared FIFO IRQ for GC (#5482)
- esp32c6: select the 80MHz PLL as the TIMG0 timer clock source
- split baremetal memory setup and the Windows PE globals scan for UEFI (#5360, #5361)
- machine
- usb: support bidirectional endpoints by dynamic registration on RP2, SAMD21/51, and nRF52840 (#5447)
- usb: generate endpoint descriptors dynamically
- usb: implement endpoint stall for nRF52840
- usb: fix a truncated string descriptor when the host requests a short maxLen (#5449)
- usb: add USBDevice.Attach and USBDevice.Detach (#5563)
- usb/cdc: fix the RP2 USB CDC TX race with the cores scheduler (#5391)
- add UART line inversion support (#5522)
- optimize RTT initialization
- device/arm: add ARM v7-M MPU support
- esp32: add interrupt support with vector table, timer alarm, and GPIO SetInterrupt
- esp32: add interrupt-based UART RX and fix the init order
- esp32: implement flash XIP (execute-in-place) support
- esp32: add ADC driver (#5595)
- esp32: fix pullup and pulldown on RTC GPIO pins
- esp32: remove dead code and fix GC root scanning
- esp32: configure UARTs to the specified pins and yield while waiting for the buffer
- esp32, esp32s3: fix the boot crash caused by the LLVM 22 lld l32r relocation bug
- esp32s3: fix register-window corruption under interrupt load
- esp32s3: add temperature reading
- esp32c6: add a minimal implementation with I2C and ADC support
- stm32: fix UART transmission, baud rate, and interrupt handling
- stm32: add an OTG FS USB driver for F4 and F7
- stm32: add STM32H7 and NUCLEO-H753ZI support
- stm32: add support for the STM32U031 chip
- stm32: make the HSE crystal frequency selectable
- stm32u5: configure the system clock to 160 MHz
- nrf: avoid a too high priority interrupt on SoftDevice
- rp2: allow SPI transmit-only without SDI (#5437)
- rp2: clear the USB buffer status before the endpoint handlers
- rp2350: fix the ROM CS control for the RP2350 ROM code
- add GP aliases for waveshare-rp2040-zero
- gba: add support for mGBA debugging
- gba: add bios interrupt flags and sound register constants (#5445)
- targets
- add minimal uefi target support with the LinkerFlavor option (#5452, #5465)
- uefi: add support for UEFI time and events, fix STOP newline conversion (#5549)
- uefi: add support for the tasks scheduler and make it the default (#5553)
- add Puya PY32F MCU support (#5106)
- add esp32s3-box-3 (#5388)
- add M5Stack Stamp-S3A (#5524)
- add Pimoroni Blinky 2350 and Badger 2350 (#5434)
- add the 'Plus' board variant of SeeedStudio XIAO nrf52840 (#5479)
- esp32: adjust memory usage, add DRAM1 sections, and export the symbols needed for wifi
- esp32c3: add the BT ROM functions to the linker
- esp32: add the espradio tag for convenience
- builder: fix esp32 XIP so large programs flash correctly, including QEMU image offsets
- wasm_exec.js: add runtime.getRandomData to the gojs imports, coerce memory offsets to unsigned, and reset _pendingEvent
- libs
- update macos-minimal-sdk to v0.1.0
- build/test
- ci: run the full smoke test once, and split the GNUmakefile (#5616)
- ci: publish a draft release from the artifacts that CI already built
- ci: stop the LLVM caches from being evicted
- ci: modify builds to use LLVM 22
- ci: add a check for compatibility with older Go and LLVM versions
- ci: add a job to make sure go.sum stays in sync with go.mod
- ci: re-add fmt-check, and remove the CircleCI configuration
- ci: adjust runner sizes for Linux, Windows, and macOS
- build: statically link the MinGW runtime in the LLVM tools on Windows
- Makefile: use ${LLVM_PROJECTDIR} during the copy phase
- GNUmakefile: disable DWARF compression for CGo objects, and update the stdlib test lists
- test: run ESP32 programs in QEMU
- test: support simavr 1.8+
- test: normalize LLVM IR when updating goldens
- test: convert TestBinarySize to a golden file test
- testdata: add regression tests for generic instances, generic aliases, and large aggregates
- test: skip flaky and Go 1.27 affected tests for now
0.41.1
- machine
- esp32c3: correct pin interrupt setup call that was overlooked from #5320
- runtime
- esp32s3: wait for TIMG0 update register to clear before reading timer registers
- net
- update net module to a version that is backwards compatible with Go 1.25.x to fix #5332
0.41.0
- general
- go.mod, compiler: bump minimum Go version to 1.23
- builder: support Go 1.26 now
- feat: add inheritable-only field to filter processor-level targets (#5270)
- feature: add esp32flash flash method for esp32s3/esp32c3/esp32/esp8266
- flashing: introduce flash method 'esp32jtag' for esp32c3/esp32s3 targets
- fashing: add "adb" flash method using Android Debug Bridge
- main: auto-use best available flashing options on esp32
- espflasher: update to espflasher 0.6.0
- compiler
- implement method-set based AssignableTo and Implements (#5304)
- simplify createObjectLayout
- implement copy directly
- fix min/max on floats by using intrinsics
- add element layout to sliceAppend
- add intrinsic for crypto/internal/constanttime.boolToUint8
- fix SyscallN handling for Windows on Go 1.26+
- core
- reflect: add TypeAssert
- reflect: fix TypeAssert for structs
- sync: add WaitGroup.Go
- os: add UserCacheDir and UserConfigDir
- os: implement Lchown function for changing file ownership (#5161)
- testing: add b.ReportMetric()
- errors: add errors package to passing list
- internal/gclayout: use correct lengths
- internal/abi: add EscapeNonString, EscapeToResultNonString
- internal, runtime: add internal fips bool
- internal/itoa: resurrect from Go stdlib
- internal/syscall/unix: implement GetRandom for WASI targets
- interp: make ptrtoint size mismatch a recoverable error
- loader: support "all:" prefix in //go:embed patterns
- loader, crypto/internal/entropy: fix 32 MiB RAM overflow on microcontrollers
- loader, unicode/utf8: fix hiBits overflow on 16-bit AVR targets
- builder: order embedded files deterministically
- builder: fix panic in findPackagePath when using -size short
- builder: fix SIGSEGV when stripping duplicate function definitions
- builder, runtime: fix duplicate symbol error with Go 1.26+ on Windows
- builder: use target-specific -march for RISC-V library compilation
- transform: modify output format from the -print-allocs flag to match the go coverage tool format
- cgo: allow for changes to 'short-enums' flag
- wasm: add more stubbed file operations
- machine
- esp32c3: implement BlockDevice for esp32c3 flash
- esp32c3: clear GPIO STATUS before dispatching pin callbacks
- esp32c3: implement USBDevice using interrupts
- esp32c3: add Enable stub for QEMU test target
- esp32c3: fix interrupt disable handling
- esp32c3: clear MCAUSE after handling interrupt
- esp32c3: map missing IRAM sections in linker script
- esp32c3: fix to use PROVIDE() for WiFi/BLE ROM function addresses to allow blob overrides
- esp32c3: add WiFi/BLE ROM linker support
- esp32c3: use TIMG0 alarm interrupt for sleepTicks instead of busy-waiting
- esp32s3: implement Pin.SetInterrupt for GPIO pin change interrupts
- esp32s3: use edge-triggered CPU interrupt for GPIO pin interrupts
- esp32s3: add interrupt support (#5244)
- esp32s3: switch USB implementation to use interrupts instead of polling
- esp32s3: replace inline ISR with full interrupt vector handler
- esp32s3: use TIMG0 alarm interrupt for sleepTicks
- esp32s3: improve exception handlers, add procPin/procUnpin, and linker wrap flags
- esp32s3: fix Xtensa register window spill using recursive call4 in task switching
- esp32s3: update linker script and boot assembly for multi-page flash XIP mapping
- esp32s3: add flash XIP boot assembly with cache/MMU init
- esp32s3: implement SPI (#5169)
- esp32s3: implement I2C interface (#5210)
- esp32s3: implement RNG based on onboard hardware random number generator
- esp32s3,esp32c3: add USB serial support
- esp32s3,esp32c3: add txStalled flag to skip USB serial spin when no host
- esp32s3,esp32c3: make USB Serial/JTAG writes non-blocking when FIFO is full
- esp32c3/esp32s3: refactor ADC implementation to reduce code duplication
- esp32s3,esp32c3: add ADC support (#5231)
- esp32s3,esp32c3: add PWM support (#5215)
- esp32c3/esp32s3: refactoring and corrections for SPI implementation
- esp32xx: add WASM simulator support for ESP32-C3/ESP32-S3 targets
- esp32: default SPI CS pin to NoPin when unset
- esp: fix tinygo_scanCurrentStack to spill register windows
- stm32: fix UART interrupt storm caused by uncleared overrun error
- stm32: fix PWM problem due to register shifting
- stm32: add STM32U585 target definition and runtime
- stm32: add STM32U5 GPIO, pin interrupts, and UART support
- stm32: add STM32U5 I2C support
- stm32: add STM32U5 SPI support
- stm32u585: implement ADC
- stm32g0b1: add support (#5150)
- stm32g0b1: add Watchdog + ADC support (#5158)
- stm32l0: add flash support
- stm32l0x1,l0x2: TIM: adapt to 32-bit register access
- stm32g0: sync with updated stm32 device files
- attiny85: add USI-based SPI support (#5181)
- attiny85: add PWM support (#5171)
- rp: add Close function to UART to allow for removing all system resources/power usage
- rp: use blockReset() and unresetBlockWait() helper functions for peripheral reset/unreset
- rp2: prevent PWM Period method overflow
- rp2: add per-byte timeout budget for I2C (#5189)
- feather-m0: export UART0 and pins
- usb/cdc: better ring buffer implementation (#5209)
- fix: replace ! with ~ for register mask
- atmega328p_simulator: add correct build tag for arduino_uno after renaming
- net
- update to Go 1.26.2 net package with UDP and JS improvements
- runtime
- implement fminimum/fmaximum
- make timeoffset atomic
- add MemStats.HeapObjects
- handle GODEBUG on wasip2 (#5312)
- fix Darwin syscall return value truncation and lost arguments
- add syscall.runtimeClearenv for Go 1.26
- split syscall functions for darwin changes for 1.26
- fix: init heap before random number seed on wasm platforms
- targets
- add esp32s3-supermini board target
- add support for Seeedstudio Xiao-RP2350 board
- add Shrike Lite board (#5170)
- rename arduino target to arduino-uno
- add pins/setup for Arduino UNO Q board QWIIC connector
- correct pin mapping for Arduino UNO Q STM32 MCU
- add stm32u585 openocd commands for flashing on Arduino UNO Q
- correct name/tag use for esp32s3-wroom1 board
- modify esp32, esp32s3, esp32c3, & esp8266 targets to use built-in esp32flash
- switch rp2040/rp2350 to default to tasks scheduler
- change default stack size for esp32c3 and esp32s3 to 8196
- swan: rename group build tag stm32l4x5 => stm32l4y5 to avoid clash with stm32 device name
- nucleo-f722ze: add build-tag stm32f722
- fix: set stm32u5x clock rate to default
- create generic targets for esp32 boards
- libs
- stm32-svd: update submodule
- update tools/gen-device-svd for recent changes to stm32-svd file structure (#5212)
- build/test
- build: use Golang 1.26 for all builds
- build: actually use the version of llvm we are supposed to be testing by using brew link command
- build: let scoop run updates to resolve binaryen install failures on Windows
- ci: don't double zip release artifacts
- test: increase default timeout from 1 to 2 minutes to prevent spurious CI fails
- testdata: fix flaky timers test by draining ticker channel after Stop
- testdata: more corpus entries (#5182)
- add soypat/lneto to corpus
- GNUmakefile: add context and expvar to stdlib tests
- GNUmakefile: add encoding/xml to stdlib tests on Linux
- main (test): skip mipsle test if the emulator is missing
- make: remove machine without board from smoketest
- stm32: add Arduino UNO Q to smoketests
- flake: bump to nixpkgs 25.11
- chore: update all github actions to latest versions
- fix: use external 7zip for scoop installs on Windows
0.40.1
- machine
- nrf: fix flash writes when SoftDevice is enabled
- runtime
- runtime: avoid fixed math/rand sequence on RP2040/RP2350 (#5124)
- runtime: add calls to initRand() during run() for all schedulers
- runtime: call initRand() before initHeap() during initialization
- runtime: use rand_hwrng hardwareRand for RP2040/RP2350 (#5135)
- libs
- picolibc: use updated location for git repo
0.40.0
- general
- all: add full LLVM 20 support
- core: feat: enable //go:linkname pragma for globals
- core: feature: Add flag to ignore go compatibility matrix (#5078)
- chore: update version for 0.40 development cycle
- compiler
- emit an error when the actual arch doesn't match GOARCH
- mark string parameters as readonly
- use Tarjan's SCC algorithm to detect loops for defer
- lower "large stack" limit to 16kb
- core
- shrink bdwgc library
- Fix linker errors for runtime.vgetrandom and crypto/internal/sysrand.fatal
- fix: add TryLock to sync.RWMutex
- fix: correct linter issues exposed by the fix in #4679
- fix: don't hardcode success return state
- fix: expand RTT debugger compatibility
- internal/task (threads): save stack bounds instead of scanning under a lock
- internal/task: create detached threads and fix error handling
- interp: better errors when debugging interp
- transform (gc): create stack slots in callers of external functions
- internal/task: prevent semaphore resource leak for threads scheduler
- machine
- cortexm: optimize code size for the HardFault_Handler
- fe310: add I2C pins for the HiFive1b
- clarify WriteAt semantics of BlockDevice
- fix deprecated AsmFull comment (#5005)
- make sure DMA buffers do not escape unnecessarily
- only enable USB-CDC when needed
- use larger SPI MAXCNT on nrf52833 and nrf52840
- fix: update m.queuedBytes when clamping output to avoid corrupting sentBytes
- fix: use int64 in ReadTemperature to avoid overflow
- fix(rp2): disable DBGPAUSE on startup
- fix(rp2): possible integer overflow while computing factors for SPI baudrate
- fix(rp2): reset spinlocks at startup
- fix(rp2): switch spinlock busy loop to wfe
- fix(rp2): use side-effect-free spinlocks
- nrf: add ADC_VDDH which is an ADC pin for VDDH
- nrf: don't block SPI transfer
- nrf: don't set PSELN, it's ignored in single ended mode anyway
- nrf: fix typo in ADC configuration
- nrf: refactor SoftDevice enabled check
- nrf: rename pwmPin to adcPin
- nrf: support flash operations while the SoftDevice is enabled
- rp2040: allow writing to the UART inside interrupts
- machine,nrf528: stop the bus only once on I2C bus error and ensures the first error is returned
- net
- update submodule to latest commits
- runtime
- (avr): fix infinite longjmp loop if stack is aligned to 256 bytes
- (gc_blocks.go): clear full size of allocation
- (gc_blocks.go): make sweep branchless
- (gc_blocks.go): simplify scanning logic
- (gc_blocks.go): use a linked stack to scan marked objects
- (gc_blocks.go): use best-fit allocation
- (gc_boehm.go): fix world already stopped check
- (wasm): scan the system stack
- fix sleep duration for long sleeps
- remove copied code for nrf52840
- src/syscall: update src buffer after write
- wasm: fix C realloc and optimize it a bit
- targets
- add xiao-esp32s3 board target
- Add ESP32-S3 support (#5091)
- Added Gopher ARCADE board
- Create "pico2-ice" target board (#5062)
- build/test
- Add testing.T.Context() and testing.B.Context()
- create separate go.mod file for testing dependencies for wasm tests that use Chromium headless browser to avoid use of older incompatible version.
- go back to normal scheduler instead of tasks scheduler for macos CI
- update CI to use Go 1.25.5
- update macOS GH actions builds to handle sunset of macOS 13
- use task scheduler on macOS builds to avoid test race condition lockups
- update all CI builds to use latest stable Go release. Also update some of the actions to their latest releases.
- update GH actions builds to use Go 1.25.4
- uninstall cmake before install
- fix: point the submodule for musl-lib to a mirror in the TinyGo GitHub org
- fix: remove macOS 15 from CI build matrix (conflicts with macOS 14 build)
- fix: separate host expected bytes from device intended bytes
- fix/typo: makeESPFirmwareImage
- make: GNUmakefile: shrink TinyGo binaries on Linux
- move the directory list into a variable
- several improvements to the macOS GH actions build
- Fix for #4678: top-level 'make lint' wasn't working
- fix: increase the timeout for chromedp to connect to the headless browser used for running the wasm tests.
- testdata: some more packages for the test corpus
0.39.0
- general
- all: add Go 1.25 support
- net: update to latest tinygo net package
- docs: clarify build verification step for macOS users
- Add flag to skip Renesas SVD builds
- build
- Makefile: install missing dlmalloc files
- flash: add -o flag support to save built binary (Fixes #4937) (#4942)
- fix: update version of clang to 17 to accommodate latest Go 1.25 docker base image
- ci
- chore: update all CI builds to test Go 1.25 release
- fix: disable test-newest since CircleCI seems unable to download due to rate-limits on Dockerhub
- ci: rename some jobs to avoid churn on every Go/LLVM version bump
- ci: make the goroutines test less racy
- tests: de-flake goroutines test
- compiler
- compiler: implement internal/abi.Escape
- main
- main: show the compiler error (if any) for
tinygo test -c - chore: correct GOOS=js name in error messages for WASM
- main: show the compiler error (if any) for
- machine
- machine: add international keys
- machine: remove some unnecessary "// peripherals:" comments
- machine: add I2C pin comments
- machine: standardize I2C errors with "i2c:" prefix
- machine: make I2C usable in the simulator
- fix: add SPI and I2C to teensy 4.1 (#4943)
rp2: use the correct channel mask for rp2350 ADC; hold lock during read (#4938)rp2: disable digital input for analog inputs
- runtime
- runtime: ensure time.Sleep(d) sleeps at least d
- runtime: stub out weak pointer support
- runtime: implement dummy AddCleanup
- runtime: enable multi-core scheduler for rp2350
internal/task: use -stack-size flag when starting a new threadinternal/task: add SA_RESTART flag to GC interruptsinternal/task: a few small correctness fixesinternal/gclayout: make gclayout values constants- darwin: add threading support and use it by default
- standard library
sync: implement sync.Swapreflect: implement Method.IsExported
- testing
- testing: stub out testing.B.Loop
- targets
stm32: add support for the STM32L031G6U6- add metro-rp2350 board definition (#4989)
rp2040/rp2350: set the default stack size to 8k for rp2040/rp2350 based boards where this was not already the case
0.38.0
- general
go.*: upgradegolang.org/x/toolsto v0.30.0all: add support for LLVM 20
- build
- go back to using MinoruSekine/setup-scoop for Windows CI builds
flake.*: upgrade to nixpkgs 25.05, LLVM 20Makefile: only detect ccache command when neededMakefile: create random filename inside ruleMakefile: don't set GOROOTMakefile: call uname at most onceMakefile: only read NodeJS version when it is needed
- compiler
- add support for
GODEBUG=gotypesalias=1 interp: fixcopy()from/to external buffers- add
-nobounds(similar to-gcflags=-B) compileopts: add library version to cached library pathbuilder: build wasi-libc inside TinyGobuilder: simplify bdwgc libc dependencybuilder: don't use precompiled librariescompileopts: enable support forGOARCH=wasmintinygo test
- add support for
- fixes
rp2350: Fix DMA to SPI transmits on RP2350 (#4903)microbit v2: use OpenOCD flash method on microbit v2 when using Nordic Semi SoftDevicemain: display all of the current GC options for the-gcflag- Remove duplicated error handling
sync: fixTestMutexConcurrenttest- fix race condition in
testdata/goroutines.go - fix build warnings on Windows ARM
- machine
usb: add USB mass storage class support- implement usb receive message throttling
- declare usb endpoints per-platform
samd21: implement watchdogsamd51: write to flash memory in 512 byte long chunkssamd21: write to flash memory in 64 byte long chunks- don't inline RTT
WriteByteeverywhere rp2: unexport machine-specific errorsrp2: discount scheduling delays in I2C timeouts (#4876)- use pointer receiver in simulated PWM peripherals
- add simulated PWM/timer peripherals
rp2: expose usb endpoint stall handlingarm: clear pending interrupts before enabling themrp2: merge common usb code (#4856)
- main
- add "cores" and "threads" schedulers to help text
- add
StartPosandEndPosto-jsonbuild output - change
-jsonflag to match upstream Go
- runtime
- don't lock the print output inside interrupts
- don't try to interrupt other cores before they are started
- implement
NumCPUfor the multicore scheduler - add support for multicore scheduler
- refactor obtaining the system stack
interrupt: addCheckpointtype- add
exportedFuncPtr - avoid an allocation in
(*time.Timer).Reset - stub runtime signal functions for
os/signalon wasip1 - move
timeUnitto a single place - implement
NumCPUfor-scheduler=threads - move
mainExitedboolean internal/task: renametinygo_pausetotinygo_task_exit- map every goroutine to a new OS thread
- refactor
timerQueue - make conservative and precise GC MT-safe
internal/task: implement atomic primitives for preemptive scheduling- Use diskutil on macOS to extract volume name and path for FAT mounts #4928
- standard library
net: update submodule to latest commitsruntime/debug: add GC related stubsmetrics: flesh out some of the metric typesreflect: Chan related stubsos: handle relative and abs paths inExecutable()os: addos.Executable()for Darwinsync: implementRWMutexusing futexesreflect: AddSliceOf,ArrayOf,StructOf,MapOf,FuncOf
- targets
rp2040: add multicore supportriscv32: usegdbbinary as a fallback- add target for Microbit v2 with SoftDevice S140 support for both peripheral and central
windows: use MSVCRT.DLL instead of UCRT on i386windows: add windows/386 supportarm64: remove unnecessary.sectiondirectiveriscv-qemu: actually sleep intime.Sleep()riscv: define CSR constants and use them where possibledarwin: support Boehm GC (and use by default)windows: add support for the Boehm-Demers-Weiser GCwindows: fix wrong register for first parameter
- wasm
- add Boehm GC support
- refactor/modify stub signal handling
- don't block
//go:wasmexportbecause of running goroutines - use
int64instead offloat64for thetimeUnit
- boards
- Add board support for BigTreeTech SKR Pico (#4842)
0.37.0
- general
- add the Boehm-Demers-Weiser GC on Linux
- ci
- add more tests for wasm and baremetal
- compiler
- crypto/internal/sysrand is allowed to use unsafe signatures
- examples
- add goroutine benchmark to examples
- fixes
- ensure use of pointers for SPI interface on atsam21/atsam51 and other machines/boards that were missing implementation (#4798)
- replace loop counter with hw timer for USB SetAddressReq on rp2040 (#4796)
- internal
- update to go.bytecodealliance.org@v0.6.2 in GNUmakefile and internal/wasm-tools
- exclude certain files when copying package in internal/cm
- update to go.bytecodealliance.org/cm@v0.2.2 in internal/cm
- remove old reflect.go in internal/reflectlite
- loader
- use build tags for package iter and iter methods on reflect.Value in loader, iter, reflect
- add shim for go1.22 and earlier in loader, iter
- machine
- bump rp2040 to 200MHz (#4768)
- correct register address for Pin.SetInterrupt for rp2350 (#4782)
- don't block the rp2xxx UART interrupt handler
- fix RP2040 Pico board on the playground
- add flash support for rp2350 (#4803)
- os
- add stub Symlink for wasm
- refactor
- use *SPI everywhere to make consistent for implementations. Fixes #4663 "in reverse" by making SPI a pointer everywhere, as discussed in the comments.
- reflect
- add Value.SetIter{Key,Value} and MapIter.Reset in reflect, internal/reflectlite
- embed reflectlite types into reflect types in reflect, internal/reflectlite
- add Go 1.24 iter.Seq[2] methods
- copy reflect iter tests from upstream Go
- panic on Type.CanSeq[2] instead of returning false
- remove strconv.go
- remove unused go:linkname functions
- riscv-qemu
- add VirtIO RNG device
- increase stack size
- runtime
- only allocate heap memory when needed
- remove unused file func.go
- use package reflectlite
- transform
- cherry-pick from #4774
0.36.0
- general
- add initial Go 1.24 support
- add support for LLVM 19
- update license for 2025
- make small corrections for README regarding wasm
- use GOOS and GOARCH for building wasm simulated boards
- only infer target for wasm when GOOS and GOARCH are set correctly, not just based on file extension
- add test-corpus-wasip2
- use older image for cross-compiling builds
- update Linux builds to run on ubuntu-latest since 20.04 is being retired
- ensure build output directory is created
- add NoSandbox flag to chrome headless that is run during WASM tests, since this is now required for Ubuntu 23+ and we are using Ubuntu 24+ when running Github Actions
- update wasmtime used for CI to 29.0.1 to fix issue with install during CI tests
- update to use
Get-CimInstanceaswmicis being deprecated on WIndows - remove unnecessary executable permissions
goenv: update to new v0.36.0 development version
- compiler
builder: fix parsing of external ld.lld error messagescgo: mangle identifier namesinterp: correctly mark functions as modifying memory- add buildmode=wasi-legacy to support existing base of users who expected the older behavior for wasi modules to not return an exit code as if they were reactors
- standard library
crypto/tls: add Dialer.DialContext() to fix websocket clientcrypto/tls: add VersionTLS constants and VersionName(version uint16) method that turns it into a string, copied from big gointernal/syscall/unix: use our own version of this packagemachine: replace hard-coded cpu frequencies on rp2xxxmachine: bump rp2350 CPUFrequency to 150 MHzmachine: compute rp2 clock dividers from crystal and target frequencymachine: remove bytes package dependency in flash codemachine/usb/descriptor: avoid bytes packagenet: update to latest submodule with httptest subpackage and ResolveIPAddress implementationos: add File.Chdir supportos: implement stub Chdir for non-OS systemsos/file: add file.Chmodreflect: implement Value.Equalruntime: add FIPS helper functionsruntime: manually initialize xorshift statesync: move Mutex to internal/tasksyscall: add wasip1 RandomGettesting: add Chdirwasip2: add stubs to get internal/syscall/unix to work
- fixes
- correctly handle calls for GetRNG() when being made from nrf devices with SoftDevice enabled
- fix stm32f103 ADC
wasm: correctly handle id lookup for finalizeRef callwasm: avoid total failure on wasm finalizer callwasm: convert offset as signed int into unsigned int in syscall/js.stringVal in wasm_exec.js
- targets
- rp2350: add pll generalized solution; fix ADC handles; pwm period fix
- rp2350: extending support to include the rp2350b
- rp2350: cleanup: unexport internal USB and clock package variable, consts and types
- nrf: make ADC resolution changeable
- turn on GC for TKey1 device, since it does in fact work
- match Pico2 stack size to Pico
- boards
- add support for Pimoroni Pico Plus2
- add target for pico2-w board
- add comboat_fw tag for elecrow W5 boards with Combo-AT Wifi firmware
- add support for Elecrow Pico rp2350 W5 boards
- add support for Elecrow Pico rp2040 W5 boards
- add support for NRF51 HW-651
- add support for esp32c3-supermini
- add support for waveshare-rp2040-tiny
- examples
- add naive debouncing for pininterrupt example
0.35.0
- general
- update cmsis-svd library
- use default UART settings in the echo example
goenv: also show git hash with custom build of TinyGogoenv: support parsing development versions of Gomain: parse extldflags early so we can report the error message
- compiler
builder: whitelist temporary directory env var for Clang invocation to fix Windows bugbuilder: fix cache paths in-size=fulloutputbuilder: work around incorrectly escaped DWARF paths on Windows (Clang bug)builder: fix wasi-libc path names on Windows with-size=fullbuilder: write HTML size reportcgo: support C identifiers only referred to from within macroscgo: support function-like macroscgo: support errno value as second return parametercgo: add support for#cgo noescapelinescompiler: fix bug in interrupt loweringcompiler: allow panic directly indefercompiler: fix wasmimport -> wasmexport in error messagecompiler: support//go:noescapepragmacompiler: report error instead of crashing when instantiating a generic function without bodyinterp: align created globals
- standard library
machine: modify i2s interface/implementation to better match specificationos: implementStartProcessreflect: addValue.Clearreflect: add interface support toNumMethodsreflect: fixAssignableTofor named + non-named typesreflect: implementCanConvertreflect: handle more cases inConvertreflect: fix Copy of non-pointer array with size > 64bitsruntime: don't call sleepTicks with a negative durationruntime: optimize GC scanning (findHead)runtime: move constants into shared packageruntime: addruntime.fcntlfunction for internal/syscall/unixruntime: heapptr only needs to be initialized onceruntime: refactor scheduler (this fixes a few bugs with-scheduler=none)runtime: rewrite channel implementation to be smaller and more flexibleruntime: useSA_RESTARTwhen registering a signal for os/signalruntime: implement race-free signals using futexesruntime: run deferred functions inGoexitruntime: removeCondwhich seems to be unusedruntime: properly handle unix read on directoryruntime/trace: stub all public methodssync: don't use volatile inMutexsync: implementWaitGroupusing a (pseudo)futexsync: makeCondparallelism-safesyscall: use wasi-libc tables for wasm/js target
- targets
mips: fix a bug when scanning the stacknintendoswitch: get this target to compile againrp2350: add support for the new RP2350rp2040/rp2350: make I2C implementation shared for rp2040/rp2350rp2040/rp2350: make SPI implementation shared for rp2040/rp2350rp2040/rp2350: make RNG implementation shared for rp2040/rp2350wasm: revise and simplify wasmtime argument handlingwasm: support//go:wasmexportfunctions after a call totime.Sleepwasm: correctly return from run() in wasm_exec.jswasm: call process.exit() when go.run() returnswindows: don't return, exit via exit(0) instead to flush stdout buffer
- boards
- add support for the Tillitis TKey
- add support for the Raspberry Pi Pico2 (based on the RP2040)
- add support for Pimoroni Tiny2350
0.34.0
- general
- fix
GOOS=wasip1fortinygo test - add
-C DIRflag - add initial documentation for project governance
- add
-ldflags='-extldflags=...'support - improve usage message with
tinygo helpand when passing invalid parameters
- fix
- compiler
builder: remove environment variables when invoking Clang, to avoid the environment changing the behaviorbuilder: check for the Go toolchain version used to compile TinyGocgo: addC.CBytesimplementationcompiler: fix passing weirdly-padded structs as parameters to new goroutinescompiler: support pragmas on generic functionscompiler: do not let the slice buffer escape when casting a[]byteor[]runeto a string, to help escape analysiscompiler: conform to the latest iteration of the wasm types proposalloader: don't panic when main package is not named 'main'loader: make sure we always return type checker errors even without type errorstransform: optimize range over[]byte(string)
- standard library
crypto/x509: add package stub to build crypto/x509 on macOSmachine/usb/adc/midi: fixPitchBendos: addTruncatestub for baremetalos: add stubs foros.Filedeadlinesos: add internalnet.newUnixFilefor the net packageruntime: stub runtime_{Before,After}Exec for linkageruntime: randomize map accessesruntime: supportmaps.Cloneruntime: add more fields toMemStatsruntime: implement newcoro, coroswitch to support package iterruntime: disallow defer in interruptsruntime: add support for os/signal on Linux and MacOSruntime: add gc layout info for some basic types to help the precise GCruntime: bump GC mark stack size to avoid excessive heap rescans
- targets
darwin: use Go standard library syscall package instead of a custom onefe310: support GPIOPinInputmips: fix compiler crash with GOMIPS=softfloat and defermips: add big-endian (GOARCH=mips) supportmips: use MIPS32 (instead of MIPS32R2) as the instruction set for wider compatibilitywasi: add relative and absolute --dir options to wasmtime argswasip2: add wasmtime -S args to support network interfaceswasm: add//go:wasmexportsupport (for all WebAssembly targets)wasm: use precise instead of conservative GC for WebAssembly (including WASI)wasm-unknown: add bulk memory flags since basically every runtime has it now
- boards
- add RAKwireless RAK4631
- add WaveShare ESP-C3-32S-Kit
0.33.0
- general
- use latest version of x/tools
- add chromeos 9p support for flashing
- sort compiler error messages by source position in a package
- don't include prebuilt libraries in the release to simplify packaging and reduce the release tarball size
- show runtime panic addresses for
tinygo run - support Go 1.23 (including all new language features)
test: support GOOS/GOARCH pairs in the-targetflagtest: remove message after test binary built
- compiler
- remove unused registers for x86_64 linux syscalls
- remove old atomics workaround for AVR (not necessary in modern LLVM versions)
- support
golang.org/x/sys/unixsyscalls builder: remove workaround for generics race conditionbuilder: add package ID to compiler and optimization error messagesbuilder: show better error messages for some common linker errorscgo: support preprocessor macros passed on the command linecgo: use absolute paths for error messagescgo: add support for printfloader: handlego listerrors inside TinyGo (for better error messages)transform: fix incorrect alignment of heap-to-stack transformtransform: use thinlto-pre-link passes (instead of the full pipeline) to speed up compilation speed slightly
- standard library
crypto/tls: add CipherSuiteName and some extra fields to ConnectionSTateinternal/abi: implement initial version of this packagemachine: use newinternal/binarypackagemachine: rewrite Reply() to fix sending long replies in I2C Target Modemachine/usb/descriptor: Reset joystick physicalmachine/usb/descriptor: Drop second joystick hatmachine/usb/descriptor: Add more HID... functionsmachine/usb/descriptor: Fix encoding of valuesmachine/usb/hid/joystick: Allow more hat switchesos: addChown,Truncateos/user: use stdlib version of this packagereflect: return correct name for theunsafe.Pointertypereflect: implementType.Overflow*functionsruntime: implement dummygetAuxvto satisfy golang.org/x/sys/runtime: don't zero out new allocations for-gc=leakingwhen they are already zeroedruntime: simplify slice growing/appending coderuntime: print a message when a fatal signal like SIGSEGV happensruntime/debug: addGoVersiontodebug.BuildInfosync: addMap.Clear()sync/atomic: add And* and Or* compiler intrinsics needed for Go 1.23syscall: addForkandExecvesyscall: add all MacOS errno valuestesting: stub outT.Deadlineunique: implement custom (naive) version of the unique package
- targets
arm: supportGOARM=*,softfloat(softfloat support for ARM v5, v6, and v7)mips: add linux/mipsle (and experimental linux/mips) supportmips: addGOMIPS=softfloatsupportwasip2: add WASI preview 2 supportwasm/js: addnode:prefix inrequire()call of wasm_exec.jswasm-unknown: make sure theospackage can be importedwasm-unknown: remove import-memory flag
0.32.0
-
general
- fix wasi-libc include headers on Nix
- apply OpenOCD commands after target configuration
- fix a minor race condition when determining the build tags
- support UF2 drives with a space in their name on Linux
- add LLVM 18 support
- drop support for Go 1.18 to be able to stay up to date
-
compiler
- move
-panic=trapsupport to the compiler/runtime - fix symbol table index for WebAssembly archives
- fix ed25519 build errors by adjusting the alias names
- add aliases to generic AES functions
- fix race condition by temporarily applying a proposed patch
builder: keep un-wasm-opt'd .wasm if -work was passedbuilder: make sure wasm-opt command line is printed if askedcgo: implement shift operations in preprocessor macrosinterp: checking for methodset existence
- move
-
standard library
machine: add__tinygo_spi_txfunction to simulatormachine: fix simulator I2C supportmachine: add GetRNG support to simulatormachine: addTxFifoFreeLevelfor CANos: addLinkos: addFindProcessfor posixos: addProcess.Releasefor unixos: addSetReadDeadlinestubos,os/signal: add signal stubsos/user: add stubs forLookup{,Group}andGroupreflect: use int inStringHeaderandSliceHeaderon non-AVR platformsreflect: fixNumMethodsfor Interface typeruntime: skip negative sleep durations in sleepTicks
-
targets
esp32: add I2C supportrp2040: move UART0 and UART1 to common filerp2040: make all RP2040 boards available for simulationrp2040: fix timeUnit typestm32: add i2cFrequencyandSetBaudRatefunction for chips that were missing implementationwasm-unknown: add math and memory builtins that LLVM needswasip1: replace existing-target=wasisupport with wasip1 as supported in Go 1.21+
-
boards
adafruit-esp32-feather-v2: add the Adafruit ESP32 Feather V2badger2040-w: add support for the Badger2040 Wfeather-nrf52840-sense: fix lack of LXFOm5paper: add support for the M5 Papermksnanov3: limit programming speed to 1800 kHznucleol476rg: add stm32 nucleol476rg supportpico-w: add the Pico W (which is near-idential to the pico target)thingplus-rp2040,waveshare-rp2040-zero: add WS2812 definitionpca10059-s140v7: add this variant to the PCA10059 board
0.31.2
-
general
- update the
netsubmodule to updated version withBuffersimplementation
- update the
-
compiler
syscall: add wasm_unknown tag to some additional files so it can compile more code
-
standard library
runtime: add Frame.Entry field
0.31.1
-
general
- fix Binaryen build in make task
- update final build stage of Docker
devimage to go1.22 - only use GHA cache for building Docker
devimage - update the
netsubmodule to latest version
-
compiler
interp: make getelementptr offsets signedinterp: return a proper error message when indexing out of range
0.31.0
- general
- remove LLVM 14 support
- add LLVM 17 support, and use it by default
- add Nix flake support
- update bundled Binaryen to version 116
- add
portssubcommand that lists available serial ports for-portand-monitor - support wasmtime version 14
- add
-serial=rttfor serial output over SWD - add Go 1.22 support and use it by default
- change minimum Node.js version from 16 to 18
- compiler
- use the new LLVM pass manager
- allow systems with more stack space to allocate larger values on the stack
build: fix a crash due to sharing GlobalValues between build instancescgo: addC._Booltypecgo: fix calling CGo callback inside generic functioncompileopts: setpuregobuild tag by default so that more packages can be builtcompileopts: force-enable CGo to avoid build issuescompiler: fix crash on type assert on interfaces with no methodsinterp: print LLVM instruction in tracebackinterp: support runtime times by running them at runtimeloader: enforce Go language version in the type checker (this may break existing programs with an incorrect Go version in go.mod)transform: fix bug in StringToBytes optimization pass
- standard library
crypto/tls: stub out a lot of functionsinternal/task,machine: make TinyGo code usable with "big Go" CGomachine: implementI2C.SetBaudRateconsistently across chipsmachine: implementSPI.Configureconsistently across chipsmachine: addDeviceIDfor nrf, rp2040, sam, stm32machine: use smaller UART buffer size on atmega chipsmachine/usb: allow setting a serial number using a linker flagmath: support more math functions on baremetal (picolibc) systemsnet: replace entire net package with a new one based on the netdev driveros/user: add bare-bones implementation of this packagereflect: stubCallSliceandFuncOfreflect: addTypeFor[T]reflect: updateIsZeroto Go 1.22 semanticsreflect: move indirect values into interface when setting interfacesruntime: stubBreakpointsync: implement trylock
- targets
atmega: use UART double speed mode for fewer errors and higher throughputatmega328pb: refactor to enable extra uartavr: don't compile large parts of picolibc (math, stdio) for LLVM 17 supportesp32: switch over to the official SVD fileesp32c3: implement USB_SERIAL for USBCDC communicationesp32c3: implement I2Cesp32c3: implement RNGesp32c3: add more ROM functions and update linker script for the in-progress wifi supportesp32c3: update to newer SVD filesrp2040: add support for UART hardware flow controlrp2040: add definition formachine.PinTogglerp2040: set XOSC startup delay multipliersamd21: add support for UART hardware flow controlsamd51: add support for UART hardware flow controlwasm: increase default stack size to 64k for wasi/wasm targetswasm: bump wasi-libc version to SDK 20wasm: remove line of dead code in wasm_exec.js
- new targets/boards
qtpy-esp32c3: add Adafruit QT Py ESP32-C3 boardmksnanov3: add support for the MKS Robin Nano V3.xnrf52840-generic: add generic nrf52840 chip supportthumby: add support for Thumbywasm: add newwasm-unknowntarget that doesn't depend on WASI or a browser
- boards
arduino-mkrwifi1010,arduino-nano33,nano-rp2040,matrixportal-m4,metro-m4-airlift,pybadge,pyportal: addninafwbuild tag and some constants for BLE supportgopher-badge: fix typo in USB product namenano-rp2040: add UART1 and correct mappings for NINA via UARTpico: bump default stack size from 2kB to 8kBwioterminal: expose UART4
0.30.0
- general
- add LLVM 16 support, use it by default
- compiler
build: work around a race condition by building Go SSA seriallycompiler: fix a crash by not using the LLVM global context typesinterp: don't copy unknown values inruntime.sliceCopyto fix miscompileinterp: fix crash in error report by not returning raw LLVM values
- standard library
machine/usb/adc/midi: various improvements and API changesreflect: add support for[...]T→[]Tin reflect
- targets
atsamd21,atsamd51: add support for USB INTERRUPT OUTrp2040: always use the USB device enumeration fix, even in chips that supposedly have the HW fixwasm: increase default stack size to 32k for wasi/wasm
- boards
gobadge: add GoBadge target as alias for PyBadge :)gemma-m0: add support for the Adafruit Gemma M0
0.29.0
- general
- Go 1.21 support
- use https for renesas submodule #3856
- ci: rename release-double-zipped to something more useful
- ci: update Node.js from version 14 to version 16
- ci: switch GH actions builds to use Go 1.21 final release
- docker: update clang to version 15
- docker: use Go 1.21 for Docker dev container build
main: add target JSON file intinygo infooutputmain: improve detection of filesystemsmain: usego envinstead of doing all detection manually- make: add make task to generate Renesas device wrappers
- make: add task to check NodeJS version before running tests
- add submodule for Renesas SVD file mirror repo
- update to go-serial package v1.6.0
testing: add Testing functiontools/gen-device-svd: small changes needed for Renesas MCUs
- compiler
builder: update message for max supported Go versioncompiler,reflect: NumMethods reports exported methods onlycompiler: add compiler-rt and wasm symbols to tablecompiler: add compiler-rt to wasm.jsoncompiler: add min and max builtin supportcompiler: implement clear builtin for mapscompiler: implement clear builtin for slicescompiler: improve panic message when a runtime call is unavailablecompiler: update .ll test outputloader: merge go.env file which is now required starting in Go 1.21 to correctly get required packages
- standard library
os: define ErrNoDeadlinereflect: Add FieldByNameFuncreflect: add SetZeroreflect: fix iterating over maps with interface{} keysreflect: implement Value.Growreflect: remove unnecessary heap allocationsreflect: use .key() instead of a type assertsync: add implementation from upstream Go for OnceFunc, OnceValue, and OnceValues
- targets
machine: UART refactor (#3832)machine/avr: pin change interruptmachine/macropad_rp2040: add machine.BUTTONmachine/nrf: add I2C timeoutmachine/nrf: wait for stop condition after reading from the I2C busmachine/nRF52: set SPI TX/RX lengths even data is empty. Fixes #3868 (#3877)machine/rp2040: add missing suffix to CMD_READ_STATUSmachine/rp2040: add NoPin supportmachine/rp2040: move flash related functions into separate file from C imports for correct - LSP. Fixes #3852machine/rp2040: wait for 1000 us after flash reset to avoid issues with busy USB busmachine/samd51,rp2040,nrf528xx,stm32: implement watchdogmachine/samd51: fix i2cTimeout was decreasing due to cache activationmachine/usb: Add support for HID Keyboard LEDsmachine/usb: allow USB Endpoint settings to be changed externallymachine/usb: refactor endpoint configurationmachine/usb: remove usbDescriptorConfigmachine/usb/hid,joystick: fix hidreport (3) (#3802)machine/usb/hid: add RxHandler interfacemachine/usb/hid: rename Handler() to TxHandler()wasi: allow zero inodes when reading directorieswasm: add support for GOOS=wasip1wasm: fix functions exported through //exportwasm: remove i64 workaround, use BigInt insteadexample: adjust time offsetexample: simplify pininterrupt
- boards
targets: add AKIZUKI DENSHI AE-RP2040targets: adding new uf2 target for PCA10056 (#3765)
0.28.0
- general
- fix parallelism in the compiler on Windows by building LLVM with thread support
- support qemu-user debugging
- make target JSON msd-volume-name an array
- print source location when a panic happens in -monitor
test: don't printokfor a successful compile-only
- compiler
builder: remove non-ThinLTO build modebuilder: fail earlier if Go is not availablebuilder: improve-size=fullin a number of waysbuilder: implement Nordic DFU file writer in Gocgo: allowLDFLAGS: --export=...compiler: support recursive slice typescompiler: zero struct padding during map operationscompiler: add llvm.ident metadatacompiler: removeunsafe.Pointer(uintptr(v) + idx)optimization (useunsafe.Addinstead)compiler: add debug info to//go:embeddata structures for better-sizeoutputcompiler: add debug info to string constantscompiler: fix a minor race conditioncompiler: emit correct alignment in debug info for global variablescompiler: correctly generate reflect data for local named typescompiler: add alloc attributes toruntime.alloc, reducing flash usage slightlycompiler: for interface maps, use the original named type if availablecompiler: implement most math/bits functions as LLVM intrinsicscompiler: ensure all defers have been seen before creating rundefers
- standard library
internal/task: disallow blocking inside an interruptmachine: addCPUResetmachine/usb/hid: add MediaKey supportmachine/usb/hid/joystick: move joystick under HIDmachine/usb/hid/joystick: allow joystick settings overridemachine/usb/hid/joystick: handle case where we cannot find the correct HID descriptormachine/usb/hid/mouse: add support for mouse back and forwardmachine/usb: add ability to override default VID, PID, manufacturer name, and product namenet: added missingTCPAddrandUDPAddrimplementationsos: add IsTimeout functionos: fix resource leak in(*File).Closeos: add(*File).Syncos: implement(*File).ReadDirfor wasios: implement(*File).WriteAtreflect: make sure null bytes are supported in tagsreflect: refactor this package to enable many new featuresreflect: add map type methods:ElemandKeyreflect: add map methods:MapIndex,MapRange/MapIter,SetMapIndex,MakeMap,MapKeysreflect: add slice methods:Append,MakeSlice,Slice,Slice3,Copy,Bytes,SetLenreflect: add misc methods:Zero,Addr,UnsafeAddr,OverflowFloat,OverflowInt,OverflowUint,SetBytes,Convert,CanInt,CanFloat,CanComplex,Comparablereflect: add type methods:String,PkgPath,FieldByName,FieldByIndex,NumMethodreflect: add stubs forType.Method,CanConvert,ArrayOf,StructOf,MapOfreflect: add stubs for channel select routines/typesreflect: allow nil rawType to call Kind()reflect: ensure all ValueError panics have Kind fieldsreflect: add support for named typesreflect: improveValue.String()reflect: setIndexandPkgPathfield inType.Fieldreflect:Type.AssignableTo: you can assign anything tointerface{}reflect: add type check toValue.Fieldreflect: letTypeOf(nil)return nilreflect: moveStructField.Anonymousfield to match upstream locationreflect: addUnsafePointerfor Func typesreflect:MapIter.Nextneeds to allocate new keys/values every timereflect: fixIsNilfor interfacesreflect: fixType.Nameto return an empty string for non-named typesreflect: addVisibleFieldsreflect: properly handle embedded structsreflect: make surePointerToworks for named typesreflect:Set: convert non-interface to interfacereflect:Set: fix direction of assignment checkreflect: support channel directionsreflect: print struct tags in Type.String()reflect: properly handle read-only valuesruntime: allow custom-gc SetFinalizer and clarify KeepAliveruntime: implement KeepAlive using inline assemblyruntime: check for heap allocations inside interruptsruntime: properly turn pointer into empty interface when hashingruntime: improve map size hint usageruntime: zero map key/value on deletion to so GC doesn't see themruntime: print the address where a panic happenedruntime/debug: stubSetGCPercent,BuildInfo.Settingsruntime/metrics: add this package as a stubsyscall:Stat_ttimespec fields are Atimespec on darwinsyscall: addTimespec.Unix()for wasisyscall: add fsync using libctesting: support -test.counttesting: make test output unbuffered when verbosetesting: add -test.skiptesting: move runtime.GC() call to runN to match upstreamtesting: add -test.shuffle to order randomize test and benchmark order
- targets
arm64: fix register save/restore to include vector registersattiny1616: add support for this chipcortexm: refactor EnableInterrupts and DisableInterrupts to avoidarm.AsmFullcortexm: enable functions in RAM for go & cgocortexm: convert SystemStack fromAsmFullto C inline assemblycortexm: fix crash due to wrong stack size offsetnrf: samd21, stm32: add flash APInrf: fix memory issue in ADC readnrf: new peripheral type for nrf528xx chipsnrf: implement target modenrf: improve ADC and add oversampling, longer sample time, and reference voltagerp2040: change calling order for device enumeration fix to do firstrp2040: rtc delayed interruptrp2040: provide better errors for invalid pins on I2C and SPIrp2040: change uart to allow for a single pinrp2040: implement Flash interfacerp2040: remove SPIDataBitspropertyrp2040: unify all linker scripts using LDFLAGSrp2040: remove SPI deadline for improved performancerp2040: use 4MHz as default frequency for SPIrp2040: implement target moderp2040: use DMA for send-only SPI transferssamd21: rearrange switch case for get pin cfgsamd21: fix issue with WS2812 driver by making pin accesses fastersamd51: enable CMCC cache for greatly improved performancesamd51: remove extra BK0RDY clearsamd51: implement Flash interfacesamd51: use correct SPI frequencysamd51: remove extra BK0RDY clearsamd51: fix ADC multisamplingwasi: allow users to set theruntime_memhash_tsiporruntime_memhash_fnvbuild tagswasi: setWASMTIME_BACKTRACE_DETAILSwhen running in wasmtime.wasm: implement the//go:wasmimportdirective
- boards
gameboy-advance: switch to use register definitions in device/gbagameboy-advance: rename display and make pointer receiversgopher-badge: Added Gopher Badge supportlorae5: add needed definition for UART2lorae5: correct mapping for I2C bus, add pin mapping to enable powerpinetime: update the target file (rename from pinetime-devkit0)qtpy: fix bad pin assignmentwioterminal: fix pin definition of BCM13xiao: Pins D4 & D5 are I2C1. Use pins D2 & D3 for I2C0.xiao: add DefaultUART
0.27.0
- general
- all: update musl
- all: remove "acm:"` prefix for USB vid/pid pair
- all: add support for LLVM 15
- all: use DWARF version 4
- all: add initial (incomplete) support for Go 1.20
- all: add
-gc=customoption main: print ldflags including ThinLTO flags with -xmain: fix error message when a serial port can't be accessedmain: add-timeoutflag to allow setting how long TinyGo will try looking for a MSD volume for flashingtest: print PASS on pass when running standalone test binariestest: fix printing of benchmark outputtest: print package name when compilation failed (not just when the test failed)
- compiler
- refactor to support LLVM 15
builder: print compiler commands while building a librarycompiler: fix stack overflow when creating recursive pointer types (fix for LLVM 15+ only)compiler: allow map keys and values of ≥256 bytescgo: add support forC.floatandC.doublecgo: support anonymous enums included in multiple Go filescgo: add support for bitwise operatorsinterp: add support for constant icmp instructionstransform: fix memory corruption issues
- standard library
machine/usb: remove allocs in USB ISRmachine/usb: addPort()and deprecateNew()to have the API better match the singleton that is actually being returnedmachine/usb: change HID usage-maximum to 0xFFmachine/usb: add USB HID joystick supportmachine/usb: change to not send before endpoint initializationnet: implementPipeos: add stub foros.Chtimesreflect: stub outType.FieldByIndexreflect: addValue.IsZeromethodreflect: fix bug in.Fieldmethod when the field fits in a pointer but the parent doesn'truntime: switch somepanic()calls in the gc toruntimePanic()for consistencyruntime: add xorshift-based fastrand64runtime: fix alignment for arm64, arm, xtensa, riscvruntime: implement precise GCruntime/debug: stubPrintStacksync: implement simple pooling insync.Poolsyscall: stubbedSetuid, Exec and friendssyscall: add more stubs as needed for Go 1.20 supporttesting: implementt.Setenvunsafe: add support for Go 1.20 slice/string functions
- targets
all: do not set stack size per boardall: update picolibc to v1.7.9atsame5x: fix CAN extendedID handlingatsame5x: reduce heap allocationavr: drop GNU toolchain dependencyavr: fix .data initialization for binaries over 64kBavr: support ThinLTObaremetal: implements callocdarwin: fixsyscall.Openon darwin/arm64darwin: fix error withtinygo lldbesp: use LLVM Xtensa linker instead of Espressif toolchainesp: use ThinLTO for Xtensaesp32c3: add SPI supportlinux: include muslgetpagesizefunction in releasenrf51: add ADC implementationnrf52840: add PDM supportriscv: add "target-abi" metadata flagrp2040: remove mem allocation in GPIO ISRrp2040: avoid allocating clock on heaprp2040: add basic GPIO support for PIOrp2040: fix USB interrupt issuerp2040: fix RP2040-E5 USB erratastm32: always set ADC pins to pullups floatingstm32f1,stm32f4: fix ADC by clearing the correct bit for rank after each readstm32wl: Fix incomplete RNG initialisationstm32wlx: change order for init so clock speeds are set before peripheral startwasi: makes wasmtime "run" explicitwasm: fix GC scanning of allocaswasm: allow custom malloc implementationwasm: remove-wasm-abi=flag (use-targetinstead)wasm: fix scanning of the stackwasm: fix panic when allocating 0 bytes using mallocwasm: always run wasm-opt even with-scheduler=nonewasm: avoid miscompile with ThinLTOwasm: allow the emulator to expand{tmpDir}wasm: support ThinLTOwindows: update mingw-w64 version to avoid linker warningwindows: add ARM64 support
- boards
- Add Waveshare RP2040 Zero
- Add Arduino Leonardo support
- Add Adafruit KB2040
- Add Adafruit Feather M0 Express
- Add Makerfabs ESP32C3SPI35 TFT Touchscreen board
- Add Espressif ESP32-C3-DevKit-RUST-1 board
lgt92: fix OpenOCD configurationxiao-rp2040: fix D9 and D10 constantsxiao-rp2040: add pin definitions
0.26.0
- general
- remove support for LLVM 13
- remove calls to deprecated ioutil package
- move from
os.IsFootoerrors.Is(err, ErrFoo) - fix for builds using an Android host
- make interp timeout configurable from command line
- ignore ports with VID/PID if there is no candidates
- drop support for Go 1.16 and Go 1.17
- update serial package to v1.3.5 for latest bugfixes
- remove GOARM from
tinygo info - add flag for setting the goroutine stack size
- add serial port monitoring functionality
- compiler
cgo: implement support for static functionscgo: fix panic when FuncType.Results is nilcompiler: add aliases foredwards25519/field.feMulandfield.feSquarecompiler: fix incorrect DWARF type in some generic parameterscompiler: use LLVM math builtins everywherecompiler: replace some math operation bodies with LLVM intrinsicscompiler: replace math aliases with intrinsicscompiler: fixunsafe.Sizeoffor chan and map valuescompileopts: use tags parser from buildutilcompileopts: use backticks for regexp to avoid extra escapescompileopts: fail fast on duplicate values in target field slicescompileopts: fix windows/arm target triplecompileopts: improve error handling when loading target/*.jsoncompileopts: add support for stlink-dap programmercompileopts: do not complain about-no-debugon MacOSgoenv: supportGOOS=androidinterp: fix reading from external globalloader: fix link error forcrypto/internal/boring/sig.StandardCrypto
- standard library
- rename assembly files to .S extension
machine: add PWM peripheral comments to pinsmachine: improve UARTParity slightlymachine: do not export DFU_MAGIC_* constants on nrf52840machine: renamePinInputPullUp/PinInputPullDownmachine: addKHz,MHz,GHzconstants, deprecateTWI_FREQ_*constantsmachine: remove level triggered pin interruptsmachine: do not exposeRESET_MAGIC_VALUEmachine: useNoPinconstant where appropriate (instead of0for example)net: sync net.go with Go 1.18 stdlibos: addSyscallError.Timeoutos: addErrProcessDoneerrorreflect: implementCanInterfaceand fix stringIndexruntime: makeMemStatsavailable to leaking collectorruntime: addMemStats.TotalAllocruntime: addMemStats.MallocsandFreesruntime: add support fortime.NewTimerandtime.NewTickerruntime: implementresetTimerruntime: ensure some headroom for the GC to runruntime: make gc and scheduler asserts settable with build tagsruntime/pprof: addWriteHeapProfileruntime/pprof:runtime/trace: stub some additional functionssync: implementMap.LoadAndDeletesyscall: group WASI consts by purposesyscall: add WASI{D,R}SYNC,NONBLOCKFD flagssyscall: add ENOTCONN on darwintesting: add support for -benchmem
- targets
- remove USB vid/pid pair of bootloader
esp32c3: remove unusedUARTStopBitsconstantsnrf: implementGetRNGfunctionnrf:rp2040: addmachine.ReadTemperaturenrf52: cleanup s140v6 and s140v7 uf2 targetsrp2040: implement semi-random RNG based on ROSC based on pico-sdkwasm: add summary of wasm examples and fix callback bugwasm: do not allow undefined symbols (--allow-undefined)wasm: make sure buffers returned bymallocare kept untilfreeis calledwindows: save and restore xmm registers when switching goroutines
- boards
- add Pimoroni's Tufty2040
- add XIAO ESP32C3
- add Adafruit QT2040
- add Adafruit QT Py RP2040
esp32c3-12f:matrixportal-m4:p1am-100: remove duplicate build tagshifive1-qemu: remove this emulated boardwioterminal: add UART3 for RTL8720DNxiao-ble: fix usbpid
0.25.0
- command line
- change to ignore PortReset failures
- compiler
compiler: darwin/arm64 is aarch64, not armcompiler: don't clobber X18 and FP registers on darwin/arm64compiler: fix issue with methods on generic structscompiler: do not try to build generic functionscompiler: fix type names for generic named structscompiler: fix multiple defined function issue for generic functionscompiler: implementunsafe.Alignofandunsafe.Sizeoffor generic code
- standard library
machine: add DTR and RTS to Serialer interfacemachine: reorder pin definitions to improve pin list on tinygo.orgmachine/usb: add support for MIDImachine/usb: adjust buffer alignment (samd21, samd51, nrf52840)machine/usb/midi: addNoteOn,NoteOff, andSendCCmethodsmachine/usb/midi: add definition of MIDI note numberruntime: add benchmarks for memhashruntime: add support for printing slices via print/println
- targets
avr: fix some apparent mistake in atmega1280/atmega2560 pin constantsesp32: provide hardware pin constantsesp32: fix WDT reset on the MCH2022 badgeesp32: optimize SPI transmitesp32c3: provide hardware pin constantsesp8266: provide hardware pin constants likeGPIO2nrf51: define and useP0_xxconstantsnrf52840,samd21,samd51: unify bootloader entry processnrf52840,samd21,samd51: change usbSetup and sendZlp to publicnrf52840,samd21,samd51: refactor handleStandardSetup and initEndpointnrf52840,samd21,samd51: improve usb-device initializationnrf52840,samd21,samd51: move usbcdc to machine/usb/cdcrp2040: add usb serial vendor/product IDrp2040: add support for usbrp2040: change default for serial to usbrp2040: add support formachine.EnterBootloaderrp2040: turn off pullup/down when input type is not specifiedrp2040: make picoprobe default openocd interfacesamd51: add support forDAC1samd51: improve TRNGwasm: stubruntime.buffered,runtime.getcharwasi: make leveldb runtime hash the default
- boards
- add Challenger RP2040 LoRa
- add MCH2022 badge
- add XIAO RP2040
clue: remove pinsD21..D28feather-rp2040,macropad-rp2040: fix qspi-flash settingsxiao-ble: add support for flash-1200-bps-resetgopherbot,gopherbot2: add these aliases to simplify for newer users
0.24.0
- command line
- remove support for go 1.15
- remove support for LLVM 11 and LLVM 12
- add initial Go 1.19 beta support
test: fix package/... syntax
- compiler
- add support for the embed package
builder: improve error message for "command not found"builder: add support for ThinLTO on MacOS and Windowsbuilder: free LLVM objects after use, to reduce memory leakingbuilder: improve-no-debugerror messagescgo: be more strict: CGo now requires every Go file to import the headers it needscompiler: alignof(func) is 1 pointer, not 2compiler: add support for type parameters (aka generics)compiler: implementrecover()built-in functioncompiler: support atomic, volatile, and LLVM memcpy-like functions in defercompiler: drop support for macos syscalls via inline assemblyinterp: do not try to interpret past task.Pause()interp: fix some buggy localValue handlinginterp: do not unroll loopstransform: fix MakeGCStackSlots that caused a possible GC bug on WebAssembly
- standard library
os: enable os.Stdin for baremetal targetreflect: addValue.UnsafePointermethodruntime: scan GC globals conservatively on Windows, MacOS, Linux and Nintendo Switchruntime: add per-map hash seedsruntime: handle nil map write panicsruntime: add stronger hash functionssyscall: implementGetpagesize
- targets
atmega2560: support UART1-3 + example for uartavr: use compiler-rt for improved float64 supportavr: simplify timer-based timeavr: fix race condition in stack writedarwin: add support forGOARCH=arm64(aka Apple Silicon)darwin: support-size=shortand-size=fullflagrp2040: replace sleep 'busy loop' with timer alarmrp2040: align api forPortMaskSet,PortMaskClearrp2040: fix GPIO interruptssamd21,samd51,nrf52840: add support for USBHID (keyboard / mouse)wasm: update wasi-libc versionwasm: use newer WebAssembly features
- boards
- add Badger 2040
matrixportal-m4: attach USB DP to the correct pinteensy40: add I2C supportwioterminal: fix I2C definition
0.23.0
- command line
- add
-workflag - add Go 1.18 support
- add LLVM 14 support
run: add support for command-line parametersbuild: calculate default output path if-ois not specifiedbuild: add JSON outputtest: support multiple test binaries with-ctest: support flags like-von all targets (including emulated firmware)
- add
- compiler
- add support for ThinLTO
- use compiler-rt from LLVM
builder: prefer GNU build ID over Go build ID for cachingbuilder: add support for cross compiling to Darwinbuilder: support machine outlining pass in stacksize calculationbuilder: disable asynchronous unwind tablescompileopts: fix emulator configuration on non-amd64 Linux architecturescompiler: move allocations > 256 bytes to the heapcompiler: fix incorrectunsafe.Alignofon some 32-bit architecturescompiler: accept alias for slicecapbuiltincompiler: allow slices of empty structscompiler: fix difference in aliases in interface methodscompiler: makeRawSyscallan alias forSyscallcompiler: remove support for memory references inAsmFullloader: only add Clang header path for CGotransform: fix poison value in heap-to-stack transform
- standard library
internal/fuzz: add this package as a shimos: implement readdir for darwin and linuxos: addDirFS, which is used by many programs to access readdir.os: isWine: be compatible with older versions of wine, tooos: implementRemoveAllos: Use auintptrforNewFileos: add stubs forexec.ExitErrorandProcessState.ExitCodeos: export correct values forDevNullfor each OSos: improve support forSignalby fixing various bugsos: implementFile.Fdmethodos: implementUserHomeDiros: addexec.ProcessStatestubos: implementPipefor darwinos: define stubErrDeadlineExceededreflect: add stubs for more missing methodsreflect: renamereflect.Ptrtoreflect.Pointerreflect: addValue.FieldByIndexErrstubruntime: fix various small GC bugsruntime: use memzero for leaking collector instead of manually zeroing objectsruntime: implementmemhashruntime: implementfastrandruntime: add stub fordebug.ReadBuildInforuntime: add stub forNumCPUruntime: don't inlineruntime.allocwith-gc=leakingruntime: addVersionruntime: add stubs forNumCgoCallandNumGoroutineruntime: stub {Lock,Unlock}OSThread on Windowsruntime: be able to deal with a very small heapsyscall: makeEnvironreturn a copy of the environmentsyscall: implement getpagesize and munmapsyscall:wasi: defineMAP_SHAREDandPROT_READsyscall: stub mmap(), munmap(), MAP_SHARED, PROT_READ, SIGBUS, etc. on nonhosted targetssyscall: darwin: more complete list of signalssyscall:wasi: more complete list of signalssyscall: stubWaitStatussyscall/js: allow copyBytesTo(Go|JS) to useUint8ClampedArraytesting: implementTempDirtesting: nudge type TB closer to upstream; should be a no-op change.testing: on baremetal platforms, use simpler test matcher
- targets
atsamd: fix usbcdc initialization when-serial=uartatsamd51: allow higher frequency when using SPIesp: support CGoesp32c3: add support for input pinesp32c3: add support for GPIO interruptsesp32c3: add support to receive UART datarp2040: fix PWM bug at high frequencyrp2040: fix some minor I2C bugsrp2040: fix incorrect inline assemblyrp2040: fix spurious i2c STOP during write+read transactionrp2040: improve ADC supportwasi: remove--export-dynamiclinker flagwasm: remove heap allocator from wasi-libc
- boards
circuitplay-bluefruit: move pin mappings so board can be compiled for WASM use in Playgroundesp32-c3-12f: add the ESP32-C3-12f Kitm5stamp-c3: add pin setting of UARTmacropad-rp2040: add the Adafruit MacroPad RP2040 boardnano-33-ble: typo in LPS22HB peripheral definition and documentation (#2579)teensy41: add the Teensy 4.1 boardteensy40: add ADC supportteensy40: add SPI supportthingplus-rp2040: add the SparkFun Thing Plus RP2040 boardwioterminal: add DefaultUARTwioterminal: verify written data when flashing through OpenOCDxiao-ble: add XIAO BLE nRF52840 support
0.22.0
- command line
- add asyncify to scheduler flag help
- support -run for tests
- remove FreeBSD target support
- add LLVM 12 and LLVM 13 support, use LLVM 13 by default
- add support for ARM64 MacOS
- improve help
- check /run/media as well as /media on Linux for non-debian-based distros
test: set cmd.Dir even when running emulatorsinfo: add JSON output using the-jsonflag
- compiler
builder: fix off-by-one in size calculationbuilder: handle concurrent library header renamebuilder: use flock to avoid double-compilesbuilder: use build ID as cache keybuilder: add -fno-stack-protector to musl buildbuilder: update clang header search path to look in /usr/libbuilder: explicitly disable unwind tables for ARMcgo: add support forC.CStringand related functionscompiler: fix ranging over maps with particular map typescompiler: add correct debug location to init instructionscompiler: fix emission of large object layoutscompiler: work around AVR atomics bugscompiler: predeclare runtime.trackPointerinterp: work around AVR function pointers in globalsinterp: run goroutine starts and checks at runtimeinterp: always run atomic and volatile loads/stores at runtimeinterp: bump timeout to 180 secondsinterp: handle type assertions on nil interfacesloader: eliminate goroot cache inconsistencyloader: respect $GOROOT when runninggo listtransform: allocate the correct amount of bytes in an allocatransform: remove switched func lowering
- standard library
crypto/rand: show error if platform has no rngdevice/*: add*_Mskfield for each bit field and avoid duplicatesdevice/*: provide Set/Get for each register field described in the SVD filesinternal/task: swap stack chain when switching goroutinesinternal/task: remove-scheduler=coroutinesmachine: addDevicestring constantnet: add bare Interface implementationnet: add net.Buffersos: stub out support for some featuresos: obey TMPDIR on unix, TMP on Windows, etcos: implementReadAt,Mkdir,Remove,Stat,Lstat,CreateTemp,MkdirAll,Chdir,Chmod,Clearenv,Unsetenv,Setenv,MkdirTemp,Rename,Seek,ExpandEnv,Symlink,Readlinkos: implementFile.Statos: fixIsNotExiston nonexistent pathos: fix opening files on WASI in read-only modeos: work around lack ofsyscall.seekon 386 and armreflect: make sure indirect pointers are handled correctlyruntime: allow comparing interfacesruntime: use LLVM intrinsic to read the stack pointerruntime: strengthen hashmap hash function for structs and arraysruntime: fix float/complex hashingruntime: fix nil map dereferenceruntime: add realloc implementation to GCsruntime: handle negative sleep timesruntime: correct GC scan boundsruntime: remove extalloc GCrumtime: implement__synclibcalls as critical sections for most microcontrollersruntime: add stubs forFunc.FileLineandFrame.PCsync: fix concurrent read-lock on write-locked RWMutexsync: add a package docsync: add testssyscall: add support forMmapandMprotectsyscall: fix array size for mmap slice creationsyscall: enableGetwdin wasitesting: add a stub forCoverModetesting: support -bench option to run benchmarks matching the given pattern.testing: support b.SetBytes(); implement sub-benchmarks.testing: replace spaces with underscores in test/benchmark names, as upstream doestesting: implement testing.Cleanuptesting: allow filtering subbenchmarks with the-benchflagtesting: implement-benchtimeflagtesting: print durationtesting: allow filtering of subtests using-run
- targets
all: change LLVM features to match vanilla Clangavr: use interrupt-based timer which is much more accuratenrf: fix races in I2Csamd51: implement TRNG for randomnessstm32: pull-up on I2C linesstm32: fix timeout for i2c commsstm32f4,stm32f103: initial implementation for ADCstm32f4,stm32f7,stm32l0x2,stm32l4,stm32l5,stm32wl: TRNG implementation in crypto/randstm32wl: add I2C supportwindows: add support for the-size=flagwasm: add support fortinygo testwasi,wasm: raise default stack size to 16 KiB
- boards
- add M5Stack
- add lorae5 (stm32wle) support
- add Generic Node Sensor Edition
- add STM32F469 Discovery
- add M5Stamp C3
- add Blues Wireless Swan
bluepill: add definitions for ADC pinsstm32f4disco: add definitions for ADC pinsstm32l552ze: use supported stlink interfacemicrobit-v2: add some pin definitions
0.21.0
- command line
- drop support for LLVM 10
build: drop support for LLVM targets in the -target flagbuild: fix paths in error messages on Windowsbuild: add -p flag to set parallelismlldb: implementtinygo lldbsubcommandtest: use emulator exit code instead of parsing test outputtest: pass testing arguments to wasmtime
- compiler
- use -opt flag for optimization level in CFlags (-Os, etc)
builder: improve accuracy of the -size=full flagbuilder: hardcode some more frame sizes for _aeabi* functionsbuilder: add support for -size= flag for WebAssemblycgo: fix line/column reporting in syntax error messagescgo: support function definitions in CGo headerscgo: implement rudimentary C array decayingcgo: add support for stdio in picolibc and wasi-libccgo: run CGo parser per file, not per CGo fragmentcompiler: fix unintentionally exported math functionscompiler: properly implement div and rem operationscompiler: add support for recursive function typescompiler: add support for thegokeyword on interface methodscompiler: add minsize attribute for -Ozcompiler: add "target-cpu" and "target-features" attributescompiler: fix indices into strings and arrayscompiler: fix string compare functionsinterp: simplify some code to avoid some errorsinterp: support recursive globals (like linked lists) in globalsinterp: support constant globalsinterp: fix reverting of extractvalue/insertvalue with multiple indicestransform: work around renamed return type after merging LLVM modules
- standard library
internal/bytealg: fix indexing error in Compare()machine: support Pin.Get() function when the pin is configured as outputnet,syscall: Reduce code duplication by switching to internal/itoa.os: don't try to read executable path on baremetalos: implement Getwdos: add File.WriteString and File.WriteAtreflect: fix type.Size() to account for struct paddingreflect: don't construct an interface-in-interface valuereflect: implement Value.Elem() for interface valuesreflect: fix Value.Index() in a specific casereflect: add support for DeepEqualruntime: add another set of invalid unicode runes to encodeUTF8()runtime: only initialize os.runtime_args when neededruntime: only use CRLF on baremetal systems for printlnruntime/debug: stubdebug.SetMaxStackruntime/debug: stubdebug.Stacktesting: add a stub for t.Parallel()testing: add support for -test.short flagtesting: stub B.ReportAllocs()testing: addtesting.Verbosetesting: stubtesting.AllocsPerRun
- targets
- fix gen-device-svd to handle 64-bit values
- add CPU and Features property to all targets
- match LLVM triple to the one Clang uses
atsam: simplify definition of SERCOM UART, I2C and SPI peripheralsatsam: move I2S0 to machine fileesp32: fix SPI configurationesp32c3: add support for GDB debuggingesp32c3: add support for CPU interruptsesp32c3: use tasks scheduler by defaultfe310: increase CPU frequency from 16MHz to 320MHzfe310: add support for bit banging driverslinux: build static binaries using musllinux: reduce binary size by callingwriteinstead ofputcharlinux: add support for GOARMriscv: implement 32-bit atomic operationsriscv: align the heap to 16 bytesriscv: switch to tasks-based schedulerrp2040: add CPUFrequency()rp2040: improve I2C baud rate configurationrp2040: add pin interrupt APIrp2040: refactor PWM code and fix Period calculationstm32f103: fix SPIstm32f103: make SPI frequency selection more flexibleqemu: signal correct exit code to QEMUwasi: run C/C++ constructors at startupwasm: ensure heapptr is alignedwasm: update wasi-libc dependencywasm: wasi: use asyncifywasm: support-scheduler=nonewindows: add support for Windows (amd64 only for now)
- boards
feather-stm32f405,feather-rp2040: add I2C pin namesm5stack-core2: add M5Stack Core2nano-33-ble: SoftDevice s140v7 supportnano-33-ble: add constants for more on-board pins
0.20.0
- command line
- add support for Go 1.17
- improve Go version detection
- add support for the Black Magic Probe (BMP)
- add a flag for creating cpu profiles
- compiler
builder:list libraries at the end of the linker commandbuilder:strip debug information at link time instead of at compile timebuilder:add missing error check forioutil.TempFile()builder:simplify running of jobscompiler:move LLVM math builtin support into the compilercompiler:move math aliases from the runtime to the compilercompiler:add aliases for many hashing packagescompiler:add*ssa.MakeSlicebounds testscompiler:fix max possible slicecompiler:add support for new language features of Go 1.17compiler:fix equally named structs in different scopescompiler:avoid zero-sized alloca in channel operationsinterp:don't ignore array indices for untyped objectsinterp:keep reverted package initializers in orderinterp:fix bug in compiler-time/run-time package initializersloader:fix panic in CGo files with syntax errorstransform:improve GC stack slot pass to work around a bug
- standard library
crypto/rand: switch toarc4random_bufmath:fixmath.Maxandmath.Minmath/big: fix undefined symbols errornet:add MAC address implementationos:implementos.Executableos:addSEEK_SET,SEEK_CUR, andSEEK_ENDreflect:add StructField.IsExported methodruntime:reset heapptr to heapStart after preinit()runtime:addsubsections_via_symbolsto assembly files on darwintesting:add subset implementation of Benchmarktesting:test testing package usingtinygo testtesting:add support for the-test.vflag
- targets
386:bump minimum requirement to the Pentium 4arm:switch to Thumb instruction set on ARMatsamd:fix copy-paste error for atsamd21/51 calibTrim blockbaremetal,wasm: support command line params and environment variablescortexm:fix stack overflow because of unaligned stacksesp32c3:add support for the ESP32-C3 from Espressifnrf52840:fix ram sizenxpmk66f18:fix a suspicious bitwise operationrp2040:add SPI supportrp2040:add I2C supportrp2040:add PWM implementationrp2040:add openocd configurationstm32:add support for PortMask* functions for WS2812 supportunix:fix time base for time.Now()unix:check for mmap error and act accordinglywasm:override dlmalloc heap implementation from wasi-libcwasm:align heap to 16 byteswasm:add support for the crypto/rand package
- boards
- add
DefaultUARTto adafruit boards arduino-mkrwifi1010:add board definition for Arduino MKR WiFi 1010arduino-mkrwifi1010:fix pin definition ofNINA_RESETNfeather-nrf52:fix pin definition of uartfeather-rp2040:add pin name definitiongameboy-advance:fix ROM headermdbt50qrx-uf2:add Raytac MDBT50Q-RX Dongle with TinyUF2nano-rp2040:defineNINA_SPIand fix wifinina pinsteensy40:enable hardware UART reconfiguration, fix receive watermark interrupt
- add
0.19.0
- command line
- don't consider compile-only tests as failing
- add -test flag for
tinygo list - escape commands while printing them with the -x flag
- make flash-command portable and safer to use
- use
extended-remoteinstead ofremotein GDB - detect specific serial port IDs based on USB vid/pid
- add a flag to the command line to select the serial implementation
- compiler
cgo: improve constant parsercompiler: support chained interrupt handlerscompiler: add support for running a builtin in a goroutinecompiler: do not emit nil checks for loading closure variablescompiler: skip context parameter when starting regular goroutinecompiler: refactor method namescompiler: add function and global section pragmascompiler: implementsyscall.rawSyscallNoErrorin inline assemblyinterp: ignore inline assembly in markExternalinterp: fix a bug in pointer cast workaroundloader: fix testing a main package
- standard library
crypto/rand: replace this package with a TinyGo versionmachine: make USBCDC global a pointermachine: make UART objects pointer receiversmachine: define Serial as the default outputnet: add initial support for net.IPnet: add more net compatibilityos: add stub for os.ReadDiros: add FileMode constants from Go 1.16os: add stubs required for net/httpos: implement process related functionsreflect: implement AppendSlicereflect: add stubs required for net/httpruntime: make task.Data a 64-bit integer to avoid overflowruntime: expose memory statssync: implement NewCondsyscall: fix int type in libc version
- targets
cortexm: do not disable interrupts on abortcortexm: bump default stack size to 2048 bytesnrf: avoid heap allocation in waitForEventnrf: don't trigger a heap allocation in SPI.Transfernrf52840: add support for flashing with the BOSSA toolrp2040: add support for GPIO inputrp2040: add basic support for ADCrp2040: gpio and adc pin definitionsrp2040: implement UARTrp2040: patch elf to checksum 2nd stage bootstm32: add PWM for most chipsstm32: add support for pin interruptsstm32f103: add support for PinInputPullup / PinInputPulldownwasi: remove wasm build tag
- boards
feather-rp2040: add support for this boardfeather-nrf52840-sense: add board definition for this boardpca10059: support flashing from Windowsnano-rp2040: add this boardnano-33-ble: add support for this boardpico: add the Raspberry Pi Pico board with the new RP2040 chipqtpy: add pin for neopixels- all: add definition for ws2812 for supported boards
0.18.0
- command line
- drop support for Go 1.11 and 1.12
- throw an error when no target is specified on Windows
- improve error messages in
getDefaultPort(), support for multiple ports - remove
-cflagsand-ldflagsflags - implement
-ldflags="-X ..." - add
-print-allocsflag that lets you print all heap allocations - openocd commands in tinygo command line
- add
-llvm-featuresparameter - match
go testoutput - discover USB ports only, this will ignore f.ex. bluetooth
- use physicmal path instead of cached GOROOT in function getGoroot
- add goroot for snap installs
- compiler
builder: add support for-opt=0builder,compiler: compile and cache packages in parallelbuilder: run interp per packagebuilder: cache C and assembly file outputsbuilder: add support for-xflag to print commandsbuilder: add optsize attribute while building the packagebuilder: run function passes per packagebuilder: hard code Clang compilercompiler: do not usellvm.GlobalContext()compiler: remove SimpleDCE passcompiler: do not emit nil checks for*ssa.Allocinstructionscompiler: mergeruntime.typecodeIDand runtime.typeInInterfacecompiler: do not check for impossible type assertscompiler: fix use of global context:llvm.Int32Type()compiler: add interface IR testcompiler: fix lack of method name in interface matchingcompiler: fix "fragment covers entire variable" bugcompiler: optimize string literals and globalscompiler: decouple func lowering from interface type codescompiler: add function attributes to some runtime callscompiler: improve position information in error messagescgo: add support for CFLAGS in .c filesinterp: support GEP on fixed (MMIO) addressesinterp: handle(reflect.Type).Elem()interp: add support for runtime.interfaceMethodinterp: make toLLVMValue return an error instead of panickinginterp: add support for switch statementinterp: fix phi instructioninterp: remove map supportinterp: support extractvalue/insertvalue with multiple operandstransform: optimize string comparisons against ""transform: optimizereflect.TypeImplements()methodtransform: fix bug in interface lowering when signatures are renamedtransform: don't rely on struct name ofruntime.typecodeIDtransform: use IPSCCP pass instead of the constant propagation passtransform: fix func lowering assertion failuretransform: do not lower zero-sized alloc to allocatransform: split interface and reflect lowering
- standard library
runtime: add dummy debug packagemachine: fix data shift/mask in newUSBSetupmachine: makemachine.I2C0and similar objects pointersmachine: unify usbcdc codemachine: refactor PWM supportmachine: avoid heap allocations in USB codereflect: letreflect.Typebe of interface typereflect: implement a number of stub functionsreflect: check for access in theInterfacemethod callreflect: fixAssignableToandImplementsmethodsreflect: implementValue.CanAddrreflect: implementSizeofandAlignoffor func valuesreflect: implementNewfunctionruntime: implement command line arguments in hosted environmentsruntime: implement environment variables for Linuxruntime: improve timers on nrf, and samd chips
- targets
- all: use -Qunused-arguments only for assembly files
atmega1280: add PWM supportattiny: remove dummy UARTatsamd21: improve SPIatsamd51: fix PWM support in atsamd51p20atsamd5x: improve SPIatsamd51,atsame5x: unify samd51 and same5xatsamd51,atsamd21: fixADC.Get()value at 8bit and 10bitatsame5x: add support for CANavr: remove I2C stubs from attiny supportcortexm: check forarm-none-eabi-gdbandgdb-multiarchcommandscortexm: add__isr_vectorsymbolcortexm: disable FPU on Cortex-M4cortexm: clean up Cortex-M target filesfe310: fix SPI readgameboy-advance: Fix RGBA color interpretationnrf52833: add PWM supportstm32l0: use unified UART logicstm32: move f103 (bluepill) to common i2c codestm32: separate altfunc selection for UART Tx/Rxstm32: i2c implementation for F7, L5 and L4 MCUsstm32: make SPI CLK fast to fix data issuestm32: support SPI on L4 seriesunix: avoid possible heap allocation with-opt=0unix: use conservative GC by defaultunix: use the tasks scheduler instead of coroutineswasi: upgrade WASI version to wasi_snapshot_preview1wasi: darwin: support basic file io based on libcwasm: only export explicitly exported functionswasm: use WASI ABI for exit functionwasm: scan globals conservatively
- boards
arduino-mega1280: add support for the Arduino Mega 1280arduino-nano-new: Add Arduino Nano w/ New Bootloader targetatsame54-xpro: add initial support this boardfeather-m4-can: add initial support for this boardgrandcentral-m4: add board support for Adafruit Grand Central M4 (SAMD51)lgt92: update to new UART structuremicrobit: remove LED constantmicrobit-v2: add support for S113 SoftDevicenucleol432: add support for this boardnucleo-l031k6: add this boardpca10059: initial support for this boardqtpy: fix msd-volume-nameqtpy: fix i2c settingteensy40: move txBuffer allocation to UART declarationteensy40: add UART0 as alias for UART1
0.17.0
- command line
- switch to LLVM 11 for static builds
- support gdb debugging with AVR
- add support for additional openocd commands
- add
-xflag to print commands - use LLVM 11 by default when linking LLVM dynamically
- update go-llvm to use LLVM 11 on macOS
- bump go.bug.st/serial to version 1.1.2
- do not build LLVM with libxml to work around a bugo on macOS
- add support for Go 1.16
- support gdb daemonization on Windows
- remove support for LLVM 9, to fix CI
- kill OpenOCD if it does not exit with a regular quit signal
- support
-ocd-outputon Windows
- compiler
builder: parallelize most of the buildbuilder: remove unused cacheKey parameterbuilder: add -mcpu flag while building librariesbuilder: wait for running jobs to finishcgo: add support for variadic functionscompiler: fix undefined behavior in wordpackcompiler: fix incorrect "exported function" paniccompiler: fix non-int integer constants (fixing a crash)compiler: refactor and add testscompiler: emit a nil check when slicing an array pointercompiler: saturate float-to-int conversionscompiler: test float to int conversions and fix upper-bound calculationcompiler: support all kinds of deferred builtinscompiler: remove ir packagecompiler: remove unnecessary main.main call workaroundcompiler: move the setting of attributes to getFunctioncompiler: create runtime types lazily when neededcompiler: move settings to a separate Config structcompiler: work around an ARM backend bug in LLVMinterp: rewrite entire packageinterp: fix alignment of untyped globalsloader: use name "main" for the main packageloader: support imports from vendor directoriesstacksize: add support for DW_CFA_offset_extendedtransform: show better error message in coroutines lowering
- standard library
machine: accept configuration struct for ADC parametersmachine: make I2C.Configure signature consistentreflect: implement PtrToruntime: refactor to simplify stack switchingruntime: put metadata at the top end of the heap
- targets
atsam: add a length check to findPinPadMappingatsam: improve USBCDCatsam: avoid infinite loop when USBCDC is disconnectedavr: add SPI support for Atmega based chipsavr: use Clang for compiling C and assembly filesesp32: implement task based scheduleresp32: enable the FPUesp8266: implement task based scheduleresp: add compiler-rt libraryesp: add picolibcnrf: refactor code a bit to reduce duplicationnrf: use SPIM peripheral instead of the legacy SPI peripheralnrf: update nrfx submodule to latest commitnrf52840: ensure that USB CDC interface is only initialized oncenrf52840: improve USBCDCstm32: use stm32-rs SVDs which are of much higher qualitystm32: harmonization of UART logicstm32: replace I2C addressable interface with simpler typestm32: fix i2c and add stm32f407 i2cstm32: revert change that adds support for channels in interruptswasm: implement a growable heapwasm: fix typo in wasm_exec.js, syscall/js.valueLoadString()wasm: Namespaced Wasm Imports so they don't conflict across modules, or reserved LLVM IRwasi: support env variables based on libcwasi: specify wasi-libc in a different way, to improve error message
- boards
matrixportal-m4: add support for board Adafruit Matrix Portal M4mkr1000: add this boardnucleo-f722ze: add this boardclue: correct volume name and add alias for release version of Adafruit Clue boardp1am-100: add support for the P1AM-100 (similar to Arduino MKR)microbit-v2: add initial support based on work done by @alankrantas thank you!lgt92: support for STM32L0 MCUs and Dragino LGT92 devicenicenano: nice!nano board supportcircuitplay-bluefruit: correct internal I2C pin mappingclue: correct for lack of low frequency crystaldigispark: split off attiny85 targetnucleo-l552ze: implementation with CLOCK, LED, and UARTnrf52840-mdk-usb-dongle: add this board
0.16.0
- command-line
- add initial support for LLVM 11
- make lib64 clang include path check more robust
build: improve support for GOARCH=386 and add testsgdb: add support for qemu-user targetstest: support non-host teststest: add support for -c and -o flagstest: implement some benchmark stubs
- compiler
builder: improve detection of clang on Fedoracompiler: fix floating point comparison bugscompiler: implement negate for complex numbersloader: fix linkname in test binariestransform: add missing return pointer restore for regular coroutine tail calls
- standard library
machine: switch default frequency to 4MHzmachine: clarify caller's responsibility inSetInterruptos: addLookupEnv()stubreflect: implementSwapperruntime: fix UTF-8 decodingruntime: gc: use raw stack access whenever possibleruntime: use dedicated printfloat32runtime: allow ranging over a nil mapruntime: avoid device/nxp dependency in HardFault handlertesting: implement dummy Helper methodtesting: add Run method
- targets
arm64: add support for SVCall intrinsicatsamd51: avoid panic when configuring SPI with SDI=NoPinavr: properly support the.rodatasectionesp8266: implementPin.Getfunctionnintendoswitch: fix crash when printing long lines (> 120)nintendoswitch: add env parser and removed unused stuffnrf: add I2C error checkingnrf: give more flexibility in picking SPI speedsnrf: fix nrf52832 flash sizestm32f103: support wakeups from interruptsstm32f405: add SPI supportstm32f405: add I2C supportwasi: add support for this targetwasi: use 'generic' ABI by defaultwasi: remove --no-threads flag from wasm-ldwasm: add instanceof support for WebAssemblywasm: use fixed length buffer for putchar
- boards
d1mini: add this ESP8266 based boardesp32: use board definitions instead of chip namesqtpy: add board definition for Adafruit QTPyteensy40: add this board
0.15.0
- 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 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_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 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 directly
- boards
arduino-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-stm32f405
- build
all: run test binaries in the correct directorybuild: Fix arch release jobci: runtinygo testfor 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 cases
- docs
- add ESP32, ESP8266, and Adafruit Feather STM32F405 to list of supported boards
0.14.1
- command-line
- support for Go 1.15
- compiler
- loader: work around Windows symlink limitation
0.14.0
- command-line
- fix
getDefaultPort()on non-English Windows locales - compileopts: improve error reporting of unsupported flags
- fix test subcommand
- use auto-retry to locate MSD for UF2 and HEX flashing
- fix touchSerialPortAt1200bps on Windows
- support package names with backslashes on Windows
- fix
- compiler
- fix a few crashes due to named types
- add support for atomic operations
- move the channel blocked list onto the stack
- fix -gc=none
- fix named string to
[]byteslice conversion - implement func value and builtin defers
- add proper parameter names to runtime.initAll, to fix a panic
- builder: fix picolibc include path
- builder: use newer version of gohex
- builder: try to determine stack size information at compile time
- builder: remove -opt=0
- interp: fix sync/atomic.Value load/store methods
- loader: add Go module support
- transform: fix debug information in func lowering pass
- transform: do not special-case zero or one implementations of a method call
- transform: introduce check for method calls on nil interfaces
- transform: gc: track 0-index GEPs to fix miscompilation
- cgo
- Add LDFlags support
- standard library
- extend stdlib to allow import of more packages
- replace master/slave terminology with appropriate alternatives (MOSI->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: implementsync.Condsync: add WaitGroup
- targets
arm: allow nesting in DisableInterrupts and EnableInterruptsarm: make FPU configuration 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 supportriscv: 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 XIAO
0.13.1
- standard library
runtime: do not put scheduler and GC code in the same sectionruntime: copy stack scan assembly for GBA
- boards
gameboy-advance: always use ARM mode instead of Thumb mode
0.13.0
- command line
- use
gdb-multiarchfor debugging Cortex-M chips - support
tinygo runwith simavr - support LLVM 10
- support Go 1.14
- retry 3 times when attempting to do a 1200-baud reset
- use
- compiler
- mark the
abortfunction as noreturn - fix deferred calls to exported functions
- add debug info for local variables
- check for channel size limit
- refactor coroutine lowering
- add
dereferenceable_or_nullattribute to pointer parameters - do not perform nil checking when indexing slices and on
unsafe.Pointer - remove
runtime.isnilhack - use LLVM builtins for runtime
memcpy/memmove/memzerofunctions - implement spec-compliant shifts on negative/overflow
- support anonymous type asserts
- track pointer result of string concatenation for GC
- track PHI nodes for GC
- add debug info to goroutine start wrappers
- optimize comparing interface values against nil
- fix miscompilation when deferring an interface call
- builder: include picolibc for most baremetal targets
- builder: run tools (clang, lld) as separate processes
- builder: use
-fshort-enumsconsistently - interp: add support for constant type asserts
- interp: better support for interface operations
- interp: include backtrace with error
- transform: do not track const globals for GC
- transform: replace panics with source locations
- transform: fix error in interface lowering pass
- transform: make coroutine lowering deterministic
- transform: fix miscompilation in func lowering
- mark the
- cgo
- make
-Iand-Lpaths absolute
- make
- standard library
machine: set the USB VID and PID to the manufacturer valuesmachine: correct USB CDC composite descriptorsmachine: moveerrors.Newcalls to globalsruntime: support operations on nil mapsruntime: fix copy builtin return value on AVRruntime: refactor goroutinesruntime: support-scheduler=noneon most platformsruntime: run package initialization in the main goroutineruntime: exportmalloc/freefor 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: includeReplaceBitsmethodsync: implement trivialsync.Map
- targets
arm: use-fomit-frame-pointeratmega1284: 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-mmcuflag 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: supportsyscall/js.CopyBytesToJSwasm: sync polyfills from Go 1.14.
- boards
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: addreelboard-s140v7SoftDevice target
0.12.0
- command line
- add initial FreeBSD support
- remove getting a serial port in gdb subcommand
- add support for debugging through JLinkGDBServer
- fix CGo when cross compiling
- remove default port check for Digispark as micronucleus communicates directly using HID
- differentiate between various serial/USB error messages
- builder
- improve detection of Clang headers
- compiler
- fix assertion on empty interface
- don't crash when encountering
types.Invalid - revise defer to use heap allocations when running a variable number of times
- improve error messages for failed imports
- improve "function redeclared" error
- add globaldce pass to start of optimization pipeline
- add support for debugging globals
- implement RISC-V CSR operations as intrinsics
- add support for CGO_ENABLED environment variable
- do not emit debug info for extern globals (bugfix)
- add support for interrupts
- implement maps for arbitrary keys
- interp: error location for "unknown GEP" error
- wasm-abi: create temporary allocas in the entry block
- cgo
- add support for symbols in
#define - fix a bug in number tokenization
- add support for symbols in
- standard library
machine: avoid bytes package in USB logicruntime: fix external address declarationsruntime: provide implementation forinternal/bytealg.IndexByte
- targets
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/stdout
- boards
arduino: 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 default
0.11.0
- command line
- add support for QEMU in
gdbsubcommand - use builtin Clang when building statically, dropping the clang-9 dependency
- search for default serial port on both macOS and Linux
- windows: support
tinygo flashdirectly by using win32 wmi
- add support for QEMU in
- compiler
- add location information to the IR checker
- make reflection sidetables constant globals
- improve error locations in goroutine lowering
- interp: improve support for maps with string keys
- interp: add runtime fallback for mapassign operations
- standard library
machine: add support forSPI.Tx()on play.tinygo.orgmachine: renameCPU_FREQUENCYtoCPUFrequency()
- targets
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 tocortex-m-qemu
0.10.0
- command line
- halt GDB after flashing with
gdbsubcommand - fix a crash when using
-ocd-output - add
infosubcommand - add
-programmerflag
- halt GDB after flashing with
- builder
- macos: use llvm@8 instead of just llvm in paths
- add
linkerscriptkey to target JSON files - write a symbol table when writing out the compiler-rt lib
- make Clang header detection more robust
- switch to LLVM 9
- compiler
- fix interface miscompilation with reflect
- fix miscompile of static goroutine calls to closures
- fix
todo: storepanic - fix incorrect starting value for optimized allocations in a loop
- optimize coroutines on non-Cortex-M targets
- fix crash for programs which have heap allocations but never hit the GC
- add support for async interface calls
- fix inserting non-const values in a const global
- interp: improve error reporting
- interp: implement comparing ptrtoint to 0
- cgo
- improve diagnostics
- implement the constant parser (for
#define) as a real parser - rename reserved field names such as
type - avoid
"unsafe" imported but not usederror - include all enums in the CGo Go AST
- add support for nested structs and unions
- implement
#cgo CFLAGS
- standard library
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-M
- targets
arm: 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 IOT
0.9.0
- command line
- implement 1200-baud UART bootloader reset when flashing boards that support it
- flash using mass-storage device for boards that support it
- implement
tinygo env - add support for Windows (but not yet producing Windows binaries)
- add Go version to
tinygo env - update SVD files for up-to-date peripheral interfaces
- compiler
- add
//go:alignpragma - fix bug related to type aliases
- add support for buffered channels
- remove incorrect reflect optimization
- implement copying slices in init interpretation
- add support for constant indices with a named type
- add support for recursive types like linked lists
- fix miscompile of function nil panics
- fix bug related to goroutines
- add
- standard library
machine: do not check for nil slices inSPI.Txreflectlite: add support for Go 1.13runtime: implementinternal/bytealg.CountStringsync: properly handle nilNewfunc insync.Pool
- targets
arduino: fix .bss section initializationfe310: implementPin.Getgameboy-advance: support directly outputting .gba filessamd: reduce code size by avoiding reflectionsamd21: do not hardcode pin numbers for peripheralsstm32f103: avoid issue withtime.Sleepless than 200µs
0.8.0
- command line
- fix parsing of beta Go versions
- check the major/minor installed version of Go before compiling
- validate
-targetflag better to not panic on an invalid target
- compiler
- implement full slice expression:
s[:2:4] - fix a crash when storing a linked list in an interface
- fix comparing struct types by making type IDs more unique
- fix some bugs in IR generation
- add support for linked lists in reflect data
- implement
[]runeto string conversion - implement support for
goon func values
- implement full slice expression:
- standard library
reflect: add support for named typesreflect: add support fort.Bits()reflect: add basic support fort.AssignableTo()reflect: implementt.Align()reflect: add support for struct typesreflect: fix bug inv.IsNilandv.Pointerfor addressable valuesreflect: implement support for array typesreflect: implementt.Comparable()runtime: implement stack-based schedulerruntime: fix bug in the sleep queue of the schedulerruntime: implementmemcpyfor Cortex-Mtesting: implement stubtesting.Bstructtesting: add common test logging methods such as Errorf/Fatalf/Printf
- targets
386: 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 intime.Sleepatsamd51: fix minimum delay intime.Sleepnrf: 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 forarm.SystemReset()gameboy-advance: add initial support for the GameBoy Advancewasm: add//go:wasm-modulemagic comment to set the wasm module namewasm: add syscall/js.valueSetIndex supportwasm: add syscall/js.valueInvoke support
0.7.1
- targets
atsamd21: add support for the-portflag in the flash subcommand
0.7.0
- command line
- try more locations to find Clang built-in headers
- add support for
tinygo test - build current directory if no package is specified
- support custom .json target spec with
-targetflag - use zversion.go to detect version of GOROOT version
- make initial heap size configurable for some targets (currently WebAssembly only)
- cgo
- add support for bitfields using generated getters and setters
- add support for anonymous structs
- compiler
- show an error instead of panicking on duplicate function definitions
- allow packages like github.com/tinygo-org/tinygo/src/* by aliasing it
- remove
//go:volatilesupport
It has been replaced with the runtime/volatile package. - allow pointers in map keys
- support non-constant syscall numbers
- implement non-blocking selects
- add support for the
-tagsflag - add support for
stringto[]runeconversion - implement a portable conservative garbage collector (with support for wasm)
- add the
//go:noinlinepragma
- standard library
os: addos.Exitandsyscall.Exitos: add several stubsruntime: fix heap corruption in conservative GCruntime: add support for math intrinsics where supported, massively speeding up some benchmarkstesting: add basic support for testing
- targets
- add support for a generic target that calls
__tinygo_*functions for peripheral access arduino-nano33: add support for this boardhifive1: add support for this RISC-V boardreelboard: add e-paper pinsreelboard: addPowerSupplyActiveto enable voltage for on-board deviceswasm: put the stack at the start of linear memory, to detect stack overflows
- add support for a generic target that calls
0.6.0
- command line
- some portability improvements
- make
$GOROOTmore robust and configurable - check for Clang at the Homebrew install location as fallback
- compiler driver
- support multiple variations of LLVM commands, for non-Debian distributions
- compiler
- improve code quality in multiple ways
- make panic configurable, adding trap on panic
- refactor many internal parts of the compiler
- print all errors encountered during compilation
- implement calling function values of a named type
- implement returning values from blocking functions
- allow larger-than-int values to be sent across a channel
- implement complex arithmetic
- improve hashmap support
- add debuginfo for function arguments
- insert nil checks on stores (increasing code size)
- implement volatile operations as compiler builtins
- add
//go:inlinepragma - add build tags for the Go stdlib version
- cgo
- implement
char,enumandvoid*types - support
#includefor builtin headers - improve typedef/struct/enum support
- only include symbols that are necessary, for broader support
- mark external function args as
nocapture - implement support for some
#defineconstants - implement support for multiple CGo files in a single package
- implement
- standard library
machine: remove microbit matrix (moved to drivers repository)machine: refactor pins to usePintype instead ofGPIOruntime: print more interface types on panic, includingerror
- targets
arm: print an error on HardFault (including stack overflows)atsamd21: fix a bug in the ADC peripheralatsamd21: add support for I2Sfeather-m0: add support for this boardnrf51: fix a bug in I2Cstm32f103xx: fix a bug in I2Csyscall: implementExiton unixtrinket-m0: add support for this boardwasm: make main example smallerwasm: don't cache wasm file in the server, for ease of debuggingwasm: work around bug #41508 that caused a deadlock while linkingwasm: add support forjs.FuncOf
0.5.0
- compiler driver
- use
wasm-ldinstead ofwasm-ld-8on macOS - drop dependency on
llvm-ar - fix linker script includes when running outside
TINYGOROOT
- use
- compiler
- switch to LLVM 8
- add support for the Go 1.12 standard library (Go 1.11 is still supported)
- work around lack of escape analysis due to nil checks
- implement casting named structs and pointers to them
- fix int casting to use the source signedness
- fix some bugs around
make([]T, …)with uncommon index types - some other optimizations
- support interface asserts in interp for "math/rand" support
- resolve all func value targets at compile time (wasm-only at the moment)
- cgo
- improve diagnostics
- implement C
struct,union, and arrays - fix CGo-related crash in libclang
- implement
C.struct_types
- targets
- all baremetal: pretend to be linux/arm instead of js/wasm
avr: improveuintptrsupportcortexm: implement memmove intrinsic generated by LLVMcortexm: use the lld linker instead ofarm-none-eabi-lddarwin: use custom syscall package that links to libSystem.dylibmicrobit: add blink examplesamd21: support I2C1samd21: machine/atsamd21: correct pad/pin handling when using both UART and USBCDC interfaces at same timestm32f4discovery: add support for this boardwasm: support async func valueswasm: improve documentation and add extra example
0.4.1
- compiler
- fix
objcopyreplacement to include the .data section in the firmware image - use
llvm-ar-7on Linux to fix the Docker image
- fix
0.4.0
- compiler
- switch to the hardfloat ABI on ARM, which is more widely used
- avoid a dependency on
objcopy(arm-none-eabi-objcopyetc.) - fix a bug in
make([]T, n)wherenis 64-bits on a 32-bit platform - adapt to a change in the AVR backend in LLVM 8
- directly support the .uf2 firmware format as used on Adafruit boards
- fix a bug when calling
panic()at init time outside of the main package - implement nil checks, which results in a ~5% increase in code size
- inline slice bounds checking, which results in a ~1% decrease in code size
- targets
samd21: fix a bug in port B pinssamd21: implement SPI peripheralsamd21: implement ADC peripheralstm32: fix a bug in timekeepingwasm: fix a bug inwasm_exec.jsthat caused corruption in linear memory when running on Node.js.
0.3.0
- compiler
- remove old
-initinterpflag - add support for macOS
- remove old
- cgo
- add support for bool/float/complex types
- standard library
device/arm: add support to disable/enable hardware interruptsmachine: add CPU frequency for nrf-based boardssyscall: add support for darwin/amd64
- targets
circuitplay_express: add support for this boardmicrobit: add regular pin constantssamd21: fix time function for goroutine supportsamd21: add support for USB-CDC (serial over USB)samd21: add support for pins in port Bsamd21: add support for pullup and pulldown pinswasm: add support for Safari in example
0.2.0
- command line
- add version subcommand
- compiler
- fix a bug in floating point comparisons with NaN values
- fix a bug when calling
panicin package initialization code - add support for comparing
complex64andcomplex128
- cgo
- add support for external globals
- add support for pointers and function pointers
- standard library
fmt: initial support,fmt.Printlnworksmath: support for most/all functionsos: initial support (only stdin/stdout/stderr)reflect: initial supportsyscall: add support for amd64, arm, and arm64