How does the creation path for 'slprj' in Embedded Coder work?

15 次查看(过去 30 天)
Hi everyone,
I'm using Embedded Coder to perform a SIL over a Simulink model. After the Simulation I get the following error
"Unable to find information file:
C:\MYPATH\Overall_sim_ert_rtw\slprj\ert\Overall_sim\tmwinternal\CompileInfo.xml. The top model 'Rebuild' configuration parameter might be set to 'Never'."
When I check the folder path, there really was no 'slprj' folder created in 'Overall_sim_ert_rtw\' but in the folder before 'Overall_sim_ert_rtw' next to 'Overall_sim_ert_rtw', which I think caused the error. Is there any way to set the folder, where 'slprj' is created?
Some further information:
  • The 'Rebuild' parameter is set to 'Always' not 'never'.
  • Also, so far as I understand the Simulation Report in the Diagnostic Viewer before the error message, the SIL itself was executed succesfully.
  • I'm using Matlab 2021b.
I'm thankful for every help!

回答(1 个)

Govind KM
Govind KM 2024-9-18,11:25
Hi Philipp,
I was facing a similar issue when using Embedded Coder to perform SIL. A workaround for me was to change the ‘Check Model before Build’ configuration parameter as mentioned below:
mdl = "testModel"; %Replace "testModel" with the name of the required model
set_param(mdl,CheckMdlBeforeBuild,off);
If this does not fix the issue, you can try changing the location of the generated code folders such as the “slprj” folder through Simulink Preferences or through the command line. Steps to perform this can be found in the following article:
Details on the default behavior and impact of these preferences can be found here:
The error I faced seems to be fixed in R2022b, so I would also suggest upgrading to the same or a later version.
Hope this is helpful!

类别

Help CenterFile Exchange 中查找有关 Embedded Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by