How to remove 'sl_padding' fields in the generated code using Simulink Coder in MATLAB R2022b?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!