Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ff58c50
machine: add attiny85 pwm support (#5171)
jespino Jan 12, 2026
8bd2233
machine/rp: use the blockReset() and unresetBlockWait() helper functi…
deadprogram Jan 13, 2026
1fe934e
machine/rp: add Close function to UART to allow for removing all syst…
deadprogram Jan 13, 2026
1876b65
compiler: simplify createObjectLayout
niaow Dec 28, 2025
707d37a
chore: update version to 0.41.0-dev
deadprogram Jan 14, 2026
a0069b6
testdata: more corpus entries (#5182)
dgryski Jan 17, 2026
5d8e071
machine/attiny85: add USI-based SPI support (#5181)
jespino Jan 17, 2026
f0256ca
Fix syntax for building with TinyGo
robogg133 Jan 21, 2026
e79cdc1
targets: Add Shrike Lite board (#5170)
YajTPG Jan 24, 2026
bef0dc5
Add per-byte timeout budget for rp2 I2C (#5189)
sparques Feb 2, 2026
66d7099
build: update CI builds to use latest Go 1.25.7 release
deadprogram Feb 4, 2026
f23e18a
flake.*: bump to nixpkgs 25.11
eliasnaur Feb 6, 2026
f5b2a08
builder: order embedded files deterministically
eliasnaur Feb 6, 2026
3237853
sponsorship: add explicit callout/link in README to help out TinyGo
deadprogram Feb 11, 2026
4b0e858
Esp32s3 implement spi (#5169)
dimajolkin Feb 15, 2026
934d5f4
fix: init heap before random number seed on wasm platforms
deadprogram Feb 15, 2026
b6b723a
targets: correct name/tag use for esp32s3-wroom1 board
deadprogram Feb 16, 2026
24f9654
make: remove machine without board from smoketest
deadprogram Feb 16, 2026
9bbad67
esp32s3-usbserial: added usbserial printing
dimajolkin Feb 15, 2026
c1cddff
esp32s3-usbserial: split usb
dimajolkin Feb 16, 2026
44ca224
esp32s3-usbserial: common usbserial for both esp32c3 & esp32s3
dimajolkin Feb 17, 2026
610dd19
esp32s3-usbserial: move InitSerial to init method
dimajolkin Feb 17, 2026
5c37d1b
runtime: implement fminimum/fmaximum
niaow Feb 9, 2026
fd1d10c
export UART0 and pins
cowellmi Feb 17, 2026
ab087d6
new CAN API demo
soypat Feb 20, 2026
a5292ec
full CAN API refactor
soypat Feb 20, 2026
25f5f76
add interrupts
soypat Feb 21, 2026
ef05ba2
delete old can
soypat Feb 21, 2026
c5cb58c
take @knieriem suggestions and apply them to can.go
soypat Mar 1, 2026
6e18433
clean up implementation
soypat Mar 29, 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
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.5'
go-version: '1.25.7'
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.5'
go-version: '1.25.7'
cache: true
- name: Build TinyGo (LLVM ${{ matrix.version }})
run: go install -tags=llvm${{ matrix.version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.5'
go-version: '1.25.7'
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.5'
go-version: '1.25.7'
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.5'
go-version: '1.25.7'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
key: ${{ steps.cache-llvm-source.outputs.cache-primary-key }}
path: |
llvm-project/compiler-rt
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v31
- name: Test
run: |
nix develop --ignore-environment --keep HOME --command bash -c "go install && ~/go/bin/tinygo version && ~/go/bin/tinygo build -o test ./testdata/cgo"
8 changes: 4 additions & 4 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.5'
go-version: '1.25.7'
cache: true
- name: Restore cached LLVM source
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '1.25.5'
go-version: '1.25.7'
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.5'
go-version: '1.25.7'
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.5'
go-version: '1.25.7'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down
10 changes: 10 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ endif
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=waveshare-rp2040-tiny examples/echo
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=vicharak_shrike-lite examples/echo
@$(MD5SUM) test.hex
# test pwm
$(TINYGO) build -size short -o test.hex -target=itsybitsy-m0 examples/pwm
@$(MD5SUM) test.hex
Expand Down Expand Up @@ -896,6 +898,10 @@ endif
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=digispark examples/blinky1
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=digispark examples/pwm
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=digispark examples/mcp3008
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=digispark -gc=leaking examples/blinky1
@$(MD5SUM) test.hex
ifneq ($(XTENSA), 0)
Expand All @@ -917,6 +923,10 @@ ifneq ($(XTENSA), 0)
@$(MD5SUM) test.bin
$(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/mcp3008
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/mcp3008
@$(MD5SUM) test.bin
endif
$(TINYGO) build -size short -o test.bin -target=esp-c3-32s-kit examples/blinky1
@$(MD5SUM) test.bin
Expand Down
5 changes: 4 additions & 1 deletion 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 Expand Up @@ -63,7 +66,7 @@ tinygo build -buildmode=c-shared -o add.wasm -target=wasip1 add.go
You can also use the same syntax as Go 1.24+:

```shell
GOARCH=wasip1 GOOS=wasm tinygo build -buildmode=c-shared -o add.wasm add.go
GOOS=wasip1 GOARCH=wasm tinygo build -buildmode=c-shared -o add.wasm add.go
```

## Installation
Expand Down
13 changes: 9 additions & 4 deletions builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"os/exec"
"path/filepath"
"runtime"
"slices"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -281,9 +282,13 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
allFiles[file.Name] = append(allFiles[file.Name], file)
}
}
for name, files := range allFiles {
name := name
files := files
// Sort embedded files by name to maintain output determinism.
embedNames := make([]string, 0, len(allFiles))
for _, files := range allFiles {
embedNames = append(embedNames, files[0].Name)
}
slices.Sort(embedNames)
for _, name := range embedNames {
job := &compileJob{
description: "make object file for " + name,
run: func(job *compileJob) error {
Expand All @@ -298,7 +303,7 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
sum := sha256.Sum256(data)
hexSum := hex.EncodeToString(sum[:16])

for _, file := range files {
for _, file := range allFiles[name] {
file.Size = uint64(len(data))
file.Hash = hexSum
if file.NeedsData {
Expand Down
3 changes: 3 additions & 0 deletions compiler/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ func typeHasPointers(t llvm.Type) bool {
}
return false
case llvm.ArrayTypeKind:
if t.ArrayLength() == 0 {
return false
}
if typeHasPointers(t.ElementType()) {
return true
}
Expand Down
Loading
Loading