Enable Debug Mode - 2022.2 English

Vitis Model Composer User Guide (UG1483)

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

Debugging the C/C++ function requires the simulation model to be built in the debug mode, instead of being built for release. You will use the xmcImportFunctionSettings command to configure the build mode prior to launching simulation. To enable the debug build, use the following command:

xmcImportFunctionSettings('build', 'debug')
Refer to xmcImportFunctionSettings Command Syntax for more information on the command options. Enabling debug mode in Windows operating system causes Model Composer to return the following messages in the MATLABĀ® Command Window:
Imported C/C++ code will be built with MinGW compiler. You can use gdb to debug your C/C++ code.
MATLAB process ID is 4656.
You can also get the process ID by typing "feature getpid" in the MATLAB command window.
The information returned above can be used to launch the default debug tool, and connect to the MATLAB process, as described in the following sections.
Tip: You can restore the release build environment, using the 'release' value of the 'build' option:
xmcImportFunctionSettings('build','release')