フィルターのクリア

How to reduce the number of global variables in the generated code?

8 ビュー (過去 30 日間)
Rusczak
Rusczak 2017 年 6 月 28 日
編集済み: Birdman 2017 年 10 月 18 日
Hi,
I'm currently generating C code using Simulink Coder and one thing that makes it complicate to integrate with my application is the amount of random Global structures that it creates. Even for inputs or outputs it is creating copies in globals.
Can anybody recommend techniques to reduce this?
thanks

採用された回答

Birdman
Birdman 2017 年 10 月 18 日
編集済み: Birdman 2017 年 10 月 18 日
You can make the inputs and outpus define as struct which are stored in .h files. For this purpose, go to Configuration Parameters-Code Generation-Interface and there is a subsection called Code interface packaging. Select Reusable function and for Pass root level I/O as Structure Reference. Hope this helps.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by