I worked through the steps at https://www.jetbrains.com/help/clion/platformio.html to get PlatformIO installed and working with CLion. The following program now works:
void setup() {
Serial.begin(9600);
Serial.println("yay, I'm working.");
}
void loop() {
}
Now... I need to get an ESP32-compatible SSD1306 library installed (among others), so I can actually do something useful.
As far as I can tell, CLion (with or without the PlatformIO plugin) has nothing like the library browser in the Arduino IDE. Is there a less barbaric way of getting Arduino libraries into a CLion-PlatformIO project than grabbing the library's repo from Github and hand-copying files (and their recursive dependencies)?
Are PlatformIO projects created via CLion round-trip compatible with VSCode+PlatformIO? Like, can I create the PlatformIO project in CLion, exit CLion, launch VSCode, open the same project, use VSCode to add the libraries, exit VSCode, then go back into CLion and use them? Or is that a recipe for pain, tears, and corrupt config files?