Skip to content

Commit 31321d2

Browse files
authored
Merge pull request #9 from FastLED/copilot/add-esp32c3-to-supported-platforms
2 parents da6c01e + 93af23d commit 31321d2

5 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build ESP32-C3
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/template_build.yml
12+
with:
13+
workflow-name: "ESP32-C3"
14+
test-dir: "tests/esp32c3"
15+
env-name: "esp32c3"
16+
firmware-ext: "bin"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
### ESP32
1414
[![Build ESP32 Dev](https://github.com/fastled/fbuild/actions/workflows/build-esp32dev.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32dev.yml)
1515
[![Build ESP32-C2](https://github.com/fastled/fbuild/actions/workflows/build-esp32c2.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32c2.yml)
16+
[![Build ESP32-C3](https://github.com/fastled/fbuild/actions/workflows/build-esp32c3.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32c3.yml)
1617
[![Build ESP32-C6](https://github.com/fastled/fbuild/actions/workflows/build-esp32c6.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32c6.yml)
1718
[![Build ESP32-S3](https://github.com/fastled/fbuild/actions/workflows/build-esp32s3.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32s3.yml)
1819

tests/esp32c3/esp32c3.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
void setup() {
2+
Serial.begin(115200);
3+
pinMode(LED_BUILTIN, OUTPUT);
4+
5+
delay(1000); // wait for host to connect
6+
Serial.println("TEST PASSED");
7+
}
8+
9+
void loop() {
10+
digitalWrite(LED_BUILTIN, HIGH);
11+
delay(500);
12+
digitalWrite(LED_BUILTIN, LOW);
13+
delay(500);
14+
}

tests/esp32c3/platformio.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[env:esp32c3]
2+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
3+
board = esp32-c3-devkitm-1
4+
framework = arduino
5+
monitor_speed = 115200
6+
build_flags =
7+
-DARDUINO_USB_MODE=1
8+
-DARDUINO_USB_CDC_ON_BOOT=1

tests/unit/test_platform_configs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ def test_load_esp32_config(self):
2020
assert hasattr(config, "compiler_flags")
2121
assert hasattr(config, "linker_flags")
2222

23+
def test_load_esp32c3_config(self):
24+
"""Load ESP32-C3 config from esp/ subdirectory."""
25+
config = platform_configs.load_config("esp32c3")
26+
assert config is not None
27+
assert config.mcu == "esp32c3"
28+
2329
def test_load_esp32c6_config(self):
2430
"""Load ESP32-C6 config from esp/ subdirectory."""
2531
config = platform_configs.load_config("esp32c6")

0 commit comments

Comments
 (0)