ThingML compiler to Posix C

This compiler allow generating standard Posix C from ThingML. The generated code can be compiled with GCC on Linux and easily integrated in C or C++ projects. The generated code is tested under Ubuntu Linux but should work with any Posix operating system. Experiments indicate it also works on the ARM-based Raspberry Pi.

The Posix C code generated from ThingML has a lot in common with the C generated for microcontrollers (such as Arduino). The main differences are the use of Posix threads and synchronization to implement parallelism and the use of dynamic memory allocation for message fifos (not yet implemented). Overall the code generated from ThingML remains of low code and memory footprint which allows targeting low resource platforms such as the Raspberry Pi (700MHz, 256MB RAM).

Basic usage

  • Generate the C/POSIX code from the ThingML editor
  • cd <path-to-the-generated-code-in-your-temp-folder>
  • make
  • ./<name-of-your-configuration>