フィルターのクリア

How do I get simulink code generation to recompile each time, even if the model is unchanged?

13 ビュー (過去 30 日間)
Shraddha
Shraddha 2014 年 6 月 2 日
コメント済み: Kaixiang Wang 2018 年 12 月 7 日
Hi,
I am attempting to generate code from a Simulink model. I noticed that, if no changes are made in the model, code generation simply reuses previously compiled code.
This is an issue for me since I'm using values from the MATLAB base work space in my simulink model and if I change values there, I would like changes to be reflected in code generation.
This is currently what's happening:
1) Change value X from 0 to 1 in the MATLAB workspace. 2) Make no change in the simulink model. 3) The value of X in the generated code is still 0.
If in step 2) however I make some small change in the simulink model, MATLAB recompiles the model code and the new value of X (1) is reflected.
Is there a workaround to this?
  1 件のコメント
Bryan
Bryan 2015 年 1 月 29 日
Shraddha,
I realize it has been 6 months since your original posting. Did you find any solution to this? I have also found this same behavior if you edit the Model Description and want it to appear in your comment banner.

サインインしてコメントする。

回答 (1 件)

Jason Moore
Jason Moore 2015 年 2 月 7 日
You can force a model to rebuild every time during Simulation by going to Configuration Parameters -> Simulation Target -> Simulation Target Build Mode. Change this setting from incremental to build all if you would like for Simulink to always rebuild.
  1 件のコメント
Kaixiang Wang
Kaixiang Wang 2018 年 12 月 7 日
I believe this answer is no longer valid (for MATLAB 2017a and perhaps above). Can you update it?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by