-
Notifications
You must be signed in to change notification settings - Fork 0
mbeddr Getting Started
From mbeddr.com:
mbeddr is a set of integrated and extensible languages for embedded software engineering, plus an IDE. It supports implementation, testing, verification and process aspects. It integrates with command-line build tools and integration servers, as well as file-based version control systems.
mbeddr's features:
- Cleaned Up C99
- Reporting and Logging
- Testing
- Physical Units
- State Machines
- Interfaces and Components
- Requirements, Tracing and Docs
- Product Line Variability
- Formal Verification
- Execution and Debugging
- IDE Support
- Decision Tables
- Version Control
mbeddr download page: http://mbeddr.com/download.html
http://mbeddr.com/download.html#RequiredToolsAndVersions
I used these old versions because of compatibility issues.
JetBrains MPS
Version 3.2.3: https://confluence.jetbrains.com/display/MPS/JetBrains+MPS+3.2+Download+Page
mbeddr
Version 1.0 RC1: https://github.com/mbeddr/mbeddr.core/releases/tag/1.0-RC1
Operating system
Ubuntu 15.10: http://releases.ubuntu.com/15.10/
Create a New Project by File → New Project... then select Solution Project and add a name to your project and your solution name too.
Add a new model to the solution by right clicking on the solution name and choose New → Model.
Add a name to your model:
After that on the Used Languages tab add the com.mbeddr.core devkit.
Finally generate a simple Hello World by Code → Wizards → Create Hello World.
In this example I use a simplified darts game and the previous project.
Simplified dartboard for the sample project
To run the application right click on main and choose Run. See the image below.
The result:
To add a decision table to an Implementation Module simply type dectab
in a function. It gives you an empty decision table with two columns and two rows.
Decision table's return value depends on which column and row expression is true. If none of them is, then it returns with the value defined on the otherwise branch.
Right click on a module name you are working with, then click New → com.mbeddr.core.modules → external.
In this newly created External Module add the referenced artifact to resources
. In case of Mosquitto, insert header: <mosquitto.h>
.
Finally, add the created external module to imports.
Add the -lmosquitto
option to your compiler options under the BuildConfiguration of the solution. Other linked libraries should be added here as well in a similar manner.
mbeddr does not generate the compiler command in the right order, so you need to compile your project by hand in a terminal.