xil_interface.c build error during SIL simulation of custom interface Simulink Model
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have a Simulink model that generates code with the following Code interfaces settings:
- Code interface packaging: Reusable function
- Pass root-level I/O as: Individual arguments
I have also customized the prototype of the model step function to look like this:
arg_d = testmodel_step(*self, cntrl_t arg_x, cntrl_t arg_y)
where arg_x and arg_y are arguments passed by value. These arguments are of type cntrl_t, which as a custom struct type imported from an external header file.
I am able to simulate the model in normal mode and build the generated code without problems. However, when I try to run a SIL simulation of my model as a SIL model block with Top model interface within a test harness model I get this error:
C:/Repos/testmodel/testmodel_ert_rtw/sil/xil_interface.c:327:7: error: invalid type argument of unary '*' (have 'cntrl_t {aka struct <anonymous>}')
*(arg_x), *(arg_y));
^~~~~~~~~~~~~~~~~~~~
C:/Repos/testmodel/testmodel_ert_rtw/sil/xil_interface.c:327:29: error: invalid type argument of unary '*' (have 'cntrl_t {aka struct <anonymous>}')
*(arg_x), *(arg_y));
^~~~~~~~~~~~~~~~
My toolchain is MinGW64 gmake (64-bit Windows).
Why does the code generator for the SIL interface try to dereference the step function arguments if they are not pointers?
I checked the xil_interface.c file and the interface data are actually declared correctly as variables and not pointers.
Do I need to configure my model code generation in a special way to fix this error?
Thank you,
Nicolas.
3 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!