Operating System: Windows (MinGW) / Linux
Project Format: CMake
When setting up a toolchain for your embedded project, you can use the IAR compiler. CLion recognizes it as a C/C++ compiler and collects compiler information. You can also open projects that use the IAR toolchain, which should load successfully.
Currently, only CMake-based projects are supported. As a starting point, you can create an STM32CubeMX project and edit the auto-generated CMakeLists.txt.
👇 Click to Claim 👇
👉 C Language Knowledge Resource Collection
Set up the IAR compiler by downloading and installing the IAR Workbench. Open the IAR License Manager and ensure your IAR license is activated. Please note that CLion does not provide an IAR license.
CLion's support for the IAR compiler has been tested on ARM architecture. Note that if your target platform is other platforms, you may encounter issues or limited functionality.
In CLion, navigate to Settings | Build, Execution, Deployment | Toolchains
On Windows, create a new MinGW toolchain or select an existing one. Note that using the IAR compiler on Windows requires a MinGW environment.
On Linux, use the default local toolchain.
In the C Compiler and C++ Compiler fields, set the path to the IAR compiler:
Select a debugger: You can use the bundled GDB or a custom GDB version, such as the debugger from the GNU ARM Embedded Toolchain.
Perform one of the following actions:
-
Set the newly created toolchain as default by moving it to the top of the list. This way, you won’t need to manually select it in the CMake configuration files.
-
Go to Settings | Build, Execution, Deployment | CMake and select the newly created toolchain in the toolchain field of the current configuration:
Popular Recommendations
-
The candidates from big companies are indeed a bit strong, but I still rejected him~
-
Essential skills for working in state-owned enterprises…
-
Completely off the mark, you need to calculate your fortune before getting hired…