Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d98f2f9
build: use Golang 1.26 for all builds
deadprogram Dec 20, 2025
b4a1463
builder: claim we support 1.26 now
dgryski Jan 8, 2026
f07c297
src/internal/itoa: resurrect from Go stdlib
dgryski Jan 8, 2026
2b44ae9
runtime: split syscall functions for darwin changes for 1.26
dgryski Mar 18, 2026
f60b5d5
internal/abi: add EscapeNonString, EscapeToResultNonString
dgryski Mar 18, 2026
b2c297f
sponsorship: add explicit callout/link in README to help out TinyGo
deadprogram Feb 11, 2026
d260ff6
Esp32s3 implement spi (#5169)
dimajolkin Feb 15, 2026
264c3f6
fix: init heap before random number seed on wasm platforms
deadprogram Feb 15, 2026
00ef833
targets: correct name/tag use for esp32s3-wroom1 board
deadprogram Feb 16, 2026
f934028
make: remove machine without board from smoketest
deadprogram Feb 16, 2026
85a27d9
esp32s3-usbserial: added usbserial printing
dimajolkin Feb 15, 2026
6fdd591
esp32s3-usbserial: split usb
dimajolkin Feb 16, 2026
23a85a6
esp32s3-usbserial: common usbserial for both esp32c3 & esp32s3
dimajolkin Feb 17, 2026
36242bc
esp32s3-usbserial: move InitSerial to init method
dimajolkin Feb 17, 2026
efbce97
runtime: implement fminimum/fmaximum
niaow Feb 9, 2026
46a9094
export UART0 and pins
cowellmi Feb 17, 2026
cb88a31
Esp32s3 i2c interface (#5210)
dimajolkin Feb 21, 2026
d7187e8
transform: modify output format from the -print-allocs flag to be the…
deadprogram Feb 24, 2026
da45ade
esp3s3 & esp32c3 PWM implements (#5215)
dimajolkin Feb 25, 2026
c794ffa
update tools/gen-device-svd w.r.t. recent changes to the structure of…
knieriem Feb 25, 2026
a9307c1
lib/stm32-svd: update submodule
knieriem Feb 25, 2026
762d2ea
targets/nucleo-f722ze.json: add build-tag stm32f722, change stm32f7x2…
knieriem Nov 28, 2025
1cd5a64
targets/swan: rename group build tag stm32l4x5 => stm32l4y5 to avoid …
knieriem Feb 23, 2026
1e76eb5
machine: sync stm32g0 with updated stm32 device files
knieriem Feb 23, 2026
906a449
machine: stm32l0x1,l0x2: TIM: adapt to 32-bit register access
knieriem Feb 23, 2026
1530265
targets: add support for Seeedstudio Xiao-RP2350 board.
deadprogram Feb 26, 2026
e740c60
feature: add esp32flash flash method for esp32s3/esp32c3/esp32/esp8266
deadprogram Feb 27, 2026
2e246ba
targets: modify esp32, esp32s3, esp32c3, & esp8266 targets to use bui…
deadprogram Feb 27, 2026
18c0671
modules: update espflash to 0.2.0 for esp8266 fixes
deadprogram Feb 28, 2026
32b5a8e
machine: implement RNG for esp32s3 based on the onboard hardware rand…
deadprogram Feb 27, 2026
bde5b26
esp32s3 + c3 ADC (#5231)
dimajolkin Mar 1, 2026
f44164d
usb/cdc: Better ring buffer implementation (#5209)
soypat Mar 1, 2026
8aebf28
esp32c3/esp32s3: refactor ADC implementation to reduce code duplication.
deadprogram Mar 1, 2026
8435715
targets: switch rp2040/rp2350 to default to tasks scheduler
deadprogram Mar 2, 2026
6f6d987
esp32c3/esp32s3: refactoring and corrections for SPI implementation
deadprogram Mar 2, 2026
e6828ae
modules: update to latest serial and espflash packages
deadprogram Mar 4, 2026
534e543
flashing: introduce flash method 'esp32jtag' for esp32c3/esp32s3 targets
deadprogram Mar 4, 2026
e101d00
fix: ESP32-C3 needs to clear MCAUSE after handling interrupt
deadprogram Mar 5, 2026
bb3ce61
chore: update espflash to espflasher
deadprogram Mar 8, 2026
e44c0c1
esp32c3: implement USBDevice using interrupts for more proper operation.
deadprogram Mar 5, 2026
b14711f
WiFi/BLE ROM
dimajolkin Mar 17, 2026
cc56bd7
machine/stm32: add STM32U585 target definition and runtime
deadprogram Mar 15, 2026
5076bd3
machine/stm32: add STM32U5 GPIO, pin interrupts, and UART support
deadprogram Mar 15, 2026
7172c7e
machine/stm32: add STM32U5 I2C support
deadprogram Mar 15, 2026
2af8fd8
machine/stm32: add STM32U5 SPI support
deadprogram Mar 15, 2026
6e25171
machine/stm32: add Arduino UNO Q to smoketests
deadprogram Mar 16, 2026
e0fb2df
fix: set stm32u5x clock rate to default
deadprogram Mar 17, 2026
5f3a735
targets: correct pin mapping for Arduino UNO Q STM32 MCU
deadprogram Mar 17, 2026
f78dc90
targets: add stm32u585 openocd commands for flashing on Arduino UNO Q
deadprogram Mar 18, 2026
889b710
machine/stm32u585: implement ADC
deadprogram Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
# This tests the latest supported LLVM version when linking against system
# libraries.
docker:
- image: golang:1.25-bullseye
- image: golang:1.26-bookworm
steps:
- test-linux:
llvm: "20"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Build TinyGo (LLVM ${{ matrix.version }})
run: go install -tags=llvm${{ matrix.version }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# statically linked binary.
runs-on: ubuntu-latest
container:
image: golang:1.25-alpine
image: golang:1.26-alpine
outputs:
version: ${{ steps.version.outputs.version }}
steps:
Expand All @@ -40,15 +40,15 @@ jobs:
- name: Cache Go
uses: actions/cache@v4
with:
key: go-cache-linux-alpine-v1-${{ hashFiles('go.mod') }}
key: go-cache-linux-alpine-v2-${{ hashFiles('go.mod') }}
path: |
~/.cache/go-build
~/go/pkg/mod
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
id: cache-llvm-source
with:
key: llvm-source-20-linux-alpine-v1
key: llvm-source-20-linux-alpine-v2
path: |
llvm-project/clang/lib/Headers
llvm-project/clang/include
Expand All @@ -73,7 +73,7 @@ jobs:
uses: actions/cache/restore@v4
id: cache-llvm-build
with:
key: llvm-build-20-linux-alpine-v1
key: llvm-build-20-linux-alpine-v2
path: llvm-build
- name: Build LLVM
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
Expand All @@ -97,7 +97,7 @@ jobs:
uses: actions/cache@v4
id: cache-binaryen
with:
key: binaryen-linux-alpine-v1
key: binaryen-linux-alpine-v2
path: build/wasm-opt
- name: Build Binaryen
if: steps.cache-binaryen.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Install wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Install Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Restore cached LLVM source
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Cache Go cache
uses: actions/cache@v4
with:
key: go-cache-windows-v1-${{ hashFiles('go.mod') }}
key: go-cache-windows-v2-${{ hashFiles('go.mod') }}
path: |
C:/Users/runneradmin/AppData/Local/go-build
C:/Users/runneradmin/go/pkg/mod
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
go-version: '1.26.0'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tinygo-llvm stage obtains the llvm source for TinyGo
FROM golang:1.25 AS tinygo-llvm
FROM golang:1.26 AS tinygo-llvm

RUN apt-get update && \
apt-get install -y apt-utils make cmake clang-17 ninja-build && \
Expand Down Expand Up @@ -33,7 +33,7 @@ RUN cd /tinygo/ && \

# tinygo-compiler copies the compiler build over to a base Go container (without
# all the build tools etc).
FROM golang:1.25 AS tinygo-compiler
FROM golang:1.26 AS tinygo-compiler

# Copy tinygo build.
COPY --from=tinygo-compiler-build /tinygo/build/release/tinygo /tinygo
Expand Down
42 changes: 42 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,8 @@ endif
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=vicharak_shrike-lite examples/echo
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=xiao-rp2350 examples/blinky1
@$(MD5SUM) test.hex
# test pwm
$(TINYGO) build -size short -o test.hex -target=itsybitsy-m0 examples/pwm
@$(MD5SUM) test.hex
Expand Down Expand Up @@ -875,6 +877,12 @@ ifneq ($(STM32), 0)
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=stm32l0x1 examples/serial
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=arduino-uno-q examples/blinky1
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=arduino-uno-q examples/serial
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=arduino-uno-q examples/blinkm
@$(MD5SUM) test.hex
endif
$(TINYGO) build -size short -o test.hex -target=atmega328pb examples/blinkm
@$(MD5SUM) test.hex
Expand Down Expand Up @@ -909,6 +917,8 @@ ifneq ($(XTENSA), 0)
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinkm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=nodemcu examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target m5stack-core2 examples/machinetest
Expand All @@ -921,9 +931,40 @@ ifneq ($(XTENSA), 0)
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target mch2022 examples/machinetest
@$(MD5SUM) test.bin
# xiao-esp32s3
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/blinkm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/mcp3008
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/pwm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/adc
@$(MD5SUM) test.bin

# esp32s3-wroom1
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/blinkm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/mcp3008
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/pwm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/adc
@$(MD5SUM) test.bin
endif
# esp32c3-supermini
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinkm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/mcp3008
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/pwm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/adc
@$(MD5SUM) test.bin

$(TINYGO) build -size short -o test.bin -target=esp-c3-32s-kit examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=qtpy-esp32c3 examples/machinetest
Expand All @@ -936,6 +977,7 @@ endif
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-12f examples/blinky1
@$(MD5SUM) test.bin

$(TINYGO) build -size short -o test.bin -target=makerfabs-esp32c3spi35 examples/machinetest
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.hex -target=hifive1b examples/blinky1
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ TinyGo is a Go compiler intended for use in small places such as microcontroller

It reuses libraries used by the [Go language tools](https://golang.org/pkg/go/) alongside [LLVM](http://llvm.org) to provide an alternative way to compile programs written in the Go programming language.

> [!IMPORTANT]
> You can help TinyGo with a financial contribution using OpenCollective. Please see https://opencollective.com/tinygo for more information. Thank you!
## Embedded

Here is an example program that blinks the built-in LED when run directly on any supported board with onboard LED:
Expand Down
2 changes: 1 addition & 1 deletion builder/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {

// Version range supported by TinyGo.
const minorMin = 19
const minorMax = 25
const minorMax = 26

// Check that we support this Go toolchain version.
gorootMajor, gorootMinor, err := goenv.GetGorootVersion()
Expand Down
2 changes: 1 addition & 1 deletion builder/sizes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestBinarySize(t *testing.T) {
// microcontrollers
{"hifive1b", "examples/echo", 3668, 280, 0, 2244},
{"microbit", "examples/serial", 2694, 342, 8, 2248},
{"wioterminal", "examples/pininterrupt", 6837, 1491, 120, 6888},
{"wioterminal", "examples/pininterrupt", 7074, 1510, 120, 7248},

// TODO: also check wasm. Right now this is difficult, because
// wasm binaries are run through wasm-opt and therefore the
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ require (
github.com/mattn/go-tty v0.0.4
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3
github.com/tetratelabs/wazero v1.6.0
go.bug.st/serial v1.6.0
go.bug.st/serial v1.6.4
golang.org/x/net v0.35.0
golang.org/x/sys v0.30.0
golang.org/x/tools v0.30.0
gopkg.in/yaml.v2 v2.4.0
tinygo.org/x/espflasher v0.4.0
tinygo.org/x/go-llvm v0.0.0-20250422114502-b8f170971e74
)

require (
github.com/creack/goselect v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/text v0.22.0 // indirect
)
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g=
github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A=
go.bug.st/serial v1.6.0 h1:mAbRGN4cKE2J5gMwsMHC2KQisdLRQssO9WSM+rbZJ8A=
go.bug.st/serial v1.6.0/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE=
go.bug.st/serial v1.6.4 h1:7FmqNPgVp3pu2Jz5PoPtbZ9jJO5gnEnZIvnI1lzve8A=
go.bug.st/serial v1.6.4/go.mod h1:nofMJxTeNVny/m6+KaafC6vJGj3miwQZ6vW4BZUGJPI=
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
Expand All @@ -58,5 +58,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
tinygo.org/x/espflasher v0.4.0 h1:0N+Ei+0qT/wGkGIoMaY2g+oI519VA5G4kUVUYHedTv8=
tinygo.org/x/espflasher v0.4.0/go.mod h1:a3hRV9EETPUkfPE6P14p4A6jKKth+oD5gtQz3nmij+8=
tinygo.org/x/go-llvm v0.0.0-20250422114502-b8f170971e74 h1:ovavgTdIBWCH8YWlcfq9gkpoyT1+IxMKSn+Df27QwE8=
tinygo.org/x/go-llvm v0.0.0-20250422114502-b8f170971e74/go.mod h1:GFbusT2VTA4I+l4j80b17KFK+6whv69Wtny5U+T8RR0=
2 changes: 1 addition & 1 deletion lib/stm32-svd
Submodule stm32-svd updated 161 files
1 change: 1 addition & 0 deletions loader/goroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ func pathsToOverride(goMinor int, needsSyscallPackage bool) map[string]bool {
"internal/cm/": false,
"internal/futex/": false,
"internal/fuzz/": false,
"internal/itoa": false,
"internal/reflectlite/": false,
"internal/gclayout": false,
"internal/task/": false,
Expand Down
Loading
Loading