How to configure embeded coder, so that global parameters will not be initialized where they are defined but in the init function?
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!