Skip to content

BrickBot/scLego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scLego : Esterel back-end for Lego C

Esterel is a programming language dedicated to control-dominated reactive systems, such as control circuits, embedded systems, human-machine interface, or communication protocols.

It belongs to the family of synchronous languages, which also includes Lustre, Signal, and SyncCharts. Esterel has been developed since 1983 at CMA (Applied Mathematics Center, Ecole des Mines de Paris), and INRIA in Sophia-Antipolis.

The language is presented in the Esterel Primer (PDF).

References

Prerequisites

Integration with BrickOS-Bibo

Esterel examples are already bundled with BrickOS-Bibo, so by installing the Esterel compiler and this add-on for the Esterel compiler, you will be ready to create Esterel programs for BrickOS-Bibo.

Installation

To install scLego, type:

make ESTEREL_DISTRIB=<esterel repository>

You may also set the PERL macro to the name of the Perl command on your system if it is different from the default "perl".

Installation will copy Lego subdirectory into Esterel lib directory, and it will creates scLego, ocLego, and sscLego scripts into the Esterel bin directory.

Usage

A man page, scLego.1 is also avalaible in Esterel man/man1 dir. Please have a look at it, since it describes the recognized API from Esterel to Lego.

Then, you can call :

esterel -LLego controller.strl

or

esterel -ILego controller.strl

or

esterel -ALego controller.strl

Option -simul is also supported if you want to simulate the controller using xes or csimul. You do not have to insert code for predefined objects such as constants, or functions that belong to Esterel/Lego API; they will be automatically defined in the resulting .c.