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

조회 수: 36 (최근 30일)
Ali
Ali 2023년 5월 29일
답변: Yash 2023년 7월 19일
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