CLion PlatformIO plugin issue

I just noticed a post on Twitter about a PlatformIO plugin being available for CLion. I installed it but am having an issue with creating projects. I read the documentation that is available here and followed it step by step but very early on I started having problems, namely the list of “Available boards & frameworks”, it simply doesn’t load.

image

I let it be for a few minutes and still nothing.

I realize this might be a trivial thing but I am new to PlatformIO on CLion so I apologize in advance.

When you open a shell (cmd.exe), is the command pio --version available? It needs to be available in your path.

Did you install PlatformIO via the VSCode plugin or from the CLI? (pip)

I installed it via the simple plugin “marketplace” on CLion.
image

As I assumed these things are installed…

I have it on VSCode and it works perfectly there.

As for the command you’re saying I’m not sure what you mean. I don’t understand why it should be available for cmd. Do I need to be in the CLion plugin directory when i use it?

I am fairly new to this so I would appreciate an explanation

I meant the PIO core there not the CLion Extension.

Okay, so you installed it via the VSCode extension. It autodownloads the core for you.

The CLion plugin needs a way to access the PlatformIO core, and it does so by interacting with the pio program (instead of assuming where it might potentially be installed and calling the binary). But for that to work it needs to be in the PATH of the computer, of course. By checking it with a cmd.exe command we can make sure that it’s in the PATH and globally accessible (so no, if it’s in the PATH you don’t need to be in a special directory to execute it)

Please open VSCode, then open a new PIO Terminal, press enter in the terminal and then execute the command

get-command pio

It should tell you where the PlatformIO core binary lives.

In my case in the C:\Users\Maxi\AppData\Local\Programs\Python\Python37\Scripts folder.

Then go ahead and add it to the PATH environment variable (refer here). Make sure to re-open CLion for it to see the updated environment variable (or reboot the computer). You should also open a cmd.exe and make sure that pio --version returns something valid.

If the pio program is in your PATH, the extension should work.

1 Like

I tried to use the commands you provided, and they didnt work.

Sure you executed it in a PIO Terminal?

OK, it’s alright now.

Thank you very much for the help!