Skip to content

Releases: tinygo-org/tinygo

0.31.2

11 Mar 09:15
Compare
Choose a tag to compare

This is a patch release to address a few important items that were needed quickly by the community, and that have been addressed since the last full release.

  • general

    • update the net submodule to updated version with Buffers implementation
  • 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

28 Feb 15:59
Compare
Choose a tag to compare

This is a quick patch release to fix some critical issues that were noticed right after v0.31.0. Thank you to our team for the fast response!

  • general

    • fix Binaryen build in make task
    • update final build stage of Docker dev image to go1.22
    • only use GHA cache for building Docker dev image
    • update the net submodule to latest version
  • compiler

    • interp: make getelementptr offsets signed
    • interp: return a proper error message when indexing out of range

0.31.0

26 Feb 17:48
Compare
Choose a tag to compare

This is the highly anticipated first release of 2024! Some of the most requested features:

  • Go 1.22 support
  • macOS arm64 native binary release build
  • Nix flake support
  • LLVM 17

There are many improvements and fixes to the compiler and runtime. We also have a new net package for greatly improved network support on bare metal devices. We have a new wasm-unknown target for WebAssembly early adopters. And of course several new boards supported, such as the Adafruit QT Py ESP32-C, and the Thumby.

  • 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 ports subcommand that lists available serial ports for -port and -monitor
    • support wasmtime version 14
    • add -serial=rtt for 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 instances
    • cgo: add C._Bool type
    • cgo: fix calling CGo callback inside generic function
    • compileopts: set purego build tag by default so that more packages can be built
    • compileopts: force-enable CGo to avoid build issues
    • compiler: fix crash on type assert on interfaces with no methods
    • interp: print LLVM instruction in traceback
    • interp: support runtime times by running them at runtime
    • loader: 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 functions
    • internal/task, machine: make TinyGo code usable with "big Go" CGo
    • machine: implement I2C.SetBaudRate consistently across chips
    • machine: implement SPI.Configure consistently across chips
    • machine: add DeviceID for nrf, rp2040, sam, stm32
    • machine: use smaller UART buffer size on atmega chips
    • machine/usb: allow setting a serial number using a linker flag
    • math: support more math functions on baremetal (picolibc) systems
    • net: replace entire net package with a new one based on the netdev driver
    • os/user: add bare-bones implementation of this package
    • reflect: stub CallSlice and FuncOf
    • reflect: add TypeFor[T]
    • reflect: update IsZero to Go 1.22 semantics
    • reflect: move indirect values into interface when setting interfaces
    • runtime: stub Breakpoint
    • sync: implement trylock
  • targets
    • atmega: use UART double speed mode for fewer errors and higher throughput
    • atmega328pb: refactor to enable extra uart
    • avr: don't compile large parts of picolibc (math, stdio) for LLVM 17 support
    • esp32: switch over to the official SVD file
    • esp32c3: implement USB_SERIAL for USBCDC communication
    • esp32c3: implement I2C
    • esp32c3: implement RNG
    • esp32c3: add more ROM functions and update linker script for the in-progress wifi support
    • esp32c3: update to newer SVD files
    • rp2040: add support for UART hardware flow control
    • rp2040: add definition for machine.PinToggle
    • rp2040: set XOSC startup delay multiplier
    • samd21: add support for UART hardware flow control
    • samd51: add support for UART hardware flow control
    • wasm: increase default stack size to 64k for wasi/wasm targets
    • wasm: bump wasi-libc version to SDK 20
    • wasm: remove line of dead code in wasm_exec.js
  • new targets/boards
    • qtpy-esp32c3: add Adafruit QT Py ESP32-C3 board
    • mksnanov3: add support for the MKS Robin Nano V3.x
    • nrf52840-generic: add generic nrf52840 chip support
    • thumby: add support for Thumby
    • wasm: add new wasm-unknown target that doesn't depend on WASI or a browser
  • boards
    • arduino-mkrwifi1010, arduino-nano33, nano-rp2040, matrixportal-m4, metro-m4-airlift, pybadge, pyportal: add ninafw build tag and some constants for BLE support
    • gopher-badge: fix typo in USB product name
    • nano-rp2040: add UART1 and correct mappings for NINA via UART
    • pico: bump default stack size from 2kB to 8kB
    • wioterminal: expose UART4

0.30.0

21 Sep 13:47
Compare
Choose a tag to compare

This is a smaller but important release just in time for GopherCon US.

Some of the bigger changes of this release are switching to LLVM 16, fixes for two separate hard-to-reproduce compiler crashes, improvements to USB-MIDI, and added support for the Adafruit Gemma M0.

Here is the full list:

  • general
    • add LLVM 16 support, use it by default
  • compiler
    • build: work around a race condition by building Go SSA serially
    • compiler: fix a crash by not using the LLVM global context types
    • interp: don't copy unknown values in runtime.sliceCopy to fix miscompile
    • interp: fix crash in error report by not returning raw LLVM values
  • standard library
    • machine/usb/adc/midi: various improvements and API changes
    • reflect: add support for [...]T[]T in reflect
  • targets
    • atsamd21, atsamd51: add support for USB INTERRUPT OUT
    • rp2040: always use the USB device enumeration fix, even in chips that supposedly have the HW fix
    • wasm: 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

25 Aug 21:16
Compare
Choose a tag to compare

This release adds support for Go 1.21

It also adds compatibility with the new GOOS=wasip1 using the Go built-in WASI support.

There are a number of compiler and standard library improvements, such as even better reflection, and improved map/slice implementations.

We also have a bunch of useful fixes and improvements to various microcontrollers, including new support for hardware based watchdog timers (WDT) so your embedded devices can be more reliable than ever.

Here is the full changelog:

  • 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 in tinygo info output
    • main: improve detection of filesystems
    • main: use go env instead 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 function
    • tools/gen-device-svd: small changes needed for Renesas MCUs
  • compiler
    • builder: update message for max supported Go version
    • compiler,reflect: NumMethods reports exported methods only
    • compiler: add compiler-rt and wasm symbols to table
    • compiler: add compiler-rt to wasm.json
    • compiler: add min and max builtin support
    • compiler: implement clear builtin for maps
    • compiler: implement clear builtin for slices
    • compiler: improve panic message when a runtime call is unavailable
    • compiler: update .ll test output
    • loader: merge go.env file which is now required starting in Go 1.21 to correctly get required packages
  • standard library
    • os: define ErrNoDeadline
    • reflect: Add FieldByNameFunc
    • reflect: add SetZero
    • reflect: fix iterating over maps with interface{} keys
    • reflect: implement Value.Grow
    • reflect: remove unecessary heap allocations
    • reflect: use .key() instead of a type assert
    • sync: add implementation from upstream Go for OnceFunc, OnceValue, and OnceValues
  • targets
    • machine: UART refactor (#3832)
    • machine/avr: pin change interrupt
    • machine/macropad_rp2040: add machine.BUTTON
    • machine/nrf: add I2C timeout
    • machine/nrf: wait for stop condition after reading from the I2C bus
    • machine/nRF52: set SPI TX/RX lengths even data is empty. Fixes #3868 (#3877)
    • machine/rp2040: add missing suffix to CMD_READ_STATUS
    • machine/rp2040: add NoPin support
    • machine/rp2040: move flash related functions into separate file from C imports for correct - LSP. Fixes #3852
    • machine/rp2040: wait for 1000 us after flash reset to avoid issues with busy USB bus
    • machine/samd51,rp2040,nrf528xx,stm32: implement watchdog
    • machine/samd51: fix i2cTimeout was decreasing due to cache activation
    • machine/usb: Add support for HID Keyboard LEDs
    • machine/usb: allow USB Endpoint settings to be changed externally
    • machine/usb: refactor endpoint configuration
    • machine/usb: remove usbDescriptorConfig
    • machine/usb/hid,joystick: fix hidreport (3) (#3802)
    • machine/usb/hid: add RxHandler interface
    • machine/usb/hid: rename Handler() to TxHandler()
    • wasi: allow zero inodes when reading directories
    • wasm: add support for GOOS=wasip1
    • wasm: fix functions exported through //export
    • wasm: remove i64 workaround, use BigInt instead
    • example: adjust time offset
    • example: simplify pininterrupt
  • boards
    • targets: add AKIZUKI DENSHI AE-RP2040
    • targets: adding new uf2 target for PCA10056 (#3765)

0.28.1

11 Jun 22:59
Compare
Choose a tag to compare

This is a small patch release that fixes two issues:

  • The version was set to 0.28.0-dev in the v0.28.0 release, while it should not have the -dev prefix. This is fixed in v0.28.1.
  • A small bugfix for SPI on the rp2040 is included.

0.28.0

11 Jun 09:02
Compare
Choose a tag to compare

This release is packed with features! Here are some highlights:

  • Much improved reflect support, which means that many packages that previously didn't properly work are now mostly or entirely supported.
  • Added //go:wasmimport following upstream Go. This is the supported way to import functions, other ways (//export and the like) may stop working in the future.

This release also added support for several new boards, most notably our very own Gopher Badge developed by @conejoninja.

There are also two significant breaking changes for baremetal targets like microcontrollers: the runtime will now panic when an interrupt does a heap allocation inside an interrupt or when an interrupt does a blocking operation like a channel send. These were never correct, but might have accidentally worked in practice. If you hit one of these issues, TinyGo will usually print the source location where the problem originates when you use the -monitor parameter on tinygo flash. The fix for heap allocations is to restructure the code to not need them (for example, by using global variables) and the fix for blocking operations is to make them non-blocking, for example for a channel send:

select {
case someChan <- value:
default:
}

Of course, there is a very long list of smaller fixes and improvements, see the full list below:

  • 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 print ok for a successful compile-only
  • compiler
    • builder: remove non-ThinLTO build mode
    • builder: fail earlier if Go is not available
    • builder: improve -size=full in a number of ways
    • builder: implement Nordic DFU file writer in Go
    • cgo: allow LDFLAGS: --export=...
    • compiler: support recursive slice types
    • compiler: zero struct padding during map operations
    • compiler: add llvm.ident metadata
    • compiler: remove unsafe.Pointer(uintptr(v) + idx) optimization (use unsafe.Add instead)
    • compiler: add debug info to //go:embed data structures for better -size output
    • compiler: add debug info to string constants
    • compiler: fix a minor race condition
    • compiler: emit correct alignment in debug info for global variables
    • compiler: correctly generate reflect data for local named types
    • compiler: add alloc attributes to runtime.alloc, reducing flash usage slightly
    • compiler: for interface maps, use the original named type if available
    • compiler: implement most math/bits functions as LLVM intrinsics
    • compiler: ensure all defers have been seen before creating rundefers
  • standard library
    • internal/task: disallow blocking inside an interrupt
    • machine: add CPUReset
    • machine/usb/hid: add MediaKey support
    • machine/usb/hid/joystick: move joystick under HID
    • machine/usb/hid/joystick: allow joystick settings override
    • machine/usb/hid/joystick: handle case where we cannot find the correct HID descriptor
    • machine/usb/hid/mouse: add support for mouse back and forward
    • machine/usb: add ability to override default VID, PID, manufacturer name, and product name
    • net: added missing TCPAddr and UDPAddr implementations
    • os: add IsTimeout function
    • os: fix resource leak in (*File).Close
    • os: add (*File).Sync
    • os: implement (*File).ReadDir for wasi
    • os: implement (*File).WriteAt
    • reflect: make sure null bytes are supported in tags
    • reflect: refactor this package to enable many new features
    • reflect: add map type methods: Elem and Key
    • reflect: add map methods: MapIndex, MapRange/MapIter, SetMapIndex, MakeMap, MapKeys
    • reflect: add slice methods: Append, MakeSlice, Slice, Slice3, Copy, Bytes, SetLen
    • reflect: add misc methods: Zero, Addr, UnsafeAddr, OverflowFloat, OverflowInt, OverflowUint, SetBytes, Convert, CanInt, CanFloat, CanComplex, Comparable
    • reflect: add type methods: String, PkgPath, FieldByName, FieldByIndex, NumMethod
    • reflect: add stubs for Type.Method, CanConvert, ArrayOf, StructOf, MapOf
    • reflect: add stubs for channel select routines/types
    • reflect: allow nil rawType to call Kind()
    • reflect: ensure all ValueError panics have Kind fields
    • reflect: add support for named types
    • reflect: improve Value.String()
    • reflect: set Index and PkgPath field in Type.Field
    • reflect: Type.AssignableTo: you can assign anything to interface{}
    • reflect: add type check to Value.Field
    • reflect: let TypeOf(nil) return nil
    • reflect: move StructField.Anonymous field to match upstream location
    • reflect: add UnsafePointer for Func types
    • reflect: MapIter.Next needs to allocate new keys/values every time
    • reflect: fix IsNil for interfaces
    • reflect: fix Type.Name to return an empty string for non-named types
    • reflect: add VisibleFields
    • reflect: properly handle embedded structs
    • reflect: make sure PointerTo works for named types
    • reflect: Set: convert non-interface to interface
    • reflect: Set: fix direction of assignment check
    • reflect: support channel directions
    • reflect: print struct tags in Type.String()
    • reflect: properly handle read-only values
    • runtime: allow custom-gc SetFinalizer and clarify KeepAlive
    • runtime: implement KeepAlive using inline assembly
    • runtime: check for heap allocations inside interrupts
    • runtime: properly turn pointer into empty interface when hashing
    • runtime: improve map size hint usage
    • runtime: zero map key/value on deletion to so GC doesn't see them
    • runtime: print the address where a panic happened
    • runtime/debug: stub SetGCPercent, BuildInfo.Settings
    • runtime/metrics: add this package as a stub
    • syscall: Stat_t timespec fields are Atimespec on darwin
    • syscall: add Timespec.Unix() for wasi
    • syscall: add fsync using libc
    • testing: support -test.count
    • testing: make test output unbuffered when verbose
    • testing: add -test.skip
    • testing: move runtime.GC() call to runN to match upstream
    • testing: add -test.shuffle to order randomize test and benchmark order
  • targets
    • arm64: fix register save/restore to include vector registers
    • attiny1616: add support for this chip
    • cortexm: refactor EnableInterrupts and DisableInterrupts to avoid arm.AsmFull
    • cortexm: enable functions in RAM for go & cgo
    • cortexm: convert SystemStack from AsmFull to C inline assembly
    • cortexm: fix crash due to wrong stack size offset
    • nrf, samd21, stm32: add flash API
    • nrf: fix memory issue in ADC read
    • nrf: new peripheral type for nrf528xx chips
    • nrf, rp2040: implement target mode
    • nrf: improve ADC and add oversampling, longer sample time, and reference voltage
    • rp2040: change calling order for device enumeration fix to do first
    • rp2040: rtc delayed interrupt
    • rp2040: provide better errors for invalid pins on I2C and SPI
    • rp2040: change uart to allow for a single pin
    • rp2040: implement Flash interface
    • rp2040: remove SPI DataBits property
    • rp2040: unify all linker scripts using LDFLAGS
    • rp2040: remove SPI deadline for improved performance
    • rp2040: use 4MHz as default frequency for SPI
    • rp2040: implement target mode
    • rp2040: use DMA for send-only SPI transfers
    • samd21: rearrange switch case for get pin cfg
    • samd21: fix issue with WS2812 driver by making pin accesses faster
    • samd51: enable CMCC cache for greatly improved performance
    • samd21: remove extra BK0RDY clear
    • samd51: implement Flash interface
    • samd51: use correct SPI frequency
    • samd51: remove extra BK0RDY clear
    • samd51: fix ADC multisampling
    • wasi: allow users to set the runtime_memhash_tsip or runtime_memhash_fnv build tags
    • wasi: set WASMTIME_BACKTRACE_DETAILS when running in wasmtime.
    • wasm: implement the //go:wasmimport directive
  • boards
    • gameboy-advance: switch to use register definitions in device/gba
    • gameboy-advance: rename display and make pointer receivers
    • gopher-badge: Added Gopher Badge support
    • lorae5: add needed definition for UART2
    • lorae5: correct mapping for I2C bus, add pin mapping to enable power
    • pinetime: update the target file (rename from pinetime-devkit0)
    • qtpy: fix bad pin assignment
    • wioterminal: fix pin definition of BCM13
    • xiao: Pins D4 & D5 are I2C1. Use pins D2 & D3 for I2C0.
    • xiao: add DefaultUART

0.27.0

12 Feb 13:29
Compare
Choose a tag to compare

This release adds support for Go 1.20 and LLVM 15. In addition, it drops a dependency on the AVR and Xtensa toolchains, so you don't need to install avr-gcc or xtensa-esp32-elf-ld making TinyGo much easier to install. Instead, it uses the built-in LLVM linker instead.
Newly supported targets are windows/arm64 (or "Windows on ARM64"), Waveshare RP2040 Zero, Arduino Leonardo, Adafruit KB2040, Adafruit Feather M0 Express, Makerfabs ESP32C3SPI35, and Espressif ESP32-C3-DevKit-RUST-1. As usual, there are also a ton of smaller fixes and improvements.

Here is a detailed changelog for this release:

  • 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=custom option
    • main: print ldflags including ThinLTO flags with -x
    • main: fix error message when a serial port can't be accessed
    • main: add -timeout flag to allow setting how long TinyGo will try looking for a MSD volume for flashing
    • test: print PASS on pass when running standalone test binaries
    • test: fix printing of benchmark output
    • test: 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 library
    • compiler: fix stack overflow when creating recursive pointer types (fix for LLVM 15+ only)
    • compiler: allow map keys and values of ≥256 bytes
    • cgo: add support for C.float and C.double
    • cgo: support anonymous enums included in multiple Go files
    • cgo: add support for bitwise operators
    • interp: add support for constant icmp instructions
    • transform: fix memory corruption issues
  • standard library
    • machine/usb: remove allocs in USB ISR
    • machine/usb: add Port() and deprecate New() to have the API better match the singleton that is actually being returned
    • machine/usb: change HID usage-maximum to 0xFF
    • machine/usb: add USB HID joystick support
    • machine/usb: change to not send before endpoint initialization
    • net: implement Pipe
    • os: add stub for os.Chtimes
    • reflect: stub out Type.FieldByIndex
    • reflect: add Value.IsZero method
    • reflect: fix bug in .Field method when the field fits in a pointer but the parent doesn't
    • runtime: switch some panic() calls in the gc to runtimePanic() for consistency
    • runtime: add xorshift-based fastrand64
    • runtime: fix alignment for arm64, arm, xtensa, riscv
    • runtime: implement precise GC
    • runtime/debug: stub PrintStack
    • sync: implement simple pooling in sync.Pool
    • syscall: stubbed Setuid, Exec and friends
    • syscall: add more stubs as needed for Go 1.20 support
    • testing: implement t.Setenv
    • unsafe: add support for Go 1.20 slice/string functions
  • targets
    • all: do not set stack size per board
    • all: update picolibc to v1.7.9
    • atsame5x: fix CAN extendedID handling
    • atsame5x: reduce heap allocation
    • avr: drop GNU toolchain dependency
    • avr: fix .data initialization for binaries over 64kB
    • avr: support ThinLTO
    • baremetal: implements calloc
    • darwin: fix syscall.Open on darwin/arm64
    • darwin: fix error with tinygo lldb
    • esp: use LLVM Xtensa linker instead of Espressif toolchain
    • esp: use ThinLTO for Xtensa
    • esp32c3: add SPI support
    • linux: include musl getpagesize function in release
    • nrf51: add ADC implementation
    • nrf52840: add PDM support
    • riscv: add "target-abi" metadata flag
    • rp2040: remove mem allocation in GPIO ISR
    • rp2040: avoid allocating clock on heap
    • rp2040: add basic GPIO support for PIO
    • rp2040: fix USB interrupt issue
    • rp2040: fix RP2040-E5 USB errata
    • stm32: always set ADC pins to pullups floating
    • stm32f1, stm32f4: fix ADC by clearing the correct bit for rank after each read
    • stm32wl: Fix incomplete RNG initialisation
    • stm32wlx: change order for init so clock speeds are set before peripheral start
    • wasi: makes wasmtime "run" explicit
    • wasm: fix GC scanning of allocas
    • wasm: allow custom malloc implementation
    • wasm: remove -wasm-abi= flag (use -target instead)
    • wasm: fix scanning of the stack
    • wasm: fix panic when allocating 0 bytes using malloc
    • wasm: always run wasm-opt even with -scheduler=none
    • wasm: avoid miscompile with ThinLTO
    • wasm: allow the emulator to expand {tmpDir}
    • wasm: support ThinLTO
    • windows: update mingw-w64 version to avoid linker warning
    • windows: 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 configuration
    • xiao-rp2040: fix D9 and D10 constants
    • xiao-rp2040: add pin definitions

0.26.0

04 Oct 14:28
Compare
Choose a tag to compare

This is another TinyGo release with many small changes, including over 110 commits.

This release introduces two possible breaking changes:

  1. The machine package has had some changes in the public API, to remove some unintentionally exported constants. It is likely that very little real-world code is affected by this change.

  2. WebAssembly files could previously import functions by leaving a Go function unimplemented, like so:

    func add(a, b int) int

    This worked by accident. With this release, this is no longer possible. Instead, functions will need to be imported explicitly to avoid a compiler error:

    //export add
    func add(a, b int) int

    (The //export may be confusing, we intend to add a less-confusing //go:wasm-import directive in the future).

Here is a detailed changelog for this release:

  • general
    • remove support for LLVM 13
    • remove calls to deprecated ioutil package
    • move from os.IsFoo to errors.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 functions
    • cgo: fix panic when FuncType.Results is nil
    • compiler: add aliases for edwards25519/field.feMul and field.feSquare
    • compiler: fix incorrect DWARF type in some generic parameters
    • compiler: use LLVM math builtins everywhere
    • compiler: replace some math operation bodies with LLVM intrinsics
    • compiler: replace math aliases with intrinsics
    • compiler: fix unsafe.Sizeof for chan and map values
    • compileopts: use tags parser from buildutil
    • compileopts: use backticks for regexp to avoid extra escapes
    • compileopts: fail fast on duplicate values in target field slices
    • compileopts: fix windows/arm target triple
    • compileopts: improve error handling when loading target/*.json
    • compileopts: add support for stlink-dap programmer
    • compileopts: do not complain about -no-debug on MacOS
    • goenv: support GOOS=android
    • interp: fix reading from external global
    • loader: fix link error for crypto/internal/boring/sig.StandardCrypto
  • standard library
    • rename assembly files to .S extension
    • machine: add PWM peripheral comments to pins
    • machine: improve UARTParity slightly
    • machine: do not export DFU_MAGIC_* constants on nrf52840
    • machine: rename PinInputPullUp/PinInputPullDown
    • machine: add KHz, MHz, GHz constants, deprecate TWI_FREQ_* constants
    • machine: remove level triggered pin interrupts
    • machine: do not expose RESET_MAGIC_VALUE
    • machine: use NoPin constant where appropriate (instead of 0 for example)
    • net: sync net.go with Go 1.18 stdlib
    • os: add SyscallError.Timeout
    • os: add ErrProcessDone error
    • reflect: implement CanInterface and fix string Index
    • runtime: make MemStats available to leaking collector
    • runtime: add MemStats.TotalAlloc
    • runtime: add MemStats.Mallocs and Frees
    • runtime: add support for time.NewTimer and time.NewTicker
    • runtime: implement resetTimer
    • runtime: ensure some headroom for the GC to run
    • runtime: make gc and scheduler asserts settable with build tags
    • runtime/pprof: add WriteHeapProfile
    • runtime/pprof: runtime/trace: stub some additional functions
    • sync: implement Map.LoadAndDelete
    • syscall: group WASI consts by purpose
    • syscall: add WASI {D,R}SYNC, NONBLOCK FD flags
    • syscall: add ENOTCONN on darwin
    • testing: add support for -benchmem
  • targets
    • remove USB vid/pid pair of bootloader
    • esp32c3: remove unused UARTStopBits constants
    • nrf: implement GetRNG function
    • nrf: rp2040: add machine.ReadTemperature
    • nrf52: cleanup s140v6 and s140v7 uf2 targets
    • rp2040: implement semi-random RNG based on ROSC based on pico-sdk
    • wasm: add summary of wasm examples and fix callback bug
    • wasm: do not allow undefined symbols (--allow-undefined)
    • wasm: make sure buffers returned by malloc are kept until free is called
    • windows: 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 tags
    • hifive1-qemu: remove this emulated board
    • wioterminal: add UART3 for RTL8720DN
    • xiao-ble: fix usbpid

0.25.0

03 Aug 12:48
Compare
Choose a tag to compare

This release improves USB support with new support for the RP2040 and MIDI, improves support for generics, fixes some bugs on darwin/arm64, and adds 3 new boards: the Challenger RP2040 LoRa, the MCH2022 badge, and the XIAO RP2040

  • command line
    • change to ignore PortReset failures
  • compiler
    • compiler: darwin/arm64 is aarch64, not arm
    • compiler: don't clobber X18 and FP registers on darwin/arm64
    • compiler: fix issue with methods on generic structs
    • compiler: do not try to build generic functions
    • compiler: fix type names for generic named structs
    • compiler: fix multiple defined function issue for generic functions
    • compiler: implement unsafe.Alignof and unsafe.Sizeof for generic code
  • standard library
    • machine: add DTR and RTS to Serialer interface
    • machine: reorder pin definitions to improve pin list on tinygo.org
    • machine/usb: add support for MIDI
    • machine/usb: adjust buffer alignment (samd21, samd51, nrf52840)
    • machine/usb/midi: add NoteOn, NoteOff, and SendCC methods
    • machine/usb/midi: add definition of MIDI note number
    • runtime: add benchmarks for memhash
    • runtime: add support for printing slices via print/println
  • targets
    • avr: fix some apparent mistake in atmega1280/atmega2560 pin constants
    • esp32: provide hardware pin constants
    • esp32: fix WDT reset on the MCH2022 badge
    • esp32: optimize SPI transmit
    • esp32c3: provide hardware pin constants
    • esp8266: provide hardware pin constants like GPIO2
    • nrf51: define and use P0_xx constants
    • nrf52840, samd21, samd51: unify bootloader entry process
    • nrf52840, samd21, samd51: change usbSetup and sendZlp to public
    • nrf52840, samd21, samd51: refactor handleStandardSetup and initEndpoint
    • nrf52840, samd21, samd51: improve usb-device initialization
    • nrf52840, samd21, samd51: move usbcdc to machine/usb/cdc
    • rp2040: add usb serial vendor/product ID
    • rp2040: add support for usb
    • rp2040: change default for serial to usb
    • rp2040: add support for machine.EnterBootloader
    • rp2040: turn off pullup/down when input type is not specified
    • rp2040: make picoprobe default openocd interface
    • samd51: add support for DAC1
    • samd51: improve TRNG
    • wasm: stub runtime.buffered, runtime.getchar
    • wasi: make leveldb runtime hash the default
  • boards
    • add Challenger RP2040 LoRa
    • add MCH2022 badge
    • add XIAO RP2040
    • clue: remove pins D21..D28
    • feather-rp2040, macropad-rp2040: fix qspi-flash settings
    • xiao-ble: add support for flash-1200-bps-reset
    • gopherbot, gopherbot2: add these aliases to simplify for newer users