From 7f5c872d668c66098509371753cfcf2bad50ca6c Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Fri, 19 Sep 2025 17:20:18 +0200 Subject: [PATCH] Added Gopher ARCADE board --- GNUmakefile | 2 ++ src/machine/board_gopher-arcade.go | 22 ++++++++++++++++++++++ targets/gopher-arcade.json | 10 ++++++++++ 3 files changed, 34 insertions(+) create mode 100644 src/machine/board_gopher-arcade.go create mode 100644 targets/gopher-arcade.json diff --git a/GNUmakefile b/GNUmakefile index 4616c723ee..962b2e2613 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -795,6 +795,8 @@ endif @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=gopher-badge examples/blinky1 @$(MD5SUM) test.hex + $(TINYGO) build -size short -o test.hex -target=gopher-arcade examples/blinky1 + @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=ae-rp2040 examples/echo @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=thumby examples/echo diff --git a/src/machine/board_gopher-arcade.go b/src/machine/board_gopher-arcade.go new file mode 100644 index 0000000000..349f47532c --- /dev/null +++ b/src/machine/board_gopher-arcade.go @@ -0,0 +1,22 @@ +//go:build gopher_arcade + +package machine + +// Return the current CPU frequency in hertz. +func CPUFrequency() uint32 { + return 8000000 +} + +const ( + P5 Pin = PB0 + P6 Pin = PB1 + P7 Pin = PB2 + P2 Pin = PB3 + P3 Pin = PB4 + P1 Pin = PB5 + + LED = P1 + BUTTON_LEFT = P7 + BUTTON_RIGHT = P5 + SPEAKER = P6 +) diff --git a/targets/gopher-arcade.json b/targets/gopher-arcade.json new file mode 100644 index 0000000000..f4831a2a00 --- /dev/null +++ b/targets/gopher-arcade.json @@ -0,0 +1,10 @@ +{ + "inherits": ["attiny85"], + "build-tags": ["gopher_arcade"], + "ldflags": [ + "--defsym=_bootloader_size=2180", + "--defsym=_stack_size=128" + ], + "flash-command": "avrdude -c usbasp -p t85 -B 10 -U flash:w:{hex}:i", + "emulator": "simavr -m attiny85 -f 16000000 {}" +}