Using CMake with IAR Embedded Workbench and IAR Build Tools

Technical Note 190701

Architectures:

8051, Arm, AVR, MSP430, Renesas Synergy, RH850, RISC-V, RL78, RX, STM8, V850

Component:

general

Updated:

1/9/2024 9:58 AM

Disclaimers

A prerequisite is basic understanding of the CMake concept, as well as having an understanding on how to use the IAR build tools from command line.

CMake is maintained and supported by Kitware, developed in collaboration with a community of contributors. Use the Official CMake Repository to report software defects.

Introduction

CMake is an open-source, cross-platform family of tools designed to build, test, and package software. It controls the software compilation process using platform and compiler independent configuration files.

Discussion

Our Building and testing with the IAR tools in CMake tutorial provides basic-level guidance to using CMake together with the IAR tools to cross-compile embedded software applications for the supported target architectures, directly from the command line.

Further, the tutorial provides examples on how to use CTest in conjunction with the IAR C-SPY Command Line Utility (cspybat) to perform automated testing.

Note: Starting from the IAR Embedded Workbench IDE 9.3, CMake-based projects (CMakeLists.txt) can be built directly from the IAR products shipped with such IDE version. CMake 3.20 or later must be installed separately

Conclusion

Use the IAR CMake tutorial to learn how to build and test CMake projects using an IAR toolchain from the command line. For IAR Embedded Workbench IDE 9.3 or later, CMake-based projects can also be built directly from within the IDE.

All product names are trademarks or registered trademarks of their respective owners.

We do no longer support Internet Explorer. To get the best experience of iar.com, we recommend upgrading to a modern browser such as Chrome or Edge.