Adding STM Code Modules
To obtain a working prototype of the system, you can extend your handwritten code with Rational Statemate code modules. Use this option when most of your model consists of handwritten code, but you want to supplement it with some Rational Statemate-generated code.
Note: When the majority of your model consists of Rational Statemate-generated code, refer to Adding User-Written Code.This section explains how to generate Rational Statemate (or STM) code modules. The module’s format makes it easier to take the generated code out of Rational Statemate and incorporate it into your handwritten code.
Normally, Rational Statemate-generated code consists of an entire executable that includes the main, scheduling, data management, interrupt handling, and all other necessary services. Since you are supplying these services, you only need a self-contained module. This option generates a module of code rather than the entire executable.
Modules, however, do not communicate or synchronize with any other Rational Statemate modules. Your handwritten main body must perform the communication or synchronization functions between Rational Statemate-generated modules.