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