Problem in code generated for variant subsystem

2 views (last 30 days)
Hello All. I need help for an issue regarding variant subsystem.
I am using Matlab R2011b.
My model has a variant subsystem which have two implementation subsystems. Each implementation include Stateflow chart. Now problem is this, there is a separate function generated for chart in variant A , which is not used for variant B.
But this function is not guarded by preprocessor.
Something like this
static void enter_internal_ChartA_StateXYZ(void)
{
/* Some code for variant A chart*/
bla...
bla...
}
void mymodel_step(void)
{
#if VAR_A
bla......
bla......
enter_internal_ChartA_StateXYZ();
bla......
#elif VAR_B
bla......
bla......
bla......
#endif
}
Function enter_internal_ChartA_StateXYZ is used for VAR_A only but it is not gaurded by preprocessor. So while compiling code for VAR_B, I am getting error. Am I doing something wrong or is it Matlab bug ?
The only special thing I am using is AUTOSAR target production package target for code generation which is inherited from ert target only.

Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!