I want to generate code combining Platform Architecture(MCU Peripherals), Functional Architecture, Logical Architecture with Schedular so how i can connect all components.

3 views (last 30 days)
I want to understand how i can generare RTE layer(schedular) in system composer.
i want to use Platform Architecture for MCU Drivers code in S-function. which will be connected to schedular component (Statechart). And schedular will be connected to Functional Architecture and Functional Architecture will be linked to Logical Architecture and with theirs simulink behavior models.
can i generate deployable code by system composer by following avobe workflow?
how i should connect schedular(Port interface for function call) to functional Archicteure and how i can send response of task complition to Schedular component?

Accepted Answer

Kautuk Raj
Kautuk Raj on 3 Jul 2025
Yes, you can model this workflow in System Composer and generate deployable code using Simulink and Embedded Coder.
  • In System Composer, define function-call port interfaces for the scheduler component (using Stateflow for scheduling logic). Refer to https://www.mathworks.com/help/releases/R2024b/simulink/slref/functionelementcall.html
  • Connect the scheduler’s function-call output port to the Functional Architecture’s function-call input port.
  • For task completion feedback, add a data or event port from the Functional Architecture back to the scheduler (e.g., a status signal).
  • Link each architecture component to its Simulink behavior model (including your S-Function for MCU drivers).
While System Composer manages architecture and interfaces, code generation is performed from the top-level Simulink model. This approach supports clear interface definition and embedded code generation for deployment.
Please also refer to the following documentation page for further details: https://www.mathworks.com/help/releases/R2024b/systemcomposer/gs/compose-and-analyze-a-system.html

More Answers (0)

Categories

Find more on System Composer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!