Error at generating Embedded C Code from Simulink

39 次查看(过去 30 天)
Hi everyone,
i'm trying to convert a simulink model into embedded code for stm applications. The target file of my system is ert.tlc, and I receive these errors every time I try to build without recommendations how I can fix it : Unable to open block template file s0_b0_8wmds_BlockInstanceSetup.tlc from GENERATE or GENERATE_TYPE
I would appreciate your help a lot.
Thank you very much
  2 个评论
Saurabh
Saurabh 2024-12-19,9:11
I have few questions regarding the issue:
  1. Does the models uses system variants?
  2. If yes, could you verify that the error only occurs if code has already been generated for the model with one set of variants active, and when attempts to regenerate code in the same director after switching the active variants?
If this is the case "s0_b0_8wmds_BlockInstanceSetup.tlc" file need to be regenrated when the link library/stateflow state is changed from active to inactive. This might fix the issue.
Camillo Molinari
Camillo Molinari 2024-12-19,10:34
Hello @Saurabh,
unfortunately I don’t know if the model uses system variants as the libraries are locked. It’s a cell model which bases on equivalent circuit models. Our sponsors provided us with the simulink models, but I can’t modify or look deeper into them.
Thank you very much for you help

请先登录,再进行评论。

回答(1 个)

Jaimin
Jaimin 2024-12-30,5:49
It seems you are working with a complex Simulink model with some locked components, which can make troubleshooting more challenging. Here are a few steps you might consider to resolve the issue:
Check for System Variants:
  • Even if the libraries are locked, you might be able to determine if system variants are used by looking at the model's configuration or documentation provided by your sponsors. If you suspect variants are involved, try regenerating the TLC file.
Clear Cache and Rebuild:
  • Sometimes, clearing the cache can help. You can do this by using the following commands in MATLAB:
slbuild('modelname', 'clean');
Dependency Check: Make sure all dependencies and required toolboxes are installed and properly configured. This includes checking for custom TLC files or scripts that might be missing.
For more information kindly refer following MathWorks Documentation.
I hope this will be helpful.

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by