From the configuration diagram, you can select a default configuration, and then add
the element for which some code must be generated. Then you can validate and run the
configuration.
Tip:
You can use the
Flashlight sample model to try out the code generation functionality.
In the following procedure, the button element is generated.
Environment: This operation runs locally
From the Code Generation section in the diagram palette, drop a
default configuration to the diagram viewer.
The Code Generation section displays a selection of default
configurations:
Note:
The configuration is surrounded with a red frame, indicating that the source
element for the code generation is missing.
From the Containment tree, drop the source element to the title
or to the block of the configuration.
If required, double-click the configuration to modify its specifications. See Defining Specification Properties. Example for a C code
generation:
Generic Configuration Parameters
Description
Elements
You can drop the source element from the Containment tree
or edit this field.
Local Path
A path to your workspace for storing the result files.
Validate
By default, set to true.
Store Execution Summary in Model
By default, set to false.
Set to true if you want an execution object to be
created in your project (under the configuration element), so that you can view the
execution summary of your configuration in the Code Generation
Result table.
Execute On Cloud
By default, set to false.
Set to true to run the operation on the
cloud
SCM Configuration
-
Specific Configuration Parameters
Examples
C Code Generation
Standard: Post operation script, Default_pools_size, Central pool size, Code
deployment, Compiler, C version, Derive instance graph,
Expert: Memory optimization
C++ Code Generation
Standard: Post operation script, Default_pools_size, Central pool size, Code
deployment, Compiler, Derive instance graph,
Expert: MISRA Ignore, MISRA Violation comment
What's Next
You can then validate the configuration and execute the
operation.