Skip to content

Firmware for Seeed XIAO ESP32C6 and WIO-SX1262 for XIAO#10917

Open
reb1995 wants to merge 3 commits into
meshtastic:developfrom
reb1995:origin/xiao-c6
Open

Firmware for Seeed XIAO ESP32C6 and WIO-SX1262 for XIAO#10917
reb1995 wants to merge 3 commits into
meshtastic:developfrom
reb1995:origin/xiao-c6

Conversation

@reb1995

@reb1995 reb1995 commented Jul 7, 2026

Copy link
Copy Markdown

Confirmed LED blinking as expected, TX and RX working on both public channels and DMs. Working over bluetooth connection and WiFi. I2C confirmed working with oled screen.

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)

Seeed ESP32C6 XIAO device with Wio SX1262. Tested working with communication between my C6 and my RAK devices.

Summary by CodeRabbit

  • New Features
    • Added support for the Seeed XIAO C6 (ESP32-C6) board with updated build, debug, and upload defaults.
    • Included board-specific pin mapping for USB identification, LED/button, battery sensing, I2C, and SPI.
    • Enabled LoRa support (SX1262) with board-appropriate control, RF switch, and TX/RX behaviors; Wi-Fi and Bluetooth are supported as well.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@reb1995, Welcome to Meshtastic!

Thanks for opening your first pull request. We really appreciate it.

We discuss work as a team in discord, please join us in the #firmware channel.
There's a big backlog of patches at the moment. If you have time,
please help us with some code review and testing of other PRs!

Welcome to the team 😄

@CLAassistant

CLAassistant commented Jul 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added needs-review Needs human review hardware-support Hardware related: new devices or modules, problems specific to hardware labels Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 12774a33-09c5-4aaa-8321-b1cfcf31bdff

📥 Commits

Reviewing files that changed from the base of the PR and between 8864d49 and 3dd83ab.

📒 Files selected for processing (4)
  • boards/seeed-xiao-c6.json
  • variants/esp32c6/seeed_xiao_c6/pins_arduino.h
  • variants/esp32c6/seeed_xiao_c6/platformio.ini
  • variants/esp32c6/seeed_xiao_c6/variant.h
✅ Files skipped from review due to trivial changes (2)
  • boards/seeed-xiao-c6.json
  • variants/esp32c6/seeed_xiao_c6/platformio.ini
🚧 Files skipped from review as they are similar to previous changes (2)
  • variants/esp32c6/seeed_xiao_c6/pins_arduino.h
  • variants/esp32c6/seeed_xiao_c6/variant.h

📝 Walkthrough

Walkthrough

This PR adds Seeed Xiao ESP32-C6 board support with a board definition, PlatformIO environment, Arduino pin mappings, and variant macros for board pins and SX1262 radio control.

Changes

Seeed Xiao C6 board support

Layer / File(s) Summary
Board definition and build configuration
boards/seeed-xiao-c6.json
Defines build, connectivity, debug, framework, and upload settings for the board.
PlatformIO environment wiring
variants/esp32c6/seeed_xiao_c6/platformio.ini
Adds environment metadata and wires board selection, partition scheme, upload settings, and build flags.
Arduino pin definitions
variants/esp32c6/seeed_xiao_c6/pins_arduino.h
Adds USB VID/PID macros and default I2C/SPI pin constants.
Variant pin mapping
variants/esp32c6/seeed_xiao_c6/variant.h
Adds core board macros for LED, button, battery sensing, remapped I2C, and LoRa/SX1262 SPI/control pins.
SX1262 radio config
variants/esp32c6/seeed_xiao_c6/variant.h
Adds SX126x-specific aliases and RF switch, RX/TX enable, and TCXO voltage configuration under USE_SX1262.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A tiny board hops in the hive,
With pins and radios set alive,
The bunny twitches, ears held high,
For C6 beams and wires that fly,
Hop hop — the new support is nigh! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding firmware support for the Seeed XIAO ESP32C6 with WIO-SX1262.
Description check ✅ Passed The description includes testing results and the attestation section with a device-specific note, covering the template's key requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@variants/esp32c6/seeed_xiao_c6/platformio.ini`:
- Around line 10-18: The esp32c6 seeed_xiao_c6 environment is incorrectly marked
as DFU-required even though it uses esptool for flashing. Update the board
configuration in the seeed_xiao_c6 PlatformIO env so
custom_meshtastic_requires_dfu is not set to true, and keep the flash/update
metadata consistent with upload_protocol and the generated manifest.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b43384d-a3a6-4aac-80a8-197866518539

📥 Commits

Reviewing files that changed from the base of the PR and between 392bac9 and e702232.

📒 Files selected for processing (4)
  • boards/seeed-xiao-c6.json
  • variants/esp32c6/seeed_xiao_c6/pins_arduino.h
  • variants/esp32c6/seeed_xiao_c6/platformio.ini
  • variants/esp32c6/seeed_xiao_c6/variant.h

Comment thread variants/esp32c6/seeed_xiao_c6/platformio.ini Outdated
@reb1995

reb1995 commented Jul 7, 2026

Copy link
Copy Markdown
Author

Working I2C test.
image

Working tx/rx.
image

Device details.
image

@reb1995 reb1995 changed the title Firmware for Seeed XIAO ESP32C6 and WIO-SX1262 for XIOA Firmware for Seeed XIAO ESP32C6 and WIO-SX1262 for XIAO Jul 7, 2026
@thebentern

Copy link
Copy Markdown
Contributor

Looks good. Can you please run trunk fmt for our linting?

…OA. Confirmed LED blinking as expected, TX and RX on both public channels and DMs. Working over bluetooth connection and WiFi. I2C confirmed working with oled screen.
@reb1995

reb1995 commented Jul 7, 2026

Copy link
Copy Markdown
Author

Looks good. Can you please run trunk fmt for our linting?

trunk fmt was run. Collapsed some of the arrays into single lines. Amended my commit and pushed it back up. Please let me know of any other issues.

@reb1995

reb1995 commented Jul 7, 2026

Copy link
Copy Markdown
Author

Build seems to be failing due to a missing partition scheme csv. The app size, ~2.5MB, will not fit in the 4MB flash with OTA enabled. In my local branch, I was using a default huge_app.csv partition scheme which had 3MB for the app. This wasn't included in the repo and the CI/CD didn't have the partition. Sorry for my oversight.

As a solution, we could add a new partition for the 4MB devices that doesn't include OTA capabilities. I have tested the following partition table to build and work. Not sure if it is something that you want to do. I'll leave that up to you all if that is worth doing or needs to be done before this PR.

RAM:   [==        ]  21.3% (used 111928 bytes from 524288 bytes)
Flash: [========  ]  81.8% (used 2574396 bytes from 3145728 bytes)
partition-table-4MB-no-OTA.csv 
# Can be used by devices with only 4 MB of flash. 
# Allows for building of and flashing of firmware on space constained devices.
# Will, obviously, prevent OTA updates.
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000, 0xF0000,

@thebentern

Copy link
Copy Markdown
Contributor

Build seems to be failing due to a missing partition scheme csv. The app size, ~2.5MB, will not fit in the 4MB flash with OTA enabled. In my local branch, I was using a default huge_app.csv partition scheme which had 3MB for the app. This wasn't included in the repo and the CI/CD didn't have the partition. Sorry for my oversight.

As a solution, we could add a new partition for the 4MB devices that doesn't include OTA capabilities. I have tested the following partition table to build and work. Not sure if it is something that you want to do. I'll leave that up to you all if that is worth doing or needs to be done before this PR.

RAM:   [==        ]  21.3% (used 111928 bytes from 524288 bytes)
Flash: [========  ]  81.8% (used 2574396 bytes from 3145728 bytes)
partition-table-4MB-no-OTA.csv 
# Can be used by devices with only 4 MB of flash. 
# Allows for building of and flashing of firmware on space constained devices.
# Will, obviously, prevent OTA updates.
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000, 0xF0000,

Try excluding modules like Audio and webserver?

@reb1995

reb1995 commented Jul 8, 2026

Copy link
Copy Markdown
Author

Build seems to be failing due to a missing partition scheme csv. The app size, ~2.5MB, will not fit in the 4MB flash with OTA enabled. In my local branch, I was using a default huge_app.csv partition scheme which had 3MB for the app. This wasn't included in the repo and the CI/CD didn't have the partition. Sorry for my oversight.
As a solution, we could add a new partition for the 4MB devices that doesn't include OTA capabilities. I have tested the following partition table to build and work. Not sure if it is something that you want to do. I'll leave that up to you all if that is worth doing or needs to be done before this PR.

RAM:   [==        ]  21.3% (used 111928 bytes from 524288 bytes)
Flash: [========  ]  81.8% (used 2574396 bytes from 3145728 bytes)
partition-table-4MB-no-OTA.csv 
# Can be used by devices with only 4 MB of flash. 
# Allows for building of and flashing of firmware on space constained devices.
# Will, obviously, prevent OTA updates.
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000, 0xF0000,

Try excluding modules like Audio and webserver?

Sure. I can try that. Will report back with my findings.

@reb1995

reb1995 commented Jul 9, 2026

Copy link
Copy Markdown
Author

Did quite a bit of test compiles and measurements (~15 different builds). Disabling the audio doesn't seem to change the size at all. Finally cut enough by disabling the Webserver and WiFi components to get it small enough to be able to OTA (~1.70 MB), however the ESP32C6 doesn't do bluetooth OTAs. So with no WiFi it wouldn't be able to OTA at all.

I think I was overthinking this and I think the only way to do this is to go forward is with a non OTA 4MB ESP32 partition table.

Not sure if this is something you guys want to do, but the partition table I posted earlier is working for the ESP32C6. I believe it would also work for the Seeed ESP32C3 (and other C3/C6's) as well. If this gets accepted, I'd be happy to write and test configurations for that.

Let me know if we want to go the non OTA route with a new partition table or if we want to close without merging. Or maybe there's a 3rd option I'm missing.

Sorry again to run in circles on this. I thought it would be a simple win but maybe missed the mark.

Build Configuration Binary Size (Bytes) Fits OTA Partition? (Max ~1.70MB) Includes WiFi OTA Result
Baseline (Fully Featured) 2,574,396 No Yes Fails (Binary too large)
Exclude Webserver 2,358,962 No Yes Fails (Binary too large)
Exclude GPS 2,506,048 No Yes Fails (Binary too large)
Exclude SCREEN 2,378,610 No Yes Fails (Binary too large)
Exclude SCREEN, GPS 2,309,748 No Yes Fails (Binary too large)
Exclude WIFI 1,697,334 Yes No Fails (No network to receive payload)
Exclude WIFI, Webserver 1,697,070 Yes No Fails (No network to receive payload)

Proposed 4MB flash partition table

partition-table-4MB-no-OTA.csv 
# Can be used by devices with only 4 MB of flash. 
# Allows for building of and flashing of firmware on space constained devices.
# Will, obviously, prevent OTA updates.
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000, 0xF0000,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-contribution hardware-support Hardware related: new devices or modules, problems specific to hardware needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants