How to remove 'sl_padding' fields in the generated code using Simulink Coder in MATLAB R2022b?
Mostrar comentarios más antiguos
I am generating code for a top model using Simulink Coder in MATLAB R2022b. When using "rtwsfcn.tlc," I noticed extra "sl_padding" fields in the generated code, specifically in the *_types.h file. Please refer to the following code snippets for more details:
Using rtwsfcn.tlc:
typedef struct {
boolean_T EN[2];
uint8_T sl_padding0[2]; -> padding here
real32_T Value[2];
int32_T Time[2];
uint8_T sl_padding1[4]; -> padding here
} EN_Value_Time2;
Using a custom TLC:
typedef struct {
boolean_T EN[2];
real32_T Value[2];
int32_T Time[2];
} EN_Value_Time2;
How to avoid having "sl_padding" in the generated code using "rtwsfcn.tlc" target?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Simulink Coder en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!