Vitis Model Composer provides the ability
to debug C/C++ code that has been imported as a block using the xmcImportFunction
command, while simulating the entire design in
SimulinkĀ®
. In this case, the xmcImportFunctionSettings
command can be used to set the debugging
tool.
This feature lets you build the C/C++ function with debug information, and load it into Simulink for simulation. Once loaded, you can step into the C/C++ code of a specific imported block, and debug the function. The debugging environment lets you set debug break points in the C/C++ code, step through, and observe the intermediate results to verify the function in the context of the simulation. Debugging C/C++ code during Simulink simulation provides a natural flow. You can set desired input stimulus in Simulink, and observe the effect stepping through the code.
The debug flow in Model Composer uses the following steps:
- Specify the debug tool using the
xmcImportFunctionSettings
command. - Launch the debugging tool.
- Add a breakpoint in the imported function.
- Attach to the MATLABĀ® process.
- Start Simulink simulation.
- Debug the imported function during simulation.