CLion does not recognizes PlatformIO configurations on Windows

I have followed the installation process described here: Redirecting...

… and it’s not working. The CLion does not recognize the PlatformIO configurations.

Steps to reproduce:

  1. Create the project:
    mkdir led-blink
    cd led-blink
    platformio init --ide clion --board nodemcuv2

  2. Import the project from CLion.

  3. Clion does not recognize the PlatformIO configurations.

Could you try the latest development version?

Please don’t forget to place some *.cpp file to src folder in the project.

Hi @ivankravets, I have tried the development version, but the problem persists. I have noticed the following issue:

What is verison of your CLion?

My CLion version is 2016.2.3.

Hm… My version is the same. I’m under the macOS. Will test it under Windows.

I have successfully configured CLion with MingW64: MinGW-w64 - for 32 and 64 bit Windows download | SourceForge.net

@averri do you mean that you integrated PlatformIO with the latest CLion and Windows?

Hi @ivankravets, yes, I have integrated CLion with Platformio on Windows 7 64 bits and Windows 10 64 bits. The tricky was to use the MingW 64 bits.

Can’t imagine why do you need this MinGW. PlatformIO does not use it. Does CLion require it?

Yes, CLion requires it, although it’s not used by PlatformIO.

same here, had to download
https://vorboss.dl.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v5.0.0.zip
after that build, upload works fine, inspite of clion errors

error running platformio_upload: incorrect run configuration// executible is not specified

Please don’t use RUN and use BUILD instead. See picture with marks in the docs:

it doesnt build without ming64, of course i tried this , solved only after setting environment to min64

Same for me - trying to compile a PIO imported project in CLion with the cygwin toolchain will not build, I get the same red marks against the build options as noted by @averri

Further - I got this in the build messages

CMake Error at /cygdrive/c/Users/kevin/.CLion2017.1/system/cygwincmake/share/cmake-3.7.2/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler “/cygdrive/c/Program Files/LLVM/bin/clang++.exe” is not
able to compile a simple test program.

and the CMakeError.log had this:

Compiler: /cygdrive/c/Program Files/LLVM/bin/clang++.exe
Build flags: Id flags:
The output was:
80
LINK : fatal error LNK1104: cannot open file 'kernel32.lib

But switching to the mingw toolchain instead fixes it - I now have build targets that will run.