Adding a CMake project to the IDE
Download and install CMake (version 3.31 or later).
Choose Tools>Options>CMake/CMSIS-Toolbox to open the settings page for CMake/CMSISToolbox and specify the path to the CMake executable.
Choose Project>Create New Project to open the Create New Project dialog box.
Select the template Import CMakeLists.txt, located under the CMake for RISC-V folder.
Navigate to the
CMakeLists.txtthat belongs to the CMake project you want to add. Adding it can take a few minutes.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.txtfile into the IDE later, provided you choose the template located under the CMake for RISC-V folder. Import theCMakeLists.txtfile by selecting Project>Add CMakeLists.txt to Project. Note that you can only add oneCMakeLists.txtfile.