| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop Embedded Coder |
| Contents | Index |
| Learn more about Real-Time Workshop Embedded Coder |
The following limitations apply to controlling model function prototypes:
Function prototype control supports only step and initialization functions generated from a Simulink model.
Function prototype control supports only single-instance implementations. For standalone targets, you must clear the Generate reusable code check box (on the Interface pane of the Configuration Parameters dialog box). For model reference targets, you must select One for the Total number of instances allowed per top model parameter (on the Model Referencing pane of the Configuration Parameters dialog box).
For model reference targets, the code generator ignores the Generate reusable code parameter (on the Interface pane of the Configuration Parameters dialog box).
You must select the Single output/update function parameter (on the Interface pane of the Configuration Parameters dialog box).
Function prototype control does not support multitasking models. Multirate models are supported, but you must configure the models for single-tasking.
You must configure root-level inports and outports to use Auto storage classes.
The generated code for a parent model does not call the function prototype control step functions generated from referenced models.
Do not control function prototypes with the static ert_main.c provided by The MathWorks. Specifying a function prototype control configuration other than the default creates a mismatch between the generated code and the default static ert_main.c.
The code generator removes the data structure for the root inports of the model unless a subsystem implemented by a nonreusable function uses the value of one or more of the inports.
The code generator removes the data structure for the root outports of the model except when you enable MAT-file logging, or if the sample time of one or more of the outports is not the fundamental base rate (including a constant rate).
If you copy a subsystem block and paste it to create a new block in either a new model or the same model, the function prototype control interface information from the original subsystem block does not copy to the new subsystem block.
For a Stateflow chart that uses a model root inport value, or that calls a subsystem that uses a model root inport value, you must do one of the following to generate code:
Clear the Execute (enter) Chart At Initialization check box in the Stateflow chart.
Make the Stateflow function a nonreusable function.
Insert a Signal Conversion block immediately after the root inport and select the Exclude this block from 'Block reduction' optimization check box in the Signal Conversion block parameters.
![]() | Verifying Generated Code for Customized Functions | Controlling Generation of Encapsulated C++ Model Interfaces | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |