Page History
...
When writing the configuration, use code completion to see available attributes for the entities. The following table describes the available attributes.
Attribute | Domain | Default Value | Description |
---|---|---|---|
KiCo Model Compiler | |||
outputFolder | String | kieler-gen | The folder in which compilation output is saved |
whitelist | String, Regular expression | - | Only model files that have a location matching this regular expression are compiled. Thus to compile only a specific model, one can use the expression "ModelName.sctx" |
blacklist | String, Regular expression | - | Model files that have a location matching this regular expression are exluded from the build. Thus to exclued all models and skip compilation, one can use ".*", which matches everything. |
compilationSystem | String, Id of a pre-defined compilation system or project relative file path to a system definition | de.cau.cs.kieler.sccharts.netlist.simple | The compilation system that is used by KiCo to determine the compile chain. |
outputFileExtension | String | c | Compiled models are saved with using this file extension. Thus this attribute should match the code format that is generated by KiCo at the end of the compilation. |
outputTemplate | String, Project relative file path | - | An optional template to add surrounding code to KiCo generated output for every compiled file. In the template the placeholder ${kico_code} can be used an will be replaced with the compiled code. |
Simulation Compiler | |||
command | String | For C: "gcc -std=c99 -Werror=int-conversion -o \"./${outputFolder}/${executable_name}\"" For Java: "jar cvfe \"../${outputFolder}/${executable_name}\"" | The command that is called to compile simulation code to an executable. In case of the C simulation, the compiled file is added implicitly as additional parameter, to create an executable. In case of Java, all class files and the class file of the compiled model are added implicitly to create an executable JAR file. |
outputFolder | String, Project relative folder path | kieler-gen/sim/bin | The folder in which compiled output will be saved. Note that it is possible to use a command that creates the compiled files in a different location. However the folder specified in this attribute is created before the command is executed and refreshed afterwards. This ensures that the folder exists and changes will be noticed in the Eclipse workspace. |
libFolder | String, Project relative folder path | kieler-gen/sim/lib | The folder where additional files are saved before the command is run. These files can be linked into the simulation code, e.g., for JSON handling. |
timeout | int | 10 | Time in seconds that is waited for the executed command to finish. If the command runs longer, it is assumed to be failed and aborted. |
Template Processor | |||
file | String, Project relative file path | - | The template file that should be processed |
target | String, Project relative file path | - | The file in which the output should be saved |
Wrapper Code Template Processor | |||
modelFile | String, Project relative file path | - | The model file that is searched for annotations to determine the code snippets to be injected. |
Simulation Code Template Processor | |||
modelFile | String, Project relative file path | - | The model file that is searched for annotations to determine the code snippets to be injected |
compiledModelFile | String, Absolute file system path | - | The absolute path of the compiled model file for which the simulation is created. This is used to replace the placeholder ${compiled_model_loc} in the simulation code template |
variables | Map, e.g., | - | Optional additional variables that should be communicated to the outside |
interfaceTypes | String, List of Strings | - | The interface types that should be communicated in the simulation, e.g., input, output, internal |
Example for KiBuild files:
...
Example for wrapper code generation from annotations:
...
Problem Solving
CDT Projects
When working with the CDT, the folder that contains the simulation code has to be excluded from the CDT build, because this code is compiled using the compiler specified in the kibuild file, and every simulation file has an additional main function, which is not the use-case that a CDT project is made for. These files are self contained and do not interact with other files in the CDT project, thus they should not be built.
...