In this blog entry we will discuss how we can debug the Zynq® UltraScale™ Linux Kernel images in Vitis™.
In this blog entry I will show how to use PetaLinux 2020.1 to create the Linux images for a Zynq UltraScale device.
This Blog is part of a Series discussing how to debug various components in the Petalinux Images.
You can find the other entries at the links below:
I have used the ZCU104 board for this demo. However, the steps should be common for all Zynq UltraScale devices.
I find that the easiest way to debug the boot images is to load the boot image onto your SD/QSPI and debug on the running target.
Launch Vitis, and close the welcome screen.
Create a new Debug Configuration.
Double Click on Single Application Debug:
Set the Debug Type to "Attach to Running Target":
Note: I am also doing a remote connection, so I set this up too.
Select Apply and Debug. This will open the debug perspective.
You should see the Cortex A53 running (our boot image).
Expand the XSCT (Xilinx Software Command-Line Tool) window.
Here, we want to pass the symbol files to the Cortex A53 #0 for the Linux kernel. This is the vmlinux file in the images/linux folder in the petalinux project directory.
We set the symbol files by using the memmap command in XSCT:
We can add a breakpoint on the start_kernel function:
We can also get the function address from the symbol file directly:
Then power cycle, and the kernel should boot, and stop at the break-point:
The user can then use the debug functionality to step through the code:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.