One of the most important capabilities of Model RealTime is the ability to transform a UML model into an executable real-time application. This process, which we refer to as "building the model", typically consists of the following steps:
A subset of the model is transformed to C++ code.
An Eclipse CDT project and a makefile is generated.
A make tool is launched to build the generated code using the makefile.
Messages (such as compilation errors) that are produced during the build are captured and printed.
There are two ways of building a model; interactive build from within the Model RealTime user interface, and batch build from command line or scripts. In both cases the build is done in the same way, by performing the steps mentioned above. The differences between interactive and batch builds are more related to how the build is triggered, and what happens after the build is done. For example, in an interactive build most build messages are printed to the UML Development Console while in a batch build they are typically printed to the command line console or written to a log file.
The utility in Model RealTime which builds a model is called the model compiler. This is a stand-alone command line tool which runs as a separate application outside of the Model RealTime IDE. It can therefore be used for true batch builds that run without any dependency on the Model RealTime IDE. It can also be used for interactive builds from within the IDE. In that case Model RealTime will launch the model compiler for generating the code and a make file, and then generated code is built by make.
If your system supports parallel execution of make rules it’s also possible to generate a single make file from Model RealTime that also contains rules that invoke the model compiler for the code generation. This means that the entire build can be driven by a single make file. Even if this could boost build performance by parallelizing the generation of C++ files, it also means that the model compiler will be invoked multiple times, which involves some overhead. You have to measure the performance on your system to decide if this approach is worthwhile or not. Also note that this feature is currently only available in batch builds.
To learn in detail about building C++ applications, you can explore the following topics:
Applying Transformation Configurations
Strategies for Integrating External CPP Libraries