How to configure embeded coder, so that global parameters will not be initialized where they are defined but in the init function?
1 回表示 (過去 30 日間)
古いコメントを表示
Hallo,
when I generate code and I have e.g. a parameter defined in the data dictionary with storage class = "Auto", the code generator will generate something like this:
/* Model block global parameters (auto storage) */
UInt16 rtP_myParameter123_u16 = 1U; /* Variable: myParameter123_u16
But in our project it's not allowed to init variables here but only in the init function (due to Soft-Reset functionality) Therefore I need the code like:
/* Model block global parameters (auto storage) */
UInt16 rtP_myParameter123_u16; /* Variable: myParameter123_u16
And in the init function:
/* Model initialize function */
void myModel_initialize(void)
{
rtP_myParameter123_u16 = 1U;
...
I also need this behaviour not only for parameters but in general for all inits.
Thank you
0 件のコメント
回答 (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!