There are different possibilities to include your generated code into the Simulink Test Environment:
1) Writing a S-Function by hand
--> This is not really feasible if you have a huge amount of interface data.
2) Referencing the (correct) header file generated by Embedded Coder in the top level bus object.
DLL_Input.Header = 'Model_types.h'
DLL_Output.Header = 'Model_types.h'
With this the S-Function Builder
- will not generate its own header file.
- manages the memory mapping and allocation in the correct order based on the definition of the bus object.
With this possibility the DLL interface between the S-Function and the DLL generated with Real-Time Workshop Embedded Coder fits.
Best Answer