Main Content

Sharing Utility Code

Set up reusable code for sharing

When you set up sharing utility code, code generation produces shared utility files for blocks in a model. These blocks require common functionality to implement their algorithm. Other models with an identical shared utility checksum can reuse the code in these shared utility files.


expand all

sharedCodeUpdateAdd new shared code source files to existing shared code folder


Generate Shared Utility Code

Modularize and share common Model block functionality as helper functions.

Generate Shared Utility Code for Fixed-Point Functions

Generate reusable code for fixed-point support functions.

Generate Shared Utility Code for Custom Data Types

Generate reusable code for custom data types.

Cross-Release Shared Utility Code Reuse

Reuse shared utility or external code across releases.