How to get the same code generation for a whole Simulink model and referenced subsubsyem?
2 ビュー (過去 30 日間)
古いコメントを表示
I have a Simulink model simulating a system and its firmware. The firwmare is a referenced subsystem that I want to covert to C code and flash on my controller. Why when I generate the embedded code for the whole model I do not get the same interface for the referenced subsystem?
Having the same interface would allow me to test the simulation on the hardware before connecting inputs and outputs and testing the firmware only.
1 件のコメント
Sahas
2025 年 4 月 10 日
What do you mean by the line "I do not get the same interface for the referenced subsystem?" here?
採用された回答
Mark McBroom
2025 年 4 月 12 日
Have you tried making the sub-system atomic and then on the code generation tab, setting the desired interface for the function? Right-click the Subsystem block. From the context menu, click Block Parameters (Subsystem). From the Block Parameters: window, open the Code Generation tab.
If you are still not getting the desired code, try converting the referenced subsystem to a referenced model. In general referenced models are better than referenced subsystems for locking down the interface of the generated code.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!