Real-Time Workshop | ![]() ![]() |
The S-function code format (corresponding to the S-Function Target) generates code that conforms to the Simulink C MEX S-function API. Using the S-Function Target, you can build an S-function component and use it as an S-Function block in another model.
The S-function code format is also used by the Simulink Accelerator to create the Accelerator MEX-file.
In general you should not use the S-function code format in a system target file. However, you may need to do special handling in your inlined TLC files to account for this format. You can check the TLC variable CodeFormat to see if the current target is a MEX-file. If CodeFormat = "S-Function"
and the TLC variable Accelerator
is set to 1, the target is a Simulink Accelerator MEX-file.
See The S-Function Target for further information.
![]() | Real-Time malloc Code Format | Embedded C Code Format | ![]() |