The use-case we will use here is the debugging of the PS GEM driver (zynq_gem) on the RFSoC board; ZCU111. The SDK supports debugging on a running target, so users can boot u-boot from SD card and connect to this running target , in SDK. User can then set the relocation information, and set a breakpoint. Then upon a reboot , then the breakpoint should be hit and user can step through the uboot code as normal.
|Table of Contents|
Determining the uboot relocation address and offset:
Boot into u-boot and use the bdinfo utility to obtain this information. For example:
Connecting to Running Target in SDK:
Launch SDK 2018.3, and Run → Debug Configurations
Double click on the Xilinx C/C++ (System Debugger) to create a new debug configuration.
Select Attach to running target as the Debug Type
If the board is connected directly to your machine, select Conection as local. However, as in the case here the board is connected remotely. User can set this up by selecting New
and setting up the target connection.
Updating the relocated symbol information:
We need to stop the processor (CortexA53 #0), and update the memory map to set the relocated symbol information. Users can do this from the XSCT command line in SDK
Adding the breakpoint to the relocated uboot driver function:
Users can set the breakpoint from XSCT too using the address calculated above:
Debugging relocated uboot function in SDK:
Now, if the user re-boots the uboot then the breakpoint will be hit, and the user can then step through the code to see if the uboot is executing as expected:
Users may need to highlight the processor to enable the debugging symbols to step over, into, ect: