Skip to main content

IAR Embedded Workbench for RISC-V 3.40

Adding a CMake project to the IDE

In this section:
To add a CMake project:
  1. Download and install CMake (version 3.31 or later).

  2. Choose Project>Create New Project to open the Create New Project dialog box.

  3. From the Tool chain dropdown menu, choose CMake for RISC-V and select the template Import CMakeLists.txt.

  4. Navigate to the CMakeLists.txt that belongs to the CMake project you want to add. Adding it can take a few minutes.

  5. Save the project file in a suitable location.

    Now all files should be displayed in the Workspace window.

    The project can now be analyzed and debugged as a regular Embedded Workbench project. In a project with multiple executable targets, select the target to debug on the Project>Options>CMake>Target page.

    You can also use the template Empty project and import a CMakeLists.txt file into the IDE later, provided you choose the tool chain CMake for RISC-V. Import the CMakeLists.txt file by selecting Project>Add CMakeLists.txt to Project. Note that you can only add one CMakeLists.txt file.