The code generator supports integration of generated code with operating systems and processors. For details, see Embedded Coder Supported Hardware.
This example shows how to simulate and generate code for asynchronous events on a real-time multitasking system.
The operating system integration techniques that the example demonstrates use one or more blocks in the vxlib1
library. These blocks provide starting point examples to help you develop custom blocks for your target environment.
Example Model
Open the rtwdemo_vxworks
model.
model = 'rtwdemo_vxworks'; open_system(model); %
Model Description
The example model contains two asynchronously executed subsystems, Count
and Algorithm
. Count
executes at interrupt level. Algorithm
executes in an asynchronous task. The generated code for these blocks is tailored for the VxWorks® operating system. However, you can modify the Async Interrupt
and Task Sync
blocks to generate code for your run-time environment whether you are using an operating system or not.
Related Information