Changes for page Arduino and SCCharts
Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -56,10 +56,10 @@ 56 56 {{code language="sct" theme="Eclipse" title="Floodlight.sct"}} 57 57 scchart BlinkyModel { 58 58 59 - @Wrapper Clock, 500 59 + @Wrapper Clock, "500" 60 60 input bool clock; 61 61 62 - @Wrapper DigitalWrite, 13 62 + @Wrapper DigitalWrite, "13" 63 63 output bool light; 64 64 65 65 initial state lightOff ... ... @@ -74,18 +74,18 @@ 74 74 75 75 The annotations on the input and output variable are used to define which wrapper code is used to set / read them. **@Wrapper Clock, "500"** will set the input variable to true for one tick every 500ms. **@Wrapper DigitalWrite, "13"** will set pin 13 to HIGH if the variable is true and to LOW if it is false. We assume that an **LED is connected** to the Arduino board on **pin 13**. 76 76 77 -The available wrapper code snippets are defined in the // assets// directory of the project in ftl files (FreeMarker template files).In the default configuration of a new SCCharts project for Arduino, the file //main.ftl// is processed to create the entry point of the program.Thus it includesother templates containing the availablecode snippets. The tablebelow gives an overview of the available wrapper code snippets.77 +The available wrapper code snippets are defined in the //snippets// directory of the project in ftl files (FreeMarker template files). The table below gives an overview of the available wrapper code snippets. 78 78 79 79 **Note: **To view ftl files with highlighting, you may want to install the //FreeMarker IDE// feature from the JBoss Tools. However, this is not necessary to work with KIELER. JBoss Tools is available in the Eclipse Market Place and via update site. The update site for stable releases isĀ [[http:~~/~~/download.jboss.org/jbosstools/neon/stable/updates/ >>url:http://download.jboss.org/jbosstools/neon/stable/updates/||rel="nofollow" shape="rect" class="external-link"]]. Note that only the //FreeMarker IDE// feature is required (Abridged JBoss Tools > FreeMarker IDE).** 80 80 ** 81 81 82 -=== Buildthe project: ===82 +=== Launch the project: === 83 83 84 - After the modeling is done,theprojectcan be built. Select //Project > Build Project//. This will createa new folder //kieler-gen// with the compiled model file. Furtherthe wrapper codeis processed.After thebuildfinished sucessfully, the inofile forthe projecthas been updated with the new wrappercodethemodel,and thustheproject can be deployed to the Arduino board. The EclipseArduinoPluginprovidesanuploadbutton for this task inthe toolbar.84 +With the mouse over the SCT file in the project explorer, perform //Right Click > Run As > KiCo Compilation.// 85 85 86 - ===Simulating themodel===86 +A launch config is created, which compiles the model to C code and creates wrapper code from the annotations in the model file. Afterwards this output is compiled and deployed to the Arduino board, by using the launch shortcut from the Arduino Plugin. If any errors occur, you can see them in the Console View. 87 87 88 - Asimulationof models is created aspartof a build inside//kieler-gen/sim/bin//.Tousethesesimulations, firstchangeto the SimulationPerspective,whichprovidesnewbuttonsinthetoolbar.The executables in the//bin//foldercanthen be launched via //Right Click> KIELER Simulation//.Theutput ofa runningmulationcan beeen in the Data Pool View.88 +For a deeper understanding of the project launch and initialization, take a look at the [[wiki page for Prom>>url:http://rtsys.informatik.uni-kiel.de/confluence/pages/viewpage.action?pageId=13762626||shape="rect"]]. 89 89 90 90 === Available Wrapper Code Snippets === 91 91
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -3214547 41 +32145472 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/3214547 4/Arduino and SCCharts1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/32145472/Arduino and SCCharts