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.
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.
CLion's support for the IAR compiler has been tested on the ARM architecture. Keep in mind that issues or limited functionality are possible if you are targeting another platform.
In CLion, navigate to
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