Real-Time Workshop    

Modularity of Subsystem Code

Note that code generated from nonvirtual subsystems, when written to separate files, is not completely independent of the generating model. For example, subsystem code may reference global data structures of the model. Each subsystem code file contains appropriate include directives and comments explaining the dependencies. Real-Time Workshop checks for cyclic file dependencies and warns about them at build time. For descriptions of how generated code is packaged, see Generated Source Files.

Code Reuse Diagnostics

HTML code generation reports (see Generate HTML Report Option) contain a Subsystems link in their Contents section to a table that summarizes how nonvirtual subsystems were converted to generated code. The Subsystems section contains diagnostic information that helps to explain why the contents of some subsystems were not generated as reusable code. In addition to diagnosing exceptions, the HTML report's Subsystems section also maps each noninlined subsystem in the model to functions or reused functions in the generated code.


  Nonvirtual Subsystem Code Generation Options Generating Code and Executables from Subsystems