Skip to main content

IAR Embedded Workbench for RISC-V 3.40.x

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 Tools>Options>CMake/CMSIS-Toolbox to open the settings page for CMake/CMSISToolbox and specify the path to the CMake executable.

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

  4. Select the template Import CMakeLists.txt, located under the CMake for RISC-V folder.

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

  6. 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 template located under the CMake for RISC-V folder. Import the CMakeLists.txt file by selecting Project>Add CMakeLists.txt to Project. Note that you can only add one CMakeLists.txt file.