Skip to content

Commit 3386316

Browse files
gandarezdeadprogram
authored andcommitted
targets: add esp32s3-supermini
1 parent 410bb9c commit 3386316

4 files changed

Lines changed: 102 additions & 2 deletions

File tree

GNUmakefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,15 @@ ifneq ($(XTENSA), 0)
942942
@$(MD5SUM) test.bin
943943
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/adc
944944
@$(MD5SUM) test.bin
945-
945+
# esp32s3-supermini
946+
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/blinky1
947+
@$(MD5SUM) test.bin
948+
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/blinkm
949+
@$(MD5SUM) test.bin
950+
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/mcp3008
951+
@$(MD5SUM) test.bin
952+
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/adc
953+
@$(MD5SUM) test.bin
946954
# esp32s3-wroom1
947955
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/blinkm
948956
@$(MD5SUM) test.bin

src/machine/board_esp32c3-supermini.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build esp32c3_supermini
22

3-
// This file contains the pin mappings for the ESP32 supermini boards.
3+
// This file contains the pin mappings for the ESP32C3 supermini board.
44
//
55
// - https://web.archive.org/web/20240805232453/https://dl.artronshop.co.th/ESP32-C3%20SuperMini%20datasheet.pdf
66

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
//go:build esp32s3_supermini
2+
3+
// This file contains the pin mappings for the ESP32S3 supermini board.
4+
//
5+
// - https://www.nologo.tech/product/esp32/esp32s3/esp32s3supermini/esp32S3SuperMini.html
6+
7+
package machine
8+
9+
// Digital Pins
10+
const (
11+
IO1 = GPIO1
12+
IO2 = GPIO2
13+
IO3 = GPIO3
14+
IO4 = GPIO4
15+
IO5 = GPIO5
16+
IO6 = GPIO6
17+
IO7 = GPIO7
18+
IO8 = GPIO8
19+
IO9 = GPIO9
20+
IO10 = GPIO10
21+
IO11 = GPIO11
22+
IO12 = GPIO12
23+
IO13 = GPIO13
24+
IO14 = GPIO14
25+
IO15 = GPIO15
26+
IO16 = GPIO16
27+
IO17 = GPIO17
28+
IO18 = GPIO18
29+
IO21 = GPIO21
30+
IO33 = GPIO33
31+
IO34 = GPIO34
32+
IO35 = GPIO35
33+
IO36 = GPIO36
34+
IO37 = GPIO37
35+
IO38 = GPIO38
36+
IO39 = GPIO39
37+
IO40 = GPIO40
38+
IO41 = GPIO41
39+
IO42 = GPIO42
40+
IO43 = GPIO43
41+
IO44 = GPIO44
42+
IO45 = GPIO45
43+
IO46 = GPIO46
44+
IO47 = GPIO47
45+
IO48 = GPIO48
46+
)
47+
48+
// Built-in LED
49+
const LED = GPIO48
50+
51+
// Analog pins
52+
const (
53+
A1 = GPIO1
54+
A2 = GPIO2
55+
A3 = GPIO3
56+
A4 = GPIO4
57+
A5 = GPIO5
58+
A6 = GPIO6
59+
A7 = GPIO7
60+
A8 = GPIO8
61+
A9 = GPIO9
62+
A10 = GPIO10
63+
A11 = GPIO11
64+
A12 = GPIO12
65+
A13 = GPIO13
66+
A14 = GPIO14
67+
A15 = GPIO15
68+
A16 = GPIO16
69+
)
70+
71+
// I2C pins
72+
const (
73+
SDA_PIN = GPIO8
74+
SCL_PIN = GPIO9
75+
)
76+
77+
// SPI pins
78+
const (
79+
SPI1_SCK_PIN = GPIO4
80+
SPI1_MISO_PIN = GPIO5
81+
SPI1_MOSI_PIN = GPIO6
82+
SPI1_CS_PIN = GPIO7
83+
84+
SPI2_SCK_PIN = NoPin
85+
SPI2_MOSI_PIN = NoPin
86+
SPI2_MISO_PIN = NoPin
87+
SPI2_CS_PIN = NoPin
88+
)

targets/esp32s3-supermini.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": ["esp32s3_supermini"]
4+
}

0 commit comments

Comments
 (0)