The detailed behavior of the model compiler is controlled by a number of variables. These correspond to those preferences in Model RealTime which affect the result of building a model. Variables can be specified in an environment file and passed to the model compiler using its –-env
command-line option. They can also be specified as environment variables or as JVM system properties on the command-line. The model compiler also provides dedicated command-line options for setting the variables. If the same variable is set using several of these mechanisms the variable’s value is obtained in this priority order (from high to low):
Variable defined in environment file
JVM system property
Environment variable
When you call the model compiler from the command-line (or from a script) you will normally use command-line options for setting variables. The use of an environment file is mainly intended for the integration between the Model RealTime Eclipse IDE and the model compiler.
The following variables can be used:
Variable | Type | Description |
---|---|---|
RTAutoDeps |
Boolean | By default, the C++ transform uses the Sources list of the transformation configuration to determine which model elements to transform to C++. It is therefore important to maintain this list to keep it correct and minimal at all times. If you set this preference the Model Compiler will analyze dependencies based on the top-level capsule (all elements it depends on, directly and indirectly), and add missing sources for the time of the build without modifying the source list in the TC file. All added sources will be printed into the UML Development Console. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Detect Source Dependencies Automatically. |
RTAutoDepsLog |
Boolean | This variable applies if RTAutoDeps or RTContextSensitive is set to true. The model compiler will then print additional logging about which dependent elements that are automatically included in the build. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Report details about automatically added source elements. |
RTCDRUNVariable |
String | Specifies the location of the cdrun.pl script. By default, the cdrun.pl from the Model RealTime installation is used. |
RTCodanSupport |
Boolean | If set to true, the generated CDT project will be configured to use static code analysis (using CDT Codan). This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Generate additional information for Code Analysis. |
RTComplexTypeDescriptors |
Boolean | If set to true, the model compiler will attempt to generate type descriptors also for complex types. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Generate type descriptors for complex types. |
RTContextSensitive |
Boolean | If set to true, the model compiler will build minimal versions of prerequisite libraries based on the context in which they are used. This means that only those parts of libraries that are needed for the current build will be generated and compiled which can reduce the build time significantly. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Context sensitive library builds. |
RTDependVariable |
String | Specifies the location of the rtcppdep.pl script. By default, the rtcppdep.pl from the Model RealTime installation is used. |
RTDetectTransitionCycles |
Boolean | If set to true, the model compiler will analyze state machine transition graphs when building a TC. Warnings are reported if cycles in the transition graph are found. Such cycles may lead to infinite loops when executing the generated application. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Check transition cycles. |
RTLineSeparator |
String | Specifies which kind of newlines to use in generated files. This variable corresponds to the preference: General – Workspace – New text file line delimiter. |
RTLinkOrder |
String | Specifies the default link order for libraries when building an executable. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Link order. |
RTMakeMode |
String | Controls the kind of make file that is generated. It can be either "recursive" (default) or "inclusive". This variable corresponds to the preference: RealTime Development – Build/Transformations – Type of Generated Make Files. By default, the make files that are generated by the model compiler are recursive, meaning that make is called recursively from the make files in order to build prerequisite libraries. By inclusive make file, we mean a make file that includes other make files. Use of inclusive make files mean that a single invocation of make is enough for building everything. Make tools that support parallel processing of make rules often work more efficiently if inclusive make files are used. |
RTMissingOutgoingTransitions |
Boolean | If set to true, warnings will be reported if pseudo states with missing outgoing transitions are found. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Detect missing outgoing transitions |
RTOptimizeMArrays |
Boolean | If set to true, the code for initialization of multi-dimensional arrays will be optimized to use a single for-loop. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Optimize initialization code for multi-dimensional arrays. |
RTPerlVariable |
String | Specifies the location of the rtperl executable. By default, the rtperl from the Model RealTime installation is used. |
RTPropertySetsDefaultsModel |
String | This variable can be used to specify a model file that contains custom default values for Property Sets properties (those properties that you see on the "C++ General" and "C++ Target RTS" property pages). If specified it overrides any such model file specified in the built model itself. The variable hence corresponds to the preference: Modeling – Profiles – Property Sets – Defaults. |
RTReportWarningsAsErrors |
Boolean | If set to true, all warnings produced by the Model Compiler will be reported as errors. This variable corresponds to the preference: RealTime Development – Build/Transformations – C++ – Report warnings as errors |
RTSetupVariable |
String | Specifies the location of the rtsetup.pl script. By default, the rtsetup.pl from the Model RealTime installation is used. |
RTToolsVariable |
String | Specifies the location of the tools folder. By default, the tools folder from the Model RealTime installation is used. |
RTValidateMissingSources |
Boolean | By default, the model compiler uses the Sources list of the transformation configuration (TC) to determine which model elements to transform to C++. It is therefore important to maintain this list to keep it correct. This validation rule will analyze the top-level capsule, and all elements it depends on (directly and indirectly), and report errors if some referenced elements are missing in the Sources list. |