本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

Simulink Coder

SimulinkStateflow 模型中生成 C 和 C++ 代码

Simulink® Coder™(以前称为 Real-Time Workshop®)从 Simulink 模型、Stateflow® 图和 MATLAB® 函数中生成并执行 C 和 C++ 代码。生成的源代码可用于实时和非实时应用程序,包括仿真加速、快速原型和硬件在环测试。您可以使用 Simulink 调整和监测生成的代码,或在 MATLAB 和 Simulink 之外运行代码以及与代码交互。

Simulink Coder 快速入门

Simulink Coder 基础知识学习

模型架构和设计

代码生成在模型组件化、层次结构和执行顺序方面的注意事项

数据、函数和文件定义

控制生成的代码中的模型数据和元素

代码生成

C/C++ 代码生成和调试、报告生成

部署

部署可执行程序和共享库

性能

减少内存使用量并提高生成的代码的执行速度

验证

将模型与生成的代码的仿真结果进行比较

支持的硬件

通过 Simulink Coder 支持第三方硬件。


查看错误报告以确定并解决问题

Software is inherently complex and is not free of errors. The output of a code generator might contain bugs, some of which are not detected by a compiler. MathWorks reports critical known bugs brought to its attention on its Bug Report system at www.mathworks.com/support/bugreports/. In the search bar, type the phrase "Incorrect Code Generation" to obtain a report of known bugs that produce code that might compile and execute, but still produce wrong answers. To save a search, click Save Search.

The bug reports are an integral part of the documentation for each release. Examine periodically all bug reports for a release, as such reports may identify inconsistencies between the actual behavior of a release you are using and the behavior described in this documentation.

In addition to reviewing bug reports, you should implement a verification and validation strategy to identify potential bugs in your design, code, and tools.

搜索 R2020a 错误报告

致使生成错误代码的已知错误
本产品的所有已知错误