Skip to content

Commit e615c25

Browse files
aykevldeadprogram
authored andcommitted
targets: add WaveShare ESP-C3-32S-Kit
I've had this board for a while now, but never added proper TinyGo support. So here is a PR to do just that.
1 parent b2fbbeb commit e615c25

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

GNUmakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,8 @@ ifneq ($(XTENSA), 0)
835835
$(TINYGO) build -size short -o test.bin -target mch2022 examples/machinetest
836836
@$(MD5SUM) test.bin
837837
endif
838+
$(TINYGO) build -size short -o test.bin -target=esp-c3-32s-kit examples/blinky1
839+
@$(MD5SUM) test.bin
838840
$(TINYGO) build -size short -o test.bin -target=qtpy-esp32c3 examples/machinetest
839841
@$(MD5SUM) test.bin
840842
$(TINYGO) build -size short -o test.bin -target=m5stamp-c3 examples/machinetest

src/machine/board_esp-c3-32s-kit.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//go:build esp_c3_32s_kit
2+
3+
package machine
4+
5+
// See:
6+
// * https://www.waveshare.com/w/upload/8/8f/Esp32-c3s_specification.pdf
7+
// * https://www.waveshare.com/w/upload/4/46/Nodemcu-esp-c3-32s-kit-schematics.pdf
8+
9+
// Digital Pins
10+
const (
11+
IO0 = GPIO0
12+
IO1 = GPIO1
13+
IO2 = GPIO2
14+
IO3 = GPIO3
15+
IO4 = GPIO4
16+
IO5 = GPIO5
17+
IO6 = GPIO6
18+
IO7 = GPIO7
19+
IO8 = GPIO8
20+
IO9 = GPIO9
21+
IO18 = GPIO18
22+
IO19 = GPIO19
23+
)
24+
25+
const (
26+
LED_RED = IO3
27+
LED_GREEN = IO4
28+
LED_BLUE = IO5
29+
30+
LED = LED_RED
31+
32+
LED1 = LED_RED
33+
LED2 = LED_GREEN
34+
)
35+
36+
// I2C pins
37+
const (
38+
SDA_PIN = NoPin
39+
SCL_PIN = NoPin
40+
)

targets/esp-c3-32s-kit.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"inherits": ["esp32c3"],
3+
"build-tags": ["esp_c3_32s_kit"],
4+
"serial-port": ["1a86:7523"]
5+
}

0 commit comments

Comments
 (0)