Attach and Debug Linux Kernel Using Xilinx System Debugger

It is possible to debug the Linux Kernel using the Xilinx® System Debugger. Follow the steps below to attach to the Linux Kernel running on the target and to debug the source code.

  1. Compile the kernel source using the following configuration options:



  1. Launch SDK.
  2. Click Window > Open Perspective > Debug.
  3. Click Run > Debug Configurations.
  4. In the Debug Configurations dialog box, select Xilinx C/C++ application and click the New button:
  1. Name the configuration Zynq_Linux_Kernel_Debug .
  1. Debugging begins, with the processors in the running state, as shown below.
  1. Click the Pause button to suspend the processor:

  2. Debug starts in the Disassembly mode.
  1. Add the vmlinux symbol file:
    1. Right click ARM Cortex-A9 MPCore#0 and select Symbol Files.
    2. Click Add.
    3. Add the vmlinux symbol file and click OK.
    4. You must set up “Source Lookup” if you built the code on a Linux machine and try to run the debugger on Windows.
  1. Select the debug configuration Zynq_Linux_Kernel_Debug, then right-click it and select Edit Source Lookup.
  2. Click Add.


  1. Select Path Mapping from the Add Source dialog box.
  1. Add the Compilation path and local file system path by clicking Add.
  1. Successful source lookup takes you to the source code debug.
  1. You can add function breakpoints by clicking this button in the Breakpoints view:
  1. Add a breakpoint at the start_kernel function.
  1. Click the reset button. The Zynq®-7000 processor boots from the SD card and stops at the beginning of the kernel initialization.
    Note: The Linux kernel is always compiled with full optimizations and in-lining enabled. Therefore:
Related Tasks

Debugging with the System Debugger


Copyright © 1995-2013 Xilinx, Inc. All rights reserved.