Debugging Imported Blocks - 2022.2 English

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2023-01-13
Version
2022.2 English

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:

  1. Specify the debug tool using the xmcImportFunctionSettings command.
  2. Launch the debugging tool.
  3. Add a breakpoint in the imported function.
  4. Attach to the MATLABĀ® process.
  5. Start Simulink simulation.
  6. Debug the imported function during simulation.