Real-Time Workshop Embedded Coder    

Generating the Main Program

The Generate an example main program option controls whether or not ert_main.c is generated. This option is located in the ERT code generation options (3) category of the Real-Time Workshop pane of the Simulation Parameters dialog box, as shown in this figure.

Figure 2-1: Options for Generating a Main Program

By default, Generate an example main program is on. When Generate an example main program is selected, the Target operating system pop-up menu is enabled. This menu lets you choose the following options:

Regardless of which Target operating system you select, ert_main.c includes

The operation of the main program and the scheduling algorithm employed depend primarily upon whether your model is single-rate or multi-rate, and also upon your model's solver mode (SingleTasking vs. MultiTasking). These are described in detail in Program Execution.

If you turn the Generate an example main program option off, the Real-Time Workshop Embedded Coder provides the module ert_main.c as a basis for your custom modifications (see The Static Main Program Module).


  Code Modules Program Execution