Esp32-c6 supported from Platformio

I recently bought an ESP32-C6 and was doing some digging, @simogaspa84 also asked this question again in a new topic (Esp32 c6 support) so I decided to share my findings. It seems that we’re still waiting for Arduino ESP32 Core support. There’s an open issue about it (https://github.com/espressif/arduino-esp32/issues/7713). Fortunately it’s currently in review, as can be seen in the Arduino ESP32 Core roadmap.

Comments on the issue mention that Arduino support should mostly work using the master branch of Arduino ESP32 Core and I was hoping that someone could figure out a way to use that in PlatformIO while we wait for official support. I gave it a try but I’m not a platformio.ini expert.