Skip to content

Commit 109e076

Browse files
conejoninjadeadprogram
authored andcommitted
Added Gopher ARCADE board
1 parent 821f2ae commit 109e076

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

GNUmakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,8 @@ endif
795795
@$(MD5SUM) test.hex
796796
$(TINYGO) build -size short -o test.hex -target=gopher-badge examples/blinky1
797797
@$(MD5SUM) test.hex
798+
$(TINYGO) build -size short -o test.hex -target=gopher-arcade examples/blinky1
799+
@$(MD5SUM) test.hex
798800
$(TINYGO) build -size short -o test.hex -target=ae-rp2040 examples/echo
799801
@$(MD5SUM) test.hex
800802
$(TINYGO) build -size short -o test.hex -target=thumby examples/echo

src/machine/board_gopher-arcade.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//go:build gopher_arcade
2+
3+
package machine
4+
5+
// Return the current CPU frequency in hertz.
6+
func CPUFrequency() uint32 {
7+
return 8000000
8+
}
9+
10+
const (
11+
P5 Pin = PB0
12+
P6 Pin = PB1
13+
P7 Pin = PB2
14+
P2 Pin = PB3
15+
P3 Pin = PB4
16+
P1 Pin = PB5
17+
18+
LED = P1
19+
BUTTON_LEFT = P7
20+
BUTTON_RIGHT = P5
21+
SPEAKER = P6
22+
)

targets/gopher-arcade.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"inherits": ["attiny85"],
3+
"build-tags": ["gopher_arcade"],
4+
"ldflags": [
5+
"--defsym=_bootloader_size=2180",
6+
"--defsym=_stack_size=128"
7+
],
8+
"flash-command": "avrdude -c usbasp -p t85 -B 10 -U flash:w:{hex}:i",
9+
"emulator": "simavr -m attiny85 -f 16000000 {}"
10+
}

0 commit comments

Comments
 (0)