This chapter demonstrates how to integrate generated C code from YAKINDU Statechart Tools on your device and ends up by referring to according examples for each scenario. State machine code generated by YAKINDU Statechart Tools can effectively be used on embedded systems. The integration contains different parts, but can mostly be described in a generic way, as most steps of the integration are platform independent.
The differences of the integration mostly stem from the selected execution semantics – cycle based or event driven – as well as the used functionalities, such as in, out and timed events. Other best practice implementation patterns can be based on whether a bare metal microcontroller or an operating system is used. So, there are different factors which may have an impact on the integration:
In the statechart:
In the environment:
This guide will give an overview of the most common and well known design patterns in a generic way and initially provides examples for an Arduino and only starts with the bare-metal integration. It will be continuously expanded.