create generic targets for esp32 boards

This commit is contained in:
Joel Wetzell
2026-04-14 18:51:27 -05:00
committed by Ron Evans
parent eabd1ddce0
commit 0755145824
10 changed files with 53 additions and 42 deletions
+6 -9
View File
@@ -913,6 +913,12 @@ endif
$(TINYGO) build -size short -o test.hex -target=digispark -gc=leaking examples/blinky1
@$(MD5SUM) test.hex
ifneq ($(XTENSA), 0)
$(TINYGO) build -size short -o test.bin -target=esp32-generic examples/machinetest
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-generic examples/machinetest
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-generic examples/machinetest
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32-mini32 examples/blinky1
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
@@ -951,15 +957,6 @@ ifneq ($(XTENSA), 0)
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/adc
@$(MD5SUM) test.bin
# esp32s3-wroom1
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/blinkm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/mcp3008
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=esp32s3-wroom1 examples/pwm
@$(MD5SUM) test.bin
$(TINYGO) build -size short -o test.bin -target=xiao-esp32s3 examples/adc
@$(MD5SUM) test.bin
endif
# esp32c3-supermini
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
-11
View File
@@ -1,11 +0,0 @@
//go:build esp32s3_wroom1
package main
import "machine"
var (
pwm = machine.PWM0
pinA = machine.GPIO17
pinB = machine.GPIO18
)
+9
View File
@@ -0,0 +1,9 @@
//go:build esp32_generic
package machine
// I2C pins
const (
SDA_PIN = NoPin
SCL_PIN = NoPin
)
+8
View File
@@ -0,0 +1,8 @@
//go:build esp32c3_generic
package machine
const (
SDA_PIN = NoPin
SCL_PIN = NoPin
)
+18
View File
@@ -0,0 +1,18 @@
//go:build esp32s3_generic
package machine
const (
SCL_PIN = NoPin
SDA_PIN = NoPin
SPI1_SCK_PIN = NoPin // SCK
SPI1_MOSI_PIN = NoPin // SDO (MOSI)
SPI1_MISO_PIN = NoPin // SDI (MISO)
SPI1_CS_PIN = NoPin // CS
SPI2_SCK_PIN = NoPin // SCK
SPI2_MOSI_PIN = NoPin // SDO (MOSI)
SPI2_MISO_PIN = NoPin // SDI (MISO)
SPI2_CS_PIN = NoPin // CS
)
-18
View File
@@ -1,18 +0,0 @@
//go:build esp32s3_wroom1
package machine
const (
SCL_PIN = GPIO17
SDA_PIN = GPIO18
SPI1_SCK_PIN = GPIO12 // SCK
SPI1_MOSI_PIN = GPIO11 // SDO (MOSI)
SPI1_MISO_PIN = GPIO13 // SDI (MISO)
SPI1_CS_PIN = GPIO10 // CS
SPI2_SCK_PIN = GPIO36 // SCK
SPI2_MOSI_PIN = GPIO35 // SDO (MOSI)
SPI2_MISO_PIN = GPIO37 // SDI (MISO)
SPI2_CS_PIN = GPIO34 // CS
)
+4
View File
@@ -0,0 +1,4 @@
{
"inherits": ["esp32"],
"build-tags": ["esp32_generic"]
}
+4
View File
@@ -0,0 +1,4 @@
{
"inherits": ["esp32c3"],
"build-tags": ["esp32c3_generic"]
}
+4
View File
@@ -0,0 +1,4 @@
{
"inherits": ["esp32s3"],
"build-tags": ["esp32s3_generic"]
}
-4
View File
@@ -1,4 +0,0 @@
{
"inherits": ["esp32s3"],
"build-tags": ["esp32s3_wroom1"]
}