MATLAB: How to generate asynchronous Function-call signals for the custom target in Simulink Coder

Stateflow Coder

The Simulink Coder library contains a section "Interrupt Templates" with 2 blocks: Task Sync and Async Interrupt.

These blocks generate asynchronous Function-call control signal. However, the generated code is customised for VxWorks.

I need to generate asynchronous Function-call signals for targets other than VxWorks.

Best Answer

The blocks Task Sync and Async Interrupt from the Interrupt Templates library are designed to serve as a starting point to implement asynchronous blocks for use with your customer target RTOS.
The documentation section titled "Create a Customized Asynchronous Library" is designed to guide you during this process:
As an example, the attached file contains a simple S-Function that generates asynchronous function-calls in simulation. This example illustrate only how to generate an asynchronous fcn-call in simulation. For code generation example, please see the documentation link above.