- Navigate to Configuration Parameters (Ctrl+E) > Code Generation > Interface > Code interface Packaging
- Select "Nonreusable function"
Why Simulink Code Inspector does not verify an atomic "Subsystem" block with its "Function packaging" set to "Nonreusable function"?
6 views (last 30 days)
I am using Simulink Embedded Coder to generate code for embedded systems. In order to verify the code, I need a successful generated report from the Code Inspector.
When I try to run the "CompatibilityChecker" the following warning occurs:
Check Subsystem blocks
Identify Subsystem blocks that might impact compatibility with Simulink Code Inspector
The following subsystems are not supported:
Restructure the model so that the subsystems listed in the results set 'Function packaging (RTWSystemCode)' to 'Inline' , 'Nonreusable function' or 'Reusable function'.
If 'Nonreusable function' is selected, the subsystem must use the following configuration:
'Function name options (RTWFcnNameOpts)' is set to 'User specified'
'Function interface (FunctionInterfaceSpec)' is set to 'void_void'
'Function with separate data (FunctionWithSeparateData)' is set to 'off'.
For non-inlined subsystems, the model must set 'Code interface packaging (CodeInterfacePackaging)' to 'Nonreusable function'. If 'Reusable function' is selected, the model must set 'Pass reusable subsystem outputs as' to 'Individual arguments'.
After having followed the recommended actions the issue persists.
Is there a workaround to overcome this issue?
When the "Function packaging" of an atomic "Subsystem" block is set to "Nonreusable function", the model's code interface packaging needs to be configured to "Nonreusable function" as well. This change will make the model and code compatible with Simulink Code Inspector. You can do this by following the instructions below:
More Answers (0)