# IAR toolchain

> **TL;DR**
> OS: Windows (MinGW) / Linux
>
>
>
> Project format: CMake

When setting up a toolchain for your embedded project, you can use the [IAR](https://www.iar.com/) 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](embedded-stm32.html) and edit the auto-generated `CMakeLists.txt`. Use our [sample project](https://github.com/elmot/clion-iar-stm32f3-stub) as an example.

Procedure: Set up the IAR compiler

1. Download and install the [IAR workbench](https://www.iar.com/products/architectures/arm/iar-embedded-workbench-for-arm). Open IAR License Manager and make sure that your IAR license is activated. Note that CLion does not provide IAR licenses.

> **Note:**
> 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.

2. In CLion, navigate to `Settings | Build, Execution, Deployment | Toolchains`

On Windows, [create](how-to-create-toolchain-in-clion.html#new-toolchain) a new MinGW toolchain or select an existing one. Note that [MinGW environment](quick-tutorial-on-configuring-clion-on-windows.html#MinGW) is required for you to be able to use the IAR compiler on Windows.

On Linux, use a default local toolchain.

3. In the C Compiler and C++ Compiler fields, set the path to the IAR compiler:

![Toolchain with the IAR compiler](https://resources.jetbrains.com/help/img/idea/2026.2/cl_toolchain_iar.png)

4. Select the debugger: you can use the bundled GDB or a custom GDB version, for example, the debugger from [GNU ARM Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm).

![GDB debugger for the IAR toolchain](https://resources.jetbrains.com/help/img/idea/2026.2/cl_toolchain_iar_gdb.png)

5. 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. ![IAR toolchain as default](https://resources.jetbrains.com/help/img/idea/2026.2/cl_toolchain_iar_default.png)

* Go to `Settings | Build, Execution, Deployment | CMake` and select the newly created toolchain in the Toolchain field of the current profile: ![IAR toolchain selected for a CMake profile](https://resources.jetbrains.com/help/img/idea/2026.2/cl_cmakeprofile_iar_nondef.png)

> **Tip:**
> For more information about using IAR toolchain with CMake, take a look at this technical note by IAR Systems: [Using CMake with IAR Embedded Workbench](https://www.iar.com/knowledge/support/technical-notes/general/using-cmake-with-iar-embedded-workbench)

## See also

### How tos

[Quick CMake tutorial](quick-cmake-tutorial.html) [Windows Tutorial](quick-tutorial-on-configuring-clion-on-windows.html)

### Procedures

[STM32CubeMX projects](embedded-stm32.html) [OpenOCD support](openocd-support.html)

### External Links

[Embedded Development in CLion FAQs](https://intellij-support.jetbrains.com/hc/en-us/articles/4405160320274-Embedded-Development-in-CLion) [Sample project on GitHub](https://github.com/elmot/clion-iar-stm32f3-stub)

