Skip to content

Commit 9118e91

Browse files
committed
target: add xiao-esp32s3 board target
Signed-off-by: deadprogram <[email protected]>
1 parent fbbaa5e commit 9118e91

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

GNUmakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,8 @@ ifneq ($(XTENSA), 0)
915915
@$(MD5SUM) test.bin
916916
$(TINYGO) build -size short -o test.bin -target mch2022 examples/machinetest
917917
@$(MD5SUM) test.bin
918+
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/blinky1
919+
@$(MD5SUM) test.bin
918920
endif
919921
$(TINYGO) build -size short -o test.bin -target=esp-c3-32s-kit examples/blinky1
920922
@$(MD5SUM) test.bin

src/machine/board_xiao-esp32s3.go

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
//go:build xiao_esp32s3
2+
3+
// This file contains the pin mappings for the Seeed XIAO ESP32S3 boards.
4+
//
5+
// Seeed Studio XIAO ESP32S3 is an IoT mini development board based on
6+
// the Espressif ESP32-S3 WiFi/Bluetooth dual-mode chip.
7+
//
8+
// - https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html
9+
// - https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/
10+
11+
package machine
12+
13+
// Digital Pins
14+
const (
15+
D0 = GPIO1
16+
D1 = GPIO2
17+
D2 = GPIO3
18+
D3 = GPIO4
19+
D4 = GPIO5
20+
D5 = GPIO6
21+
D6 = GPIO43
22+
D7 = GPIO44
23+
D8 = GPIO7
24+
D9 = GPIO8
25+
D10 = GPIO9
26+
)
27+
28+
// Analog pins
29+
const (
30+
A0 = GPIO1
31+
A1 = GPIO2
32+
A2 = GPIO3
33+
A3 = GPIO4
34+
)
35+
36+
// UART pins
37+
const (
38+
UART_RX_PIN = GPIO44
39+
UART_TX_PIN = GPIO43
40+
)
41+
42+
// I2C pins
43+
const (
44+
SDA_PIN = GPIO5
45+
SCL_PIN = GPIO6
46+
)
47+
48+
// SPI pins
49+
const (
50+
SPI_SCK_PIN = GPIO7
51+
SPI_SDI_PIN = GPIO9
52+
SPI_SDO_PIN = GPIO8
53+
)
54+
55+
// Onboard LEDs
56+
const (
57+
LED = GPIO21
58+
)

targets/xiao-esp32s3.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inherits": ["esp32s3"],
3+
"build-tags": ["xiao_esp32s3"]
4+
}

0 commit comments

Comments
 (0)