When I generate autocode for the using the TI C2000 toolchain, all Simulink.Parameter variables in the model are declared as 'extern' in the model header file. I.E. if I have a variable x, when i generate code, the header file will have a line that says something like extern int x; No matter what datastorage method I use, the end result is that the variable is some kind of extern (Simulink Global puts the variable into a structure, and then the structure has an extern declaration).
Because we are using Model Based Development to create code for aerospace applications, any global declarations are not allowed. How do I get Simulink to generate code where Simulink.Parameter values are created inside the model's function (i.e. so the variables are not accessible by other functions).
Best Answer