Skip to content

Add build environment for Seeed Studio XIAO ESP32-C6 - #5943

Merged
softhack007 merged 4 commits into
wled:mainfrom
spectrumjade:xiao-esp32c6
Nov 12, 2026
Merged

softhack007 merged 4 commits into
wled:mainfrom
spectrumjade:xiao-esp32c6

Conversation

@spectrumjade

@spectrumjade spectrumjade commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Extends esp32c6dev_4MB, using the seeed_xiao_esp32c6 board definition so the board variant enables the RF switch and onboard antenna, and enables USB CDC on boot since the XIAO has no serial-to-USB chip.

Summary by CodeRabbit

  • New Features
    • Added configuration support for the Seeed Studio XIAO ESP32-C6 board, including a board-specific release name and settings for its onboard antenna and RF switch. This makes the board available as a distinct PlatformIO environment for building firmware.

Extends esp32c6dev_4MB, using the seeed_xiao_esp32c6 board definition so
the board variant enables the RF switch and onboard antenna, and enables
USB CDC on boot since the XIAO has no serial-to-USB chip.

Co-Authored-By: Claude Opus 5.5 (Claude Code) <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The sample PlatformIO configuration adds a Seeed Studio XIAO ESP32-C6 environment. It inherits from env:esp32c6dev_4MB, selects the XIAO board, and sets the release name to XIAO_ESP32C6.

Changes

XIAO ESP32-C6 Build Environment

Layer / File(s) Summary
Add the XIAO ESP32-C6 environment
platformio_override.sample.ini
Adds the XIAO ESP32-C6 board environment. It removes the inherited ESP32-C6_4MB release-name define and sets WLED_RELEASE_NAME to XIAO_ESP32C6. Comments describe the RF switch and onboard antenna.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested labels: hardware

Suggested reviewers: softhack007

Merge Risk: Minimal · up to a60c8

This adds an optional example build environment for the XIAO ESP32-C6 to the sample override file. It does not alter default or official builds, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add build environment for Seeed Studio XIAO ESP32-C6" states the main change: a new PlatformIO build environment for the Seeed Studio XIAO ESP32-C6 board. The raw summary confirms the only …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add build environment for Seeed Studio XIAO ESP32-C6" states the main change: a new PlatformIO build environment for the Seeed Studio XIAO ESP32-C6 board. The raw summary confirms the only file changed is platformio_override.sample.ini, which adds the [env:seeed_xiao_esp32c6] environment. The title is specific, concise, and matches the objectives.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: wled/WLED
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: e7de33a
  • Layers: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 35e42bfb-5725-480d-b244-33bc4bf004ef
Commits

Reviewing files that changed from the base of the PR and between 3125516 and a60c816.

Files selected for processing: 1

  • platformio_override.sample.ini

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Recent review details

Context from checks skipped due to timeout: 1

  • GitHub Check: CodeRabbit
Additional context used

Path-based instructions: 1

Scan for secrets, passwords, and other sensitive information accidentally committed to PlatformIO configuration files (platformio.ini, platformio_override.ini, platformio_override.ini.sample).

CodeRabbit configuration file

Files:

  • platformio_override.sample.ini

@softhack007 softhack007 added AI Partly generated by an AI. Make sure that the contributor fully understands the code! board request PR adding support for a specific board. labels Nov 1, 2026
@DedeHai

DedeHai commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

question: how does adding that board type to the env solve the antenna switch?
the USB-CDC is useful also for other boards. @softhack007 any reason the usb CDC is not the default for C6? I could not find any board that does not have a CDC port. The official dev kits have both, CDC and USB-UART chip.

@softhack007

softhack007 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

I'm not sure if this is necessary. According to seeed wiki, the on-board antenna is enabled by default any way

https://wiki.seeedstudio.com/xiao_esp32c6_getting_started/

By default, GPIO14 is set to a low level, enabling the built-in antenna. To use an external antenna, set GPIO14 to a high level. Refer to the example code below for guidance on configuring GPIO3 and GPIO14 to activate the external antenna.

The only difference in the proposed buildenv is the changed "board =" line, and changing USB-UART to USB-CDC.

Custom buildenv examples should be added to platformio_override.ini.sample not to platformio.ini.

Edit: changing the "board=" line activates this small init function from the arduino-esp32 variants folder
https://github.com/espressif/arduino-esp32/blob/release/v3.3.x/variants/XIAO_ESP32C6/variant.cpp

@softhack007

softhack007 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

@softhack007 any reason the usb CDC is not the default for C6? I could not find any board that does not have a CDC port. The official dev kits have both, CDC and USB-UART chip.

I think this setting was for the official dev kits - debugging via USB-UART is more reliable than going via USB-CDC.
@DedeHai no problem we can change the 4MB C6 build to USB-CDC. I'll make a small PR.

@DedeHai

DedeHai commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Good find, I did not see that variant stub.
So generally a legit addition but it should not be in platformio.ini

@spectrumjade

Copy link
Copy Markdown
Contributor Author

@softhack007 / @DedeHai - Thanks for taking a look. My understanding is that the seeed_xiao_esp32c6 board variant includes some additional init code that enables the RF switch via GPIO3, which is not being pulled down like GPIO14 is (see espressif/arduino-esp32#10066).

@netmindz

netmindz commented Nov 3, 2026

Copy link
Copy Markdown
Member

Yeah, please make the changes in platformio_override.ini.sample as we won't be shipping official bins targeting this one specific board.

If it turns out we need to add a feature to toggle which antenna, we would look to do this in a generic way

spectrumjade and others added 3 commits November 11, 2026 23:11
Keep it as an example for custom builds rather than part of the
standard build environments.

Co-Authored-By: Claude Opus 5.5 (Claude Code) <[email protected]>
esp32c6dev_4MB now enables USB CDC on boot itself (wled#5944).

Co-Authored-By: Claude Opus 5.5 (Claude Code) <[email protected]>
@spectrumjade

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, I moved it over to platformio_override.ini.sample and removed the USB-CDC definition (since that is now set on the inherited board definition).

@softhack007
softhack007 merged commit bd52617 into wled:main Nov 12, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Partly generated by an AI. Make sure that the contributor fully understands the code! board request PR adding support for a specific board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants