I updated to PlatformIO 6.1.10 and created a new project from CLI. Even this was not as straight forward as I’d like.
Apparently if I do:
pio project init --board zero --project-dir "~/CLionProjects/MyNewProject" --ide clion, I get
Error: Invalid value for '--project-dir' / '-d': Directory '~/CLionProjects/MyNewProject' does not exist..
If I create the folder and use an absolute path (it did not work with the home directory - even with double-quotes), it creates a folder with a
platformio.ini and a couple of folders. I’d expect it to create
CMakeListsPrivate.txt at this point.
However: even at a later point no such files are created. CLion does suggest creating it (and creates it if necessary) when opening any source file, but the file seems weird content-wise.
Since I have a
CMakeLists.txt and a
CMakeListsPrivate.txt flying around, it must have been generated at some point when I created a new project using CLion itself (along with the PlatformIO plugin). However: this does not work anymore (the only difference between then and now is the updated PlatformIO library).
So my questions are:
- When are the 2 CMakeLists files generated?
- When are they regenerated?
- And - most importantly - what should I do since these files don’t seem to be generated on my machine.
I am using PlatformIO 6.1.10 (previously 6.1.9), CLion v2023.1.3 and PlatformIO Plugin for CLion v231.8109.141.
Also I am on a MacBook M1 Pro with MacOS Ventura (13.5).
If you need any additional information, please let me know. Any help is greatly appreciated.
I verified, that on PlatformIO version
pio project init --board zeroUSB --ide clion via CLI) indeed does generate
CMakeListsPrivate.txt on the same project. So I suspect there being an issue with version
6.1.10 (not sure about
6.1.9_1), which is why I filed a bug on
platformio-core: CMakeLists.txt and CMakeListsPrivate.txt no longer regenerated upon Re-Init (neither CLI nor CLion) · Issue #4718 · platformio/platformio-core · GitHub.