IAR toolchain
When setting up a toolchain for your embedded project, you can use the IAR compiler. CLion will detect it as a C/C++ compiler and collect the compiler information. Also, you can open the projects that use the IAR toolchain, and they should load successfully.
Only CMake-based projects are supported at the moment. As a starting point, you can create an STM32CubeMX project and edit the auto-generated CMakeLists.txt. Use our sample project as an example.
Set up the IAR compiler
Download and install the IAR workbench. Open IAR License Manager and make sure that your IAR license is activated. Note that CLion does not provide IAR licenses.
In CLion, navigate to
On Windows, create a new MinGW toolchain or select an existing one. Note that MinGW environment is required for you to be able to use the IAR compiler on Windows.
On Linux, use a default local toolchain.
In the C Compiler and C++ Compiler fields, set the path to the IAR compiler:
Select the debugger: you can use the bundled GDB or a custom GDB version, for example, the debugger from GNU ARM Embedded Toolchain.
- Do one of the following:
Set the newly created toolchain as Default by moving it to the top of the list. This way, you will not need to select it manually in the CMake profile.
Go to Toolchain field of the current profile:
and select the newly created toolchain in the