model - SIMULINK 中代码生成符号的命名冲突

标签 model simulink name-mangling

我的问题特定于 SIMULINK、Model and Code Generation Advisor 和 Embedded Coder

我在更大的模型(即集成系统)中使用了引用模型,我的引用模型具有相似或相同名称的信号。当我使用模型和代码生成顾问来检查我的模型的健全性时,在“为严格的单精度操作标识有问题的设置”下出现以下错误

{code}Error occurred during model compile.

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model{code}

我什至尝试删除任何信号名称并使用非虚拟数据总线对信号进行分组,以便将它们转换为 C 代码中的结构(生成时)。但是,它仍然提示同样的事情。

我尝试的另一件事是操纵名称修改。但随后它与 MISRA C 代码安全要求(最小修饰字符和最大标识符/var 长度)冲突。

如果这个问题是 SIMULINK 的限制或可以修复,我很难理解。我不能简单地去改信号名,因为那是盲目适应SIMULINK,而不是调查核心原因。另外,我认为模型在功能上是正确的。有没有人经历过这样的事情?

供引用,我认为使用数据总线与此无关。我只是尝试了这种方法,因为有人建议。

最佳答案

一旦我更改了标识符名称的最大允许字符长度,问题似乎就消失了。但是我必须在所有模型中更改它!!!!!!

这可以从模型配置参数的代码生成菜单的符号 Pane 中完成。

关于model - SIMULINK 中代码生成符号的命名冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20091912/

相关文章:

c++filt 对 PTX 文件中的一些损坏名称不够积极

c++ - 假设我不使用任何重载函数,有没有办法可以停止所有名称修改?

c# - 如何在数据库中存储数据表?

python - 从 AppEngine 数据存储区删除之前获取部分祖先

matlab - 如何将 Simulink 模块的输出作为输入反馈?

git - 是否有应用 .gitattributes 的全局方法?

c++ - 如何在 Clang 中获取 NamedDecl 的错位名称?

python - 我什么时候应该在 Django 中使用 user.get_profile?

java - 如何在android中解析列表?

c++ - Matlab legacy_code 工具 - 编写包装函数来捕获数组