Create a debug launch session for the testapp_a53
application and launch the debug session with the default settings. The process will be interrupted with an error message.
To debug an application, a launch configuration must be created with the desired settings. These settings generate a Xilinx System Debugger (XSDB) script that is executed to download the applications to the device. The debug launch process is transparent to the user, and the expected outcome is for the application to stop at the main
function, so you can start debugging the code from there.
In some cases, however, this under-the-hood script may not execute successfully, generating error or warning messages that lead to a cancelled debug session. These scenarios are most likely on board bring-up processes, due to either incorrect hardware configurations in AMD Vivado™ or hardware-related issues. The issue usually manifests as an error message stating that the initialization process (FSBL execution) did not succeed, or as an error message pointing that launching the program did not succeed. An incorrect linker script that places code on non-initialized or invalid memory addresses might also display similar symptoms.
When an error occurs in the program launching process, the best debugging approach is to replicate the process manually. The Vitis IDE prints the auto-generated XSDB script in the Vitis Log window. This means that you can easily reuse the script to create a custom modified script or to execute the commands in the XSDB window manually. As well as being helpful for debugging, you can also use these scripts to create command line debug sessions, regression testing scripts, and so on.
Open the XSDB window in the Vitis IDE and execute each command line in the script manually until you reach the command that generates the error.
Running each command one by one lets you to see that the issue in this particular test case is in the download process of the testapp_a53
application to memory. See the dow command for more information.
In this case, the error message has already pointed out the root cause of the issue. There is a memory write error at 0xFFFB0000 that does not belong to a memory region according to the Zynq Ultrascale+ MPSoC Technical Reference Manual (UG1085). Checking the linker script in the Vitis IDE confirms that there is a mistake in the OCM memory region description because the base address is not correct.
Open the linker script in a text editor and modify the base address of the OCM memory region to match with the correct address.
Build the application and launch your previously created debug session again. Finally, the launch process succeeds and the test application is stopped at the main
function breakpoint.