Releases: tinygo-org/tinygo
0.25.0-beta1
This is a pre-release of TinyGo v0.25.0
You will need to install manually by downloading files from here. The beta versions are not available on Homebrew for macOS, nor for Scoop on Windows.
0.24.0
This release adds a few pretty major features to TinyGo: the embed
package, recover()
(for most non-wasm architectures), and generics. It also adds initial (incomplete) support for Go 1.19, which is still in beta. Apart from that, we have the usual assortment of new features and bug fixes and we add the Badger 2040 board.
One possible breaking change is that we will now use a few newer WebAssembly features. If this is a problem, let us know and we can add a new target without these newer features. We use them because it lowers the binary size of the .wasm
files.
Here is the complete changelog:
- 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-debug
error 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.UnsafePointer
methodruntime
: 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=short
and-size=full
flagrp2040
: replace sleep 'busy loop' with timer alarmrp2040
: align api forPortMaskSet
,PortMaskClear
rp2040
: 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
This release adds support for the recently released Go 1.18, although not for all language features yet. We have also added support for LLVM 14 which is the latest release of the compiler framework. Lots of improvements to the runtime and standard library support, especially when running in WASM/WASI environments. Also a whole bunch of bugfixes and improvements to our hardware support, in particular for the RP2040 processor.
The following new boards have been added this release:
Here is the complete list of changes:
- command line
- add
-work
flag - add Go 1.18 support
- add LLVM 14 support
run
: add support for command-line parametersbuild
: calculate default output path if-o
is not specifiedbuild
: add JSON outputtest
: support multiple test binaries with-c
test
: support flags like-v
on 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.Alignof
on some 32-bit architecturescompiler
: accept alias for slicecap
builtincompiler
: allow slices of empty structscompiler
: fix difference in aliases in interface methodscompiler
: makeRawSyscall
an alias forSyscall
compiler
: remove support for memory references inAsmFull
loader
: 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
: implementRemoveAll
os
: Use auintptr
forNewFile
os
: add stubs forexec.ExitError
andProcessState.ExitCode
os
: export correct values forDevNull
for each OSos
: improve support forSignal
by fixing various bugsos
: implementFile.Fd
methodos
: implementUserHomeDir
os
: addexec.ProcessState
stubos
: implementPipe
for darwinos
: define stubErrDeadlineExceeded
reflect
: add stubs for more missing methodsreflect
: renamereflect.Ptr
toreflect.Pointer
reflect
: addValue.FieldByIndexErr
stubruntime
: fix various small GC bugsruntime
: use memzero for leaking collector instead of manually zeroing objectsruntime
: implementmemhash
runtime
: implementfastrand
runtime
: add stub fordebug.ReadBuildInfo
runtime
: add stub forNumCPU
runtime
: don't inlineruntime.alloc
with-gc=leaking
runtime
: addVersion
runtime
: add stubs forNumCgoCall
andNumGoroutine
runtime
: stub {Lock,Unlock}OSThread on Windowsruntime
: be able to deal with a very small heapsyscall
: makeEnviron
return a copy of the environmentsyscall
: implement getpagesize and munmapsyscall
:wasi
: defineMAP_SHARED
andPROT_READ
syscall
: stub mmap(), munmap(), MAP_SHARED, PROT_READ, SIGBUS, etc. on nonhosted targetssyscall
: darwin: more complete list of signalssyscall
:wasi
: more complete list of signalssyscall
: stubWaitStatus
syscall/js
: allow copyBytesTo(Go|JS) to useUint8ClampedArray
testing
: implementTempDir
testing
: 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=uart
atsamd51
: 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-dynamic
linker 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
This release contains significantly improved standard library support with many more packages passing all tests. Especially the os package was improved a lot with many functions added to match the standard Go os package. In addition, we upgraded LLVM to LLVM 13, improved the build cache (no tinygo clean
anymore), and of course we've made various other improvements and bug fixes.
We've added the following boards this release:
- blues wireless Swan
- M5Stack
- M5Stamp C3
- Seeed LoRa-E5 Development Kit
- ST Micro STM32F469 "Discovery"
- ST Micro "Nucleo" WL55JC
- The Things Industries Generic Node Sensor Edition
Here are the changes in detail:
- 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-json
flag
- 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.CString
and 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
: elminate goroot cache inconsistencyloader
: respect $GOROOT when runninggo list
transform
: 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*_Msk
field 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=coroutines
machine
: addDevice
string 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
,Readlink
os
: implementFile.Stat
os
: fixIsNotExist
on nonexistent pathos
: fix opening files on WASI in read-only modeos
: work around lack ofsyscall.seek
on 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__sync
libcalls as critical sections for most microcontrollersruntime
: add stubs forFunc.FileLine
andFrame.PC
sync
: fix concurrent read-lock on write-locked RWMutexsync
: add a package docsync
: add testssyscall
: add support forMmap
andMprotect
syscall
: fix array size for mmap slice creationsyscall
: enableGetwd
in wasitesting
: add a stub forCoverMode
testing
: 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-bench
flagtesting
: implement-benchtime
flagtesting
: 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 test
wasi
,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
This release brings many small changes to the TinyGo compiler toolchain. Some of the highlights are: support for building Windows binaries in TinyGo, improved goroutine support on WebAssembly using Asyncify, and many small fixes that together get 12 more standard library packages to pass the package tests. Of course, there is also a number of improvements for microcontrollers such as ESP32-C3 and the RP2040. And lastly, we've added support for the M5Stack Core2 board.
- 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 lldb
subcommandtest
: 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 thego
keyword 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.SetMaxStack
runtime/debug
: stubdebug.Stack
testing
: add a stub for t.Parallel()testing
: add support for -test.short flagtesting
: stub B.ReportAllocs()testing
: addtesting.Verbose
testing
: 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 callingwrite
instead ofputchar
linux
: 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=none
windows
: 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
This release adds support for Go 1.17, fixes a bunch of compiler bugs (especially for WebAssembly), and adds support for a few new boards including boards based on the ESP32-C3 chip.
- 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.MakeSlice
bounds 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_buf
math:
fixmath.Max
andmath.Min
math/big
: fix undefined symbols errornet:
add MAC address implementationos:
implementos.Executable
os:
addSEEK_SET
,SEEK_CUR
, andSEEK_END
reflect:
add StructField.IsExported methodruntime:
reset heapptr to heapStart after preinit()runtime:
addsubsections_via_symbols
to assembly files on darwintesting:
add subset implementation of Benchmarktesting:
test testing package usingtinygo test
testing:
add support for the-test.v
flag
- 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
DefaultUART
to adafruit boards arduino-mkrwifi1010:
add board definition for Arduino MKR WiFi 1010arduino-mkrwifi1010:
fix pin definition ofNINA_RESETN
feather-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_SPI
and fix wifinina pinsteensy40:
enable hardware UART reconfiguration, fix receive watermark interrupt
- add
0.19.0
This release contains a bunch of small changes such as improvements to serial output, various compiler improvements, and the addition of TinyGo versions of the net and crypto/rand packages. The net package isn't complete, it is a work in progress and will eventually allow for plugging in different network stacks.
When it comes to board support, this release has one significant addition: the RP2040 chip developed by the Raspberry Pi foundation used on boards from some vendors. It also adds support for two new nRF52840-based boards.
- 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-remote
instead ofremote
in 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.rawSyscallNoError
in 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
This release is the combination of more than two months of work, including improvements to reflection, a big change to the PWM API to make it more powerful (including support for servos!), support for command line parameters and environment variables, many improvements to SAM and STM32 chip support. It also saw the addition of various new boards.
Note that this release drops support for Go 1.11 and Go 1.12, so if you're using one of those versions please upgrade to Go 1.13 or later.
- 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
-cflags
and-ldflags
flags - implement
-ldflags="-X ..."
- add
-print-allocs
flag that lets you print all heap allocations - openocd commands in tinygo command line
- add
-llvm-features
parameter - match
go test
output - 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=0
builder
,compiler
: compile and cache packages in parallelbuilder
: run interp per packagebuilder
: cache C and assembly file outputsbuilder
: add support for-x
flag 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.Alloc
instructionscompiler
: mergeruntime.typecodeID
and 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.Type
Implements()
methodtransform
: fix bug in interface lowering when signatures are renamedtransform
: don't rely on struct name ofruntime.typecodeID
transform
: 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.I2C0
and similar objects pointersmachine
: unify usbcdc codemachine
: refactor PWM supportmachine
: avoid heap allocations in USB codereflect
: letreflect.Type
be of interface typereflect
: implement a number of stub functionsreflect
: check for access in theInterface
method callreflect
: fixAssignableTo
andImplements
methodsreflect
: implementValue.CanAddr
reflect
: implementSizeof
andAlignof
for func valuesreflect
: implementNew
functionruntime
: 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-gdb
andgdb-multiarch
commandscortexm
: add__isr_vector
symbolcortexm
: 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=0
unix
: 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
This is a large release of almost 3 months of work, with several improvements to the compiler, tinygo gdb
, many improvements to the machine package and finally the addition of several new boards. We've also updated TinyGo with support for LLVM 11 and Go 1.16.
- command line
- switch to LLVM 11 for static builds
- support gdb debugging with AVR
- add support for additional openocd commands
- add
-x
flag 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-output
on 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
This is the next release of TinyGo, this time featuring the addition of the Teensy 4.0 and the addition of initial WASI support, apart from numerous fixes and improvements (such as improved tinygo test
support). See the full changelog below.
- command-line
- add initial support for LLVM 11
- make lib64 clang include path check more robust
build
: improve support for GOARCH=386 and add 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 inSetInterrupt
os
: addLookupEnv()
stubreflect
: implementSwapper
runtime
: 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.rodata
sectionesp8266
: implementPin.Get
functionnintendoswitch
: 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