30.07.2013 Views

The Esterel v5 21 System Manual - Courses

The Esterel v5 21 System Manual - Courses

The Esterel v5 21 System Manual - Courses

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.2. HANDLING A SIMPLE EXAMPLE 5<br />

– the <strong>Esterel</strong> GUI (graphical user interface) xesterel,<br />

– the <strong>Esterel</strong> installation directory,<br />

– the manual,<br />

– the manual pages in HTML format,<br />

– the <strong>Esterel</strong> Primer,<br />

– and the uninstallation program.<br />

2. it adds the ESTEREL variable to the user environment and modifies the<br />

path.<br />

Note: the compiling of the C code generated by <strong>Esterel</strong> must be compatible<br />

with Visual Studio to run simulations. <strong>The</strong> xes simulator uses CL.EXE and<br />

LINK.EXE from the Microsoft DevStudio development environment. <strong>The</strong>se<br />

tools use the INCLUDE and LIB environment variables, which have to be set<br />

correctly to make the tools work outside of DevStudio. Please consider the<br />

file Vc\bin\Vcvars32.bat in the Visual C++ distribution.<br />

1.2 Handling a Simple Example<br />

To try <strong>Esterel</strong> compiling, enter the following program in file foo.strl using<br />

your favorite editor:<br />

module Foo :<br />

input I, J;<br />

output O;<br />

await I;<br />

await J;<br />

emit O<br />

end module<br />

To compile the Foo program into an executable C code, just type<br />

esterel foo.strl<br />

This command generates an executable C file foo.c ready to be embedded<br />

in a complete application using the interface conventions described in<br />

Chapter 3. However, this is not the simplest thing to do. Beforehand, it is<br />

recommended to simulate the program and check its correct behavior using<br />

the xes simulator and symbolic debugger. For this, recompile the program<br />

with the -simul option:<br />

esterel -simul foo.strl

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!