Flowchart Implementation
Flowcharts are another graphical language used in MicroC to define the behavior of a Control Activity. For the purpose of code generation, including this discussion, a single Flowchart is considered to be the Flowchart directly connected to a Control Activity, and all of its sub-charts and the generics instantiated within them.
Consider the Control Activity A12_CTRL. The following two C functions will be generated for it:
The body of these functions look like the following:
The function cgActivity_A12_CTRLcnt1 simply calls cgDo_A12_CTRLcnt1.
Detailed discussions of the
cgDo_…
function construct will be found below.Note: Further Optimization: This example might be optimized by dropping the wrapping function,cgActivity_A12_CTRLcnt1
, unless it serves some additional purpose not considered here.Use the Compilation Profile->Setting->General->Use Macros flag to control the use of function generation vs. pre-processor macro.