Lab 3: Debugging Imported C/C++-Code Using GDB Debugger - 2020.2 English

Vivado Design Suite Tutorial: Model-Based DSP Design using Add-on for MATLAB and Simulink (UG1498)

Document ID
UG1498
Release Date
2021-01-22
Version
2020.2 English

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Ā® .

The debug flow in Model Composer is as follows:

  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.

This lab has two steps:

  • Step 1 introduces you to the Optical Flow demo design example in Model Composer. It shows you how to identify the custom library block, created using the xmcImportFunction feature.
  • Step 2 shows you how to debug C/C++ code using the GDB tool.

For more details and information about how to create custom blocks, follow this link in Model Composer User Guide (UG1262).