Changes for page Project Creation, Initialization and Launch (Prom)
Last modified by Richard Kreissig on 2023/09/14 10:56
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -22,14 +22,48 @@ 22 22 23 23 1. compile code from models via KiCo 24 24 1. at the same time, generate wrapper code for these model files 25 -1. afterwards, execute arbitrary shell commands sequentially if the KiCo compilation and wrapper code generation finished successfully 25 +1. afterwards run an associated launch configuration (e.g. for a Java Application) and 26 +1. execute arbitrary shell commands sequentially if the KiCo compilation and wrapper code generation finished successfully 26 26 27 27 KiCo launch configurations work per project basis so that 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. 28 28 29 29 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 that 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. 30 30 31 - [[image:attach:launch_config_tabs.png]]32 + 32 32 34 + 35 + 36 + 37 + 38 +[[image:attach:Screenshot_20160509_133139.png]] 39 + 40 +[[image:attach:Screenshot_20160509_134127.png]] 41 + 42 + 43 + 44 +[[image:attach:Screenshot_20160509_133254.png]] 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 +(% style="text-align: left;" %) 33 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 variable, the syntax is **${**//variable_name//**}**. The variables that are set are 34 34 35 35 * //main_name// : The file name, including its file extension (e.g. //MyModel.sct//) ... ... @@ -44,8 +44,6 @@ 44 44 * //compiled_//main_loc : The absolute file system path (e.g. ///home/me/workspace/MyProject/kieler-gen/MyModel.sct//) 45 45 * //compiled_//main_name_no_ext : The file name without its file extension (e.g. //MyModel//) 46 46 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. 48 - 49 49 [[image:attach:variable_selection_dialog.png]] 50 50 51 51 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. ... ... @@ -78,16 +78,16 @@ 78 78 79 79 An environment consists of 80 80 81 -1. a unique **name**, thatdoesnot contain a comma82 -1. a related project wizard**83 -1. information abouta **main file** for the project84 -1. information aboutthe **targetcode**KiCoshouldproduce85 -1. information for **wrapper code generation**86 -1. a l istof**shellcommands**which should be runas partf a project launch113 +1. a unique **name**, which may not contain a comma 114 +1. an **associated** project wizard 115 +1. information for a default **main file** for the project 116 +1. information for a default **model file** for the project 117 +1. information for a default **wrapper code snippet directory** 118 +1. default values for the KiCo compilation 87 87 88 88 Besides the name, all of these are optional, but can improve the workflow. 89 89 90 -The related project wizard is run as part of the Prom project wizard and takes care of the actual project creation.122 +The associated project wizard is run as part of the Prom project wizard and takes care of the actual project creation. 91 91 92 92 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. 93 93 ... ... @@ -95,7 +95,7 @@ 95 95 96 96 The other fields are default settings for KiCo launch configurations. 97 97 98 -[[image:attach: environments_preferences.png]]130 +[[image:attach:Screenshot_20160509_132406.png]] 99 99 100 100 === Paths for initial content === 101 101 ... ... @@ -133,8 +133,10 @@ 133 133 134 134 In the **template file** one can use special **placeholders**. 135 135 136 -**${ model_name}**willbereplaced with the name of themodel.168 +**${file_name}** is replaced with the name withouth extension of the file that is generated (e.g. //Main.java// will be //Main//). 137 137 170 +**${model_name}** is replaced with the name of the last compiled model. 171 + 138 138 **${declarations}** and** ${decls}** will be replaced with additional declarations of variables and functions (<@decl>...</@decl> of a snippet definition). Declarations should occur before the tick loop of the model file. In general they are not required for Java code but may be useful in C applications (e.g. for //extern// calls). 139 139 140 140 **${initializations}** and **${inits}** will be replaced with initialization code for components (<@init>...</@init> of a snippet definition). Initialization should occur before the tick loop of the model file. ... ... @@ -159,8 +159,11 @@ 159 159 160 160 == Automatically generated files == 161 161 162 -Files created by Prom are saved in the directory **kieler-gen** .Therebythe directory structureoffilesis retained,but without a starting Java sourcefolder. This isbecause//kieler-gen//itselfisaJava sourcefolder.196 +Files created by Prom are either saved in the directory **kieler-gen** or in the **same directory as the input files** they correspond to. This is configured in the KiCo launch configuration. 163 163 164 - Forexample(if//code//is nota Java source folder)the file//code/subfolder/MyModel.sct//,willbesaveto//kieler-gen/code/subfolder/MyModel.sct.//198 +When choosing the kieler-gen folder, the directory structure of input files is retained. However a starting Java source folder will be skipped because //kieler-gen// itself is a Java source folder. 165 165 166 -In contrast (if //src// is a Java source folder) the file //src/subfolder/MyModel.sct//, will be saved to //kieler-gen/subfolder/MyModel.sct.// 200 +For example 201 + 202 +* if //code// is not a Java source folder, the file //code/subfolder/MyModel.sct// will be save to //kieler-gen/code/subfolder/MyModel.sct.// 203 +* if //src// is a Java source folder, the file //src/subfolder/MyModel.sct//, will be saved to //kieler-gen/subfolder/MyModel.sct.//
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -15 5322321 +16810576 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/15 532232/Project Creation, Initialization and Launch (Prom)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/16810576/Project Creation, Initialization and Launch (Prom)