Before you can run processor-in-the-loop (PIL) simulations, you must set up connectivity between Simulink® and your target hardware. The connectivity enables the PIL simulation to:
Build the target application.
Download, start, and stop the application on the target hardware.
Support communication between Simulink and the target hardware.
Use one of these workflows.
|Workflow||When to use|
Use this workflow if your target application has large I/O requirements that need high-bandwidth communication.
For more information, see Use rtiostream API for PIL Target Connectivity.
Use this workflow if:
For more information, see Use Debugger for PIL Target Connectivity.
rtiostreamAPI for PIL Target Connectivity
To provide PIL connectivity between Simulink and the target hardware, you can use the
Package with a debugger, for example, the GNU® Debugger.
This section provides a pseudocode example of
target.DebugIOTool debugger abstraction. Use a
target.DebugIOTool object to:
Control the lifetime of an application running in the debugger.
Automate common debugger actions. For example, applying breakpoints and continuing execution from a paused state.
Read and write to memory that the application uses.
For interactions with the debugger, you can use MATLAB external language interfaces to APIs, which the debugger vendor supplies.