From e49663809bc0ccf4516029c50de9ac2f56b2aa21 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 7 Mar 2025 10:18:18 +0100 Subject: [PATCH] machine: fix RP2040 Pico board on the playground Right now it doesn't compile, with errors like the following: # machine /app/tinygo/src/machine/board_pico.go:7:13: undefined: GPIO0 /app/tinygo/src/machine/board_pico.go:8:13: undefined: GPIO1 /app/tinygo/src/machine/board_pico.go:9:13: undefined: GPIO2 /app/tinygo/src/machine/board_pico.go:10:13: undefined: GPIO3 [...etc...] This patch should fix that. --- GNUmakefile | 2 ++ src/machine/machine_rp2_pins.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index f740374f1..45bca5d8a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -585,6 +585,8 @@ ifneq ($(WASM), 0) @$(MD5SUM) test.wasm GOOS=js GOARCH=wasm $(TINYGO) build -size short -o test.wasm -tags=gopher_badge examples/blinky1 @$(MD5SUM) test.wasm + GOOS=js GOARCH=wasm $(TINYGO) build -size short -o test.wasm -tags=pico examples/blinky1 + @$(MD5SUM) test.wasm endif # test all targets/boards $(TINYGO) build -size short -o test.hex -target=pca10040-s132v6 examples/blinky1 diff --git a/src/machine/machine_rp2_pins.go b/src/machine/machine_rp2_pins.go index 43b31f938..36e9bd629 100644 --- a/src/machine/machine_rp2_pins.go +++ b/src/machine/machine_rp2_pins.go @@ -1,4 +1,4 @@ -//go:build rp2040 || rp2350 || gopher_badge +//go:build rp2040 || rp2350 || gopher_badge || pico package machine