mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 20:14:04 +00:00
create generic targets for esp32 boards
This commit is contained in:
+6
-9
@@ -913,6 +913,12 @@ endif
|
|||||||
$(TINYGO) build -size short -o test.hex -target=digispark -gc=leaking examples/blinky1
|
$(TINYGO) build -size short -o test.hex -target=digispark -gc=leaking examples/blinky1
|
||||||
@$(MD5SUM) test.hex
|
@$(MD5SUM) test.hex
|
||||||
ifneq ($(XTENSA), 0)
|
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
|
$(TINYGO) build -size short -o test.bin -target=esp32-mini32 examples/blinky1
|
||||||
@$(MD5SUM) test.bin
|
@$(MD5SUM) test.bin
|
||||||
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
|
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
|
||||||
@@ -951,15 +957,6 @@ ifneq ($(XTENSA), 0)
|
|||||||
@$(MD5SUM) test.bin
|
@$(MD5SUM) test.bin
|
||||||
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/adc
|
$(TINYGO) build -size short -o test.bin -target=esp32s3-supermini examples/adc
|
||||||
@$(MD5SUM) test.bin
|
@$(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
|
endif
|
||||||
# esp32c3-supermini
|
# esp32c3-supermini
|
||||||
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
|
$(TINYGO) build -size short -o test.bin -target=esp32c3-supermini examples/blinky1
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
//go:build esp32s3_wroom1
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import "machine"
|
|
||||||
|
|
||||||
var (
|
|
||||||
pwm = machine.PWM0
|
|
||||||
pinA = machine.GPIO17
|
|
||||||
pinB = machine.GPIO18
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
//go:build esp32_generic
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
// I2C pins
|
||||||
|
const (
|
||||||
|
SDA_PIN = NoPin
|
||||||
|
SCL_PIN = NoPin
|
||||||
|
)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
//go:build esp32c3_generic
|
||||||
|
|
||||||
|
package machine
|
||||||
|
|
||||||
|
const (
|
||||||
|
SDA_PIN = NoPin
|
||||||
|
SCL_PIN = NoPin
|
||||||
|
)
|
||||||
@@ -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
|
||||||
|
)
|
||||||
@@ -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
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"inherits": ["esp32"],
|
||||||
|
"build-tags": ["esp32_generic"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"inherits": ["esp32c3"],
|
||||||
|
"build-tags": ["esp32c3_generic"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"inherits": ["esp32s3"],
|
||||||
|
"build-tags": ["esp32s3_generic"]
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"inherits": ["esp32s3"],
|
|
||||||
"build-tags": ["esp32s3_wroom1"]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user