Error using Export model to Co-simulation Functional Mockup Unit (FMU)

35 次查看(过去 30 天)
I could not compile the file and got the following error:
The call to grtfmi_make_rtw_hook, during the after_make hook generated the following error:
Failed to run CMake. Run grtfmi_install_cmake to download and install CMake into the FMI Kit directory or install from cmake.org and set the cmake command in Configuration Parameters > Code Generation > CMake Build > CMake Command if the cmake executable is not on the path and it is not installed in the default location.
The build process will terminate as a result.
Caused by:
Failed to run CMake. Run grtfmi_install_cmake to download and install CMake into the FMI Kit directory or install from cmake.org and set the cmake command in Configuration Parameters > Code Generation > CMake Build > CMake Command if the cmake executable is not on the path and it is not installed in the default location.
Would you please help me resolve this issue?

采纳的回答

Yash
Yash 2023-7-19
Hi @Ali
The error message indicates that there was a problem running CMake, which is a tool used for building software projects. It appears that either CMake is not installed on your system or it is not located in the default location.
To resolve this issue, you have a few options:
  1. Install CMake: If you don't have CMake installed, you can download it from the official CMake website (cmake.org) and install it on your system. Make sure to choose the appropriate version for your operating system.
  2. Set the CMake command path: If you have CMake installed but it is not in the default location or not on the system's PATH, you need to specify the path to the CMake executable in the MATLAB/Simulink Configuration Parameters. Here's how you can do it:a. Open your MATLAB/Simulink project. b. Go to Configuration Parameters (usually located under the "Simulation" or "Model" menu). c. Navigate to Code Generation > CMake Build > CMake Command. d. Specify the full path to the CMake executable in the text field. For example, if CMake is installed at "C:\Program Files\CMake\bin\cmake.exe", you would enter that path. e. Click Apply or OK to save the changes.
  3. Use grtfmi_install_cmake: If you're using a specific FMI Kit that provides a helper function called grtfmi_install_cmake, you can try running that function but you still need to download and install CMake into the FMI Kit directory. I suggest you to refer the documentation or instructions provided with the FMI Kit for more information on how to use it.
I hope this helps.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Signal Integrity Kits for Industry Standards 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by