CMake / CLion

erik2727
Posts: 8
Joined: Fri Apr 12, 2019 2:26 pm

Re: CMake / CLion

Postby erik2727 » Sat Apr 13, 2019 12:51 am

Which version of Clion are you having,with cmake provided by esp-idf 3.2 all you need to set is the IDF_PATH Cmake environmental variables and also the Cmake options -DIDF_PATH=<your ESP-IDF directory> to run successfully, toolchain just use any mingw will do. I have setup up Clion 2018.3 to. Run the ESP-IDF example and flashed to esp32 smoothly.

william.ferguson.au
Posts: 107
Joined: Wed Jan 02, 2019 8:55 am

Re: CMake / CLion

Postby william.ferguson.au » Tue Apr 23, 2019 5:02 am

OK, I'm still having trouble configuring the toolchain within CLion.
I can build the hello_world example using cmake from the command line, but I can't seem to configure it to build from within CLion.

Image

In the Build,Execution,Deployment->Toolchains config (shown in the image above which I suspect won't get rendered).
What values should I be using for:
  • Environment]
  • Make]
  • C Compiler]
  • C++ Compiler]
  • Debugger]
I don't particularly want to use Cygwin, it's just what it defaulted to. But it seems to think that the source is in "/cygdrive/e/Source/esp32/hello_world" which it is not.
Reminder: this is on Windows.

Code: Select all

E:\Dev\CMake\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_C_COMPILER=E:/Dev/Espressif/ESP-IDF Tools/tools/bin/xtensa-esp32-elf-gcc.exe" "-DCMAKE_CXX_COMPILER=E:/Dev/Espressif/ESP-IDF Tools/tools/bin/xtensa-esp32-elf-c++.exe" -G "CodeBlocks - Unix Makefiles" /cygdrive/e/Source/esp32/hello_world
CMake Error: The source directory "/cygdrive/e/Source/esp32/hello_world" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

CMake Error:
  ------------------------------------------------------------------------------------
  Selected CMake might be incompatible with the Cygwin environment.
  In order to run on Cygwin, CMake needs to be specially compiled.
  Please select either CMake bundled with CLion or CMake from the Cygwin installation.
  ------------------------------------------------------------------------------------

[Previous CMake output restored: 23/04/2019 2:34 PM]

Who is online

Users browsing this forum: kaxx1975 and 111 guests