Generator Configuration Tab (DATAFLOW Code)

by Marco Wuelser

 

This Guide Article has been written for Version 2.1 of the DATAFLOW Software. For Previous Releases use the version selection in the navigation bar at the top of this page.

 

This Tab is part of Build Configuration Page in the Project Settings dialog.

 

Tab Description

The Generator Configuration Page in the Build Configuration is used to configure the code generator for this Build Configuration. This includes fine configuration of the path certain artifacts will be generated to. In addition, the file headers for all generated files can be customized.

 

See the C++ Code Generation article for an overview on code generation.

 

Tab Actions

This tab does not provide any special actions.

 

Tab Groups

The page shows the following groups in Advanced mode:

  • Source Paths
  • Source Code
  • Generator (A)

For each group, if an option is only shown in advanced mode, it will be marked with (A).

 

Source Paths Group

Root Path

This field defines the root path for all generated source code of this build configuration.

This path must not overlap with any other build configuration in this project or solution to avoid source code to be overwritten or deleted by the code generator.

Clear Output Directory
All files in the root path will be deleted prior to code generation.
Components (A)

This field defines the sub folder for all component source code. This includes active parts, active interrupts and active containers.

The generated files will be placed in sub folders based on the namespace of the component.

Data Types (A)

This field defines the sub folder for all data type source code. This includes protocol identifiers, protocols, structs, enumerations and custom types.

The generated files will be placed in sub folders based on the namespace of the data type (type groups).

Startup Code (A)
This field defines the sub folder for all startup source code. This includes the startup controller and handler.
Callbacks (A)
This field defines the sub folder for all callback source code. This includes the generated idle callback, event capacity callback and custom assert handlers.
Data Pools (A)
This field defines the sub folder for all static data pools source code.
Statistics (A)
This field defines the sub folder for all statistics source code. This includes the free running timer and calibration.

Sub folders can be set to an empty values of the generated code shall be placed in the root folder. Additional folders may be created based on the namespace even if all sub folders are empty.

 

Source Code Group

Generate Components
When this field is checked, the code generator will generated source code for components. This include active parts, active interrupts and active containers.
Generate Data Types
When this field is checked, the code generator will generate source code for all data types defined in the same project. This includes identifiers, protocols, structs, enumerations and custom types.
Generate Referenced Data Types
When this field is checked, the code generator will generate source code for all data type defined in referenced projects.
Generate Startup Code
When this field is checked, the code generator will generated startup code for the application. This includes the startup controller, callbacks, buffers and statistics code.
Overwrite AP Handlers (A)

When this field is checked, the code generator will overwrite all existing handler and callback files. This will overwrite user code.

When the field is not checked, any existing user code file will be preserved.

Protect Generated Files (A)
When this file is checked, all generated files that are not meant to be changed by the developer will have the read only flag set in the local file system.
Header File Template (A)
This field allows to define the file header for all generated header files. To edit, click the [...] button on the right of the field. This shows a dialog to edit the header. All available placeholders are shown. These will be replaced by the code generator.
Source File Template (A)
This field allows to define the file header for all generated source files. To edit, click the [...] button on the right of the field. This shows a dialog to edit the header. All available placeholders are shown. These will be replaced by the code generator.

 

File Header Templates

The file headers can be configured for the following types of files independent of each other:

  • Header files
  • Source Files

The header templates support placeholders that will be expanded on code generation:

File Header Placeholders

The placeholders that can be used in the file header are shown in the table below:

Placeholder Replaced with Example Remark
INPUT_FILE Intermediate filename (*.dff)
dataflow_mySystem_StartupController.dff
Will be the same for all files of an artifact, e.g. AP.h, AP.cpp, Handler.h, Handler.cpp and Test.cpp
BUILDER_TIMESTAMP Date/Time of code generation in ISO format
2021-10-04 10:53:38
Will be the same for all files generated together.
BUILDER_VERSION Code generator version
2.1.5.0
This may differ from the DATAFLOW Studio/Designer version.
BUILDER_USER User account that performed the code generation
wuelser@imt.ch
 
GENERATOR_LANGUAGE Selected language including variants
CPP14
 
GENERATOR_PLATFORM Target platform
STM32_F103_MD
 
GENERATOR_RUNTIME Runtime type / architecture
ARM_CORTEX_M3
 
GENERATOR_RUNTIME_VERSION Runtime version the code was generated for.
2.7.1.0
 

 

Generator Group (A)

Executable (A)

This field defines the path to the binary of the code generator to be used for this build configuration.

Only change this field when instructed to do so by IMT.

Custom Arguments (A)

This field allows to send command line arguments to the code generator. Add one argument per line.

Only change this field when instructed to do so by IMT.

Intermediate Path (A)

This file contains the path the intermediate files for code generation will be written to.

These files will be overwritten whenever code is generated and are not required to be saved with the project. Therefore a temporary folder can be used.

Model Files (A)
The sub folder for all generated model files for the code generator.
Config Files (A)
The sub folder for all generated config files for the code generator.
Meta Files (A)

The sub folder for all generated meta files by the code generator.

These files are used by the Project Generator to locate all generated files.

Intermediate File Template (A)
This field allows to define the file header for all generated model files. To edit, click the [...] button on the right of the field. This shows a dialog to edit the header. All available placeholders are shown. These will be replaced by the code generator.

 

Required Module: DATAFLOW Code

This Article has been written based on V2.1.1 of the DATAFLOW software. 
Latest update 2023-05-31 by WUM.

Go back