Simulink & Stateflow are used to design the embedded control system algorithms.
Using Mathworks products Simulink
coder (formerly Real time Workshop) and Embedded coder we can generate produnction quality code which can be integrated into an existing software framework that consists of an operating system or schedular, device drivers and support utilities.
This document supported by some dummy codes briefs about how to integrate the model generated code with low level code and schedular.
TAB (2020). A short introduction on using model based design approach in Embedded System (https://www.mathworks.com/matlabcentral/fileexchange/40774-a-short-introduction-on-using-model-based-design-approach-in-embedded-system), MATLAB Central File Exchange. Retrieved .