The situation is a bit complicated…
The ESP32-C6 requires at least ESP-IDF version 5.1. This is no problem with PlatformIO and is supported since espressif32 version 6.4.0. Pure ESP-IDF projects should therefore work without problems from espressif32 @ 6.4.0.
However, the latest Espressif32 Arduino version available (officially for PlatformIO) is 2.0.17 which is based on ESP-IDF 4.4.7 and therefore cannot use the C6.
You need Espressif Arduino 3.0.x or 3.1.x which is based on ESP-IDF 5.1.4 or 5.3.0 respectively. See platform-espressif32 versions · GitHub
You can use the alternative platform pioarduino/platform-espressif32. This offers you the latest Espressif32 Arduino core (currently version 3.0.7).
This allows you to write Arduino and ESP-IDF as well as Arduino as ESP-IDF Component projects.
Luckily there is a board manifest for the XIAO-Seeed-ESP32-C6
Unfortunately this is not yet included in the current release.
So you have to download this file and put it into a "boards"
folder located in your projects folder like so:
.
├── .pio
├── .vscode
├── boards
│ └── seeed_xiao_esp32c6.json
├── include
├── lib
├── src
│ └── main.cpp
├── test
├── .gitignore
└── platformio.ini
Using the following platformio.ini should then work for you:
[env:seeed_xiao_esp32c6]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
board = seeed_xiao_esp32c6
framework = arduino