TASTE Step by step tutorial
This tutorial explains how to quickly build a system using TASTE.
Make sure you have either installed the TASTE Virtual machine : https://download.tuxfamily.org/taste/TASTE-VM-10-64bit.ova
...or that you made a manual installation following the instructions here: Manual installation on a native platform
If you use the VM, note that the username and password to login are taste / tastevm
Always make sure you are using the latest version of the TASTE tools. From within the TASTE Virtual machine or your native installation, open a terminal and run the following commands:
$ cd tool-src $ ./Update-TASTE.sh
When it is done, close the current window and open a new terminal.
This tutorial explains how to create a basic system to get familiar with the tool.
Create a new project
Run the following command:
You will be prompted for a project name and a new folder with this name will be created. Always use the taste command to re-open an existing project.
The Space Creator editor will show up:
Build the system logical architecture
In the main window, draw a rectangle while pressing the mouse right button. When you release the mouse button, a contextual menu offers to create a function or a function type:
Choose "Function", and rename the box:
Create a second function next to it.
Then keep the Ctrl key and the left mouse button clicked to draw a line between the two functions:
When you release the mouse button, a connection will appear and a dialog will let you name this connection:
You can select the "kind" of connection this is. It can be an asynchronous message (sporadic) or a simple, immediate function call (e.g. unprotected).
Add a connection in the other direction by using Ctrl+Left Click from the function on the right and releasing the keys when hovering on the left function. If you name it "Hi", it will look like this:
Last, we will add a cyclic interface to the "caller" function. To do this, right click on the Caller function and choose the "Provided Interface" option from the menu entry:
In the dialog, name it ("trigger", choose "Periodic" for the kind attribute, and leave the period to 1000 ms:
Create data types
TASTE software works with data, and relies on well defined data structures. They are captured with the ASN.1 language.
On the Workspace area of the editor you will see a file with the ".asn" extension. The file name itself is the name of your project. Double click on this file to open the editor. The default file contains a lot of built-in documentation to help you with the syntax of the language.
For this example we will create a type to store a simple counter with a range of values from 0 to 3:
After this is done, go back to the main diagram by selecting the file named "interfaceview.xml". Note that you may also split the window in the IDE to view both files at the same time.
Select the implementation language of each function
To create an implementation of the system, we have to select a language for each function (caller and callee). We will use C for the callee and SDL for the caller. To do this, double click on each function, and select the tab named "Implementations". Change the language accordingly (the default being SDL, there is no need to touch the caller function):
Implement the functions
We start with the "callee" function. Right click on the function and select "Edit Implementation" from the contextual menu. After being prompted to save the model (do it), wait a few seconds to enter the C editor in the IDE:
Edit the code at will. The IDE provides auto-completion and on-the-fly syntax and semantic checks:
When you are done, go back to the main diagram editor (double click on "interfaceview.xml" in the workspace on the left).
Right-click on Caller and choose "Edit Implementation". This will open the SDL editor (OpenGEODE).
If you are not familiar with SDL, a complete documentation is built-in the tool (on the right). Double click on the Caller block to enter the state machine editor.
You can create the state machine using the set of symbols on the left of the editor. In this example, when the periodic trigger is received, the "Hello" message will be sent (to the callee function), and then the "Hi" message will be expected in return. After a few cycles, we enter a state named "Enough" and stop repeating this polite exchange.
You may want to visualize this simple state machine with a "statechart" representation. Click on the corresponding tab on top of the editor:
You may now save the model and quit OpenGEODE, to get back to the main interface view.
Quick build and run
At this stage you can already build the system. Click on the "Play" button on the bottom left corner of the tool:
After a few seconds of build, you will see the system run in a console:
When you do Ctrl-C to stop the application you can visualize a log of the execution in a file that was generated and that appeared in the workspace:
Create a deployment to run on target
This quick build produced a Linux binary. But you may want to build on a different platform, for example a Leon processor with the RTEMS6 Qualified RTOS.
To do this you need to model the deployment of your system. On the workspace, right-click on "Other files" and choose "Add new"
In the dialog select "Deployment View file":
Then on the next screen you may rename it, but keep the ".dv.xml" file extension:
This will open a new editor, from which you can drag and drop deployment boards. Select for example this one:
When you right click on the board, you can bind the functions (caller and callee) to it.
Save the project, and click again on the "Run" button. This time the binary will be created using the RTEMS Cross compiler for the GR740 board that you selected, and it will execute using a SPARC/Leon built-in emulator. The output should be the same as before:
... except for the timings, as the Leon emulator does not reproduce the waiting periods correctly (the 1 second beween each trigger isn't right). If you download this binary on a real board however it should work as expected.
This tutorial showed the basic features of TASTE.
You may check out this video for a bit more complete example: https://youtu.be/z35WV1kBzxc
This one for more technical explanations related to the support of the Brave Large platform : https://youtu.be/7lhrDir7VYM