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
-
... ... @@ -24,7 +24,7 @@ 24 24 1. at the same time, generate wrapper code for these model files 25 25 1. afterwards, execute arbitrary shell commands sequentially, if the KiCo compilation and wrapper code generation finished successfully 26 26 27 -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)27 +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. 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 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. 30 30 ... ... @@ -42,8 +42,10 @@ 42 42 * //compiled_//main_loc : The absolute file system path (e.g. ///home/me/workspace/MyProject/kieler-gen/MyModel.sct//) 43 43 * //compiled_//main_name_no_ext : The file name without its file extension (e.g. //MyModel//) 44 44 45 -//**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)45 +//**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. 46 46 47 +[[image:attach:variable_selection_dialog.png]] 48 + 47 47 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. 48 48 49 49 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. ... ... @@ -50,16 +50,24 @@ 50 50 51 51 On the //Execute// tab, a list of **shell commands** can be added. They are typically used to further compile the KiCo and wrapper code output and afterwards deploy the result to the target platform. The commands 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. 52 52 53 - Thestandard streams of executed shell commands (stdin, stderr, stdout), as well as errors from the KiCocompilationand wrapper codegeneration,are printed to the **Console View**.(Screenshot)55 +[[image:attach:launch_config_tabs.png]] 54 54 57 +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**. 58 + 59 +[[image:attach:console_view.png]] 60 + 55 55 === Launch Groups === 56 56 57 57 The list of shell commands are a simple mechanism to further compile and deploy code via command line tools. However, there are cases in which command line tools are not available or reasonable to use, for example because a different Eclipse launch configuration does a better job. 58 58 59 -In this case it is desirable that the KiCo launch config only compiles the model and another Eclipse launch config does the rest. This can be achieved via //launch groups//. They let you define a launch configuration, which starts other launch configurations sequentially. To illustrate this, another use-case for launch groups is that you have a Client-Server application and wants to start the client right after the server for debugging. Then you can create a launch config for the server and a launch config for the client. Afterwards you create a launch group with aforesaid configurations. (Screenshot)65 +In this case it is desirable that the KiCo launch config only compiles the model and another Eclipse launch config does the rest. This can be achieved via //launch groups//. They let you define a launch configuration, which starts other launch configurations sequentially. To illustrate this, another use-case for launch groups is that you have a Client-Server application and wants to start the client right after the server for debugging. Then you can create a launch config for the server and a launch config for the client. Afterwards you create a launch group with aforesaid configurations. 60 60 67 +[[image:attach:launch_group.png]] 68 + 61 61 Launch groups are a part of the C/C++ Development Tools (CDT), although they provide a general mechanism that could be a part of any Eclipse IDE. The CDT is available in the Eclipse Marketplace (//Help > Eclipse Marketplace//) 62 62 71 +---- 72 + 63 63 == Prom Environments == 64 64 65 65 Environments are used to provide default settings for project creation and launch. They are configured in the **preferences** (Window > Preferences > KIELER > Environments). ... ... @@ -83,6 +83,8 @@ 83 83 84 84 The other fields are default settings for KiCo launch configurations. 85 85 96 +[[image:attach:environments_preferences.png]] 97 + 86 86 === Paths for initial content === 87 87 88 88 The paths for main file origin accept an **absolute** file **path** as well as an **URL** with the platform protocol of Eclipse. An URL for the field has the form //plaftorm:/plugin/a.plugin.name/folder/in/the/plugin/file.txt// ... ... @@ -89,6 +89,8 @@ 89 89 90 90 The snippets origin works analog. It accepts an absolute directory path as well as an URL with the platform protocol which points to a directory. An URL for the field has the form //plaftorm:/plugin/a.plugin.name/folder/in/the/plugin// 91 91 104 +---- 105 + 92 92 == Project Wizards with Prom == 93 93 94 94 Prom provides project wizards, which can **create and initialize a project** with a **model file**, a **main file** and wrapper code **snippets**. The wizards for different model file types (e.g. SCChart project vs Esterel project) differ only in the initial content for these. Other initial content is choosen from the environment, which is selected on the first page of a Prom wizard. The project creation itself is done by another wizard, that is started from within the Prom wizard. ... ... @@ -95,8 +95,12 @@ 95 95 96 96 If the //snippets directory// of an environment is a project relative path, the contents from the //snippets origin// will be copied to this location. If it is an absolute path, it is not copied to the project. Keeping snippets in a single, project indepentent folder, makes it easier to maintain them. For example it is possible to set an absolute path to a directory outside any project as directory for wrapper code snippets. This directory can then be easily maintained using a version control system. Furthermore, if an issue occurs, it has to be addressed only once, because the snippets are not copied to every new project. 97 97 98 -For example to create a project to develop Minstorms running leJOS, one can choose the SCCharts project wizard. In this wizard, one can choose the Mindstorms NXJ environment and define what will be initialized in the project (model file, main file, snippets). Now when pressing the finish button, the related project wizard from the leJOS plugin will be started. When it finishes, the newly created project is initialized with an initial model file, main file and wrapper code snippets. (Screenshot)112 +For example to create a project to develop Minstorms running leJOS, one can choose the SCCharts project wizard. In this wizard, one can choose the Mindstorms NXJ environment and define what will be initialized in the project (model file, main file, snippets). Now when pressing the finish button, the related project wizard from the leJOS plugin will be started. When it finishes, the newly created project is initialized with an initial model file, main file and wrapper code snippets. 99 99 114 +[[image:attach:project_wizard.png]] 115 + 116 +---- 117 + 100 100 == Wrapper Code Generation == 101 101 102 102 When modeling a program for an embedded system, it is necessary to set inputs and outputs of physical components (sensors/actuators) to inputs and outputs of the model. This is typically done using wrapper code. However, **wrapper code is often similar** for a specific device and programming language. ... ... @@ -103,7 +103,7 @@ 103 103 104 104 Therefore one can write **wrapper code snippets** for a target device. These can then be injected to a **template file** as part of a KiCo launch. What snippets are injected is defined using **annotations on inputs and outputs** directly in the model file. 105 105 106 - (Imageshowing the three components (annotated model file, wrappercode snippets,wrappertemplate) and theesultf wrappercodeinjection)124 +[[image:attach:wrapper_code_generation_scheme.png]] 107 107 108 108 In the **template file** one can use special **placeholders**. 109 109 ... ... @@ -113,7 +113,7 @@ 113 113 114 114 **${outputs}** will be replaced with code to read outputs of the model. (<@output>...</@output> of a snippet definition). Reading outputs of the model should occur in the tick loop, after the tick function call. 115 115 116 - (Imageshowingthe structureof a templatewith the placeholders andthetick loop)134 +[[image:attach:template_file_structure.png]] 117 117 118 118 === FreeMarker === 119 119 ... ... @@ -123,6 +123,8 @@ 123 123 124 124 There is an [[Eclipse plugin>>url:http://freemarker.org/editors.html||shape="rect"]] for FreeMarker as part of the JBoss Tools Project. It can be installed using the Eclipse Marketplace. 125 125 144 +---- 145 + 126 126 == Automatically generated files == 127 127 128 128 Files created by Prom are saved in the directory **kieler-gen**. Thereby the directory structure of files is retained, but without a starting Java source folder. This is because //kieler-gen// itself is a Java source folder.
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -137627 071 +13762717 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/137627 07/Project Creation, Initialization and Launch (Prom)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/13762717/Project Creation, Initialization and Launch (Prom)