Hide last authors
aas2 1.1 1 = Prom - Project Management in KIELER =
2
3 **Topics**
4
5
6
7 {{toc minLevel="2"/}}
8
9 ----
10
11 == Overview ==
12
13 The KIELER Compiler (KiCo) can generate different code targets from models. For example it is possible to generate C and Java code from an SCT file. As a result KIELER has to integrate with existing development tools and practices for the C and Java world. In the context of embedded systems, the target device also varies heavily.
14
aas2 12.1 15 Therefore the KIELER Project Management (Prom) has been developed. It eases the creation, compilation and deployment of projects, when using models that can be compiled via KiCo (e.g. SCCharts, Esterel). Furthermore it eases the creation of wrapper code, which is used to initialize and run the model. To do so, there are mainly three components: An Eclipse //Launch Configuration//, so called //Environments//, and //Project Wizards,// which will be introduces in the following.
aas2 1.1 16
17 ----
18
aas2 8.1 19 == The KiCo Launch Configuration ==
20
aas2 11.1 21 Prom provides a launch configuration (launch config) to
aas2 8.1 22
aas2 11.1 23 1. compile code from models via KiCo
24 1. at the same time, generate wrapper code for these model files
aas2 14.1 25 1. afterwards, execute arbitrary shell commands sequentially, if the KiCo compilation and wrapper code generation finished successfully
aas2 11.1 26
27 The shell commands are typically used to further compile the KiCo and wrapper code output and afterwards deploy the result to the target platform.
28
29 KiCo launch configurations work per project basis, thus every project has to create its own launch config. This is done automatically when performing //Right Click > Run As > KiCo Compilation //(% style="color: rgb(0,51,102);" %)on a model file.(%%) (Screenshot)
30
aas2 14.1 31 The **Run As** command will search for a KiCo launch config for the project. If there is such a config, the selected file is only added to the list of model files which should be compiled. If there is none, a launch config is created by using the main file and environment the project has been created with. If the main file and environment information could not be found, dialogs will query it from the user.
aas2 12.1 32
aas2 15.1 33 The **main file** of the launch config is used to set several file path variables, which can be used in several fields of the configuration, notably the shell commands to be executed, and wrapper code input. To use a variablethe syntax is **${**//variable_name//**}**. The variables that are set are
aas2 14.1 34
35 * //main_name// : The file name, including its file extension (e.g. //MyModel.sct//)
36 * //main_path// : The project relative path (e.g. //src/MyModel.sct//)
37 * //main_loc// : The absolute file system path (e.g. ///home/me/workspace/MyProject/src/MyModel.sct//)
38 * //main_name_no_ext// : The file name without its file extension (e.g. //MyModel//)
39
40 Further, similar variables for the compiled main path are set, that is, the main file in the directory of kieler generated files (see below)
41
42 * //compiled_main_name// : The file name, including its file extension (e.g. //MyModel.sct//)
43 * //compiled_//main_path : The project relative path (e.g. //kieler-gen/MyModel.sct//)
44 * //compiled_//main_loc : The absolute file system path (e.g. ///home/me/workspace/MyProject/kieler-gen/MyModel.sct//)
45 * //compiled_//main_name_no_ext : The file name without its file extension (e.g. //MyModel//)
46
aas2 15.1 47 //**Note:**// The variables are created in the first KiCo launch. So if you want to select them in a variable selection dialog of Eclipse, you must have started at least one KiCo launch configuration. (Screenshot of selection dialog)
aas2 14.1 48
aas2 15.1 49 The values of the launch config can also be **(re)set to an environment**. This will revert the fields for the compilation target, wrapper code generation and command execution.
50
51 The **compilation via KiCo** is configured on the //Compilation// tab. Here you can add/remove files that should be compiled via KiCo and the target language as well as the file extension for the language (such as //.java// for Java). The files will be compiled sequentially in order of appearance in the list. Further, it is possible to add a file path to a template for the output. This is useful to add surrounding content to the KiCo output. The placeholder //${kico_code}// can be used in the template.
52
53 On the //Execute// tab, a list of **shell commands** can be added. They are executed sequentially in order as they appear in the list, after the KiCo compilation and wrapper code generation finished successfully. If a command fails (returns a non-zero exit code), following commands will not be excuted. The name of commands have to be unique and must not contain a comma.
54
55 The standard streams of executed shell commands (stdin, stderr, stdout), as well as errors from the KiCo compilation and wrapper code generation, are printed to the **Console View**. (Screenshot)
56
aas2 11.1 57 === Launch Groups ===
58
aas2 15.1 59
60
aas2 1.1 61 == Prom Environments ==
62
aas2 13.1 63 Environments are used to provide default settings for project creation and launch. They are configured in the **preferences** (Window > Preferences > KIELER > Environments).
aas2 1.1 64
aas2 5.1 65 An Environment consists of
66
aas2 6.1 67 1. a unique **name**, that does not contain a comma
68 1. a **related project wizard**
aas2 7.1 69 1. information about a **main file** for the project
70 1. information about the **target code** KiCo should produce from models
aas2 6.1 71 1. information for **wrapper code generation**
72 1. a list of **shell commands** which should be run as part of a project launch
aas2 5.1 73
aas2 6.1 74 Besides the name, all of these are optional, but can improve the workflow.
aas2 5.1 75
76 The related project wizard is run as part of the Prom project wizard and takes care of the actual project creation.
77
aas2 6.1 78 A main file typically contains the entry point of the program on the target environment. Its wrapper code initializes and runs the model and sets inputs and outputs to the physical components of the target device. To ease the project setup and because wrapper code for a specific target platform is often similar, it is possible to define default content for the main file. Therefore the field **main file origin** can contain an absolute file path to a file with the default contents of a newly created main file for this Environment. Furthermore predefined wrapper code snippets can be injected as part of a project launch, which is described below.
79
aas2 16.1 80 The **wrapper code origin** is used to initialize the wrapper code snippet directory of a newly created project.
aas2 6.1 81
aas2 16.1 82 Other fields are default settings for KiCo launch configurations.
aas2 1.1 83
aas2 8.1 84 === Paths for initial content ===
aas2 1.1 85
aas2 8.1 86 == Project Wizards with Prom ==
87
aas2 1.1 88 Todo
aas2 3.1 89
90 == Wrapper Code Generation ==
aas2 4.1 91
92 Todo
aas2 7.1 93
94 == Automatically generated files ==
aas2 10.1 95
96 Todo