Create Standalone FMU
Use the FMU Builder for Simulink support package to create a Functional Mockup Unit (FMU) from Simulink models or C/C++ code.
Debug FMU that contains its source code using an external debugger. For more information, see Debug FMU with Source Code Using External Debugger.
To import your existing FMU into Simulink, see FMU Importing.
Functions
| exportToFMU | Export Simulink model to functional mock-up unit (FMU) (Since R2023b) | 
| Simulink.SFunctionBuilder.generateFMU | Generate FMU compatible with FMI 3.0 standards from C/C++ code using S-Function Builder block (Since R2023b) | 
| Simulink.fmuexport.GetExportableVariableList | Get the list of exportable inputs, outputs, parameters, and internal variables for a model that is to be exported as an FMU | 
Topics
- Export Simulink Models to Functional Mock-up UnitsGenerate cosimulation FMU compatible with FMI 2.0 and FMI 3.0 standards. 
- Limitations for Parameter Tunability in Generated FMUsLimitations that prevent Simulink model parameters from appearing as tunable parameters of generated FMU. 
- Export Simulink Model to Standalone FMU with Source CodeThis example shows how to export Simulink® model to a standalone Co-Simulation FMU 2.0 with C++ source code using Simulink Compiler™ and Simulink Coder™. 
- Configure Model to Export as FMU with Internal VariablesExport Simulink model to FMU with internal variables. 
- Export Standalone FMU with External C++ CodeThis example shows how to integrate external C++ code into a Simulink® model using S-Function Builder block and export the model to a standalone FMU. 
- Generate FMU from C/C++ Code Using S-Function BuilderIntegrate C/C++ code into Simulink S-Function Builder and generate an FMU. 
- Export Model as FMU with Linux Binary on WindowsGenerate standalone cosimulation FMU 2.0 and 3.0 with Linux® binary on Windows®. 
- Fix System Configuration Issues for Cross-Platform FMU WorkflowTroubleshoot WSL and docker setup for cross-platform FMU compilation and simulation. 
- Eliminate Single Step Delay in Co-Simulation FMU Using Event ModeA functional mockup unit (FMU) exhibits a single step delay of output in Simulink® when it is used in co-simulation mode. 
- Use Multi-Instance FMU for Simultaneous SimulationsThis example demonstrates how to generate and simulate an Functional Mock Up Unit (FMU) compatible with multi-instantiation in Simulink®. 
- Export Model as FMU with Constant Periodic ClocksThis example shows how to export a Simulink® model, with fixed-step solver, as a standalone cosimulation FMU that is compatible with FMI 3.0 standards and contains constant periodic clocks. 









