How to use custom storage class "imported define" in version 2024b?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to switch from Matlab Version 2023a to 2024b. I'm now facing an issue during code generation. Every time when I start the process matlab crashs without any error reported (the tool is closed). I figured out, that this happens because of the definition of a simulink parameter with StorageClass = 'Custom'. I'm using the Autosar compliant code generator. The simulink parameter is defined in a .m script, which is executed at the start of simulink (as preload function).
Here you can find the parameter definition from the preload function script.
RR_par_test = Simulink.Parameter;
RR_par_test.Value.test1 = int8(1);
RR_par_test.Value.test2 = int16(1000);
RR_par_test.Complexity = 'real';
RR_par_test.CoderInfo.StorageClass = 'Custom'; %this line causes the problem
RR_par_test.CoderInfo.Identifier = '';
RR_par_test.CoderInfo.Alignment = -1;
RR_par_test.CoderInfo.CustomStorageClass = 'ImportedDefine';
RR_par_test.CoderInfo.HeaderFile = 'Test.h';
RR_par_test.Description = 'Testdescription';
RR_par_test.DataType = 'struct';
RR_par_test.Min = [];
RR_par_test.Max = [];
RR_par_test.DocUnits = '';
The parameters are used for the simulation of the model, that's why I need the .Value attribute, but I need also to access them from an external .h file.
The question is, is the use of the custom storage class with imported define and a custimized .h file still possible in version 2024b?
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Event Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!