UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
7,877 Views
Registered: ‎11-14-2012

Debugging Linux Kernel using xilinx xmd

I am trying to debug linux kernel using xilinx XMD, for that first i am loading u-boot and vmlinux using XMD using dow command and i tried to set a breakpoint using bps command of xmd. But when i tried to run breakpoint is not hitting. Please help me how to debug Linux using Xilinx XMD 

0 Kudos
10 Replies
Xilinx Employee
Xilinx Employee
7,857 Views
Registered: ‎09-10-2008

Re: Debugging Linux Kernel using xilinx xmd

Hi,

The vmlinux is an elf with virtual addresses rather than physical, you should be able see those addresses using objdump and this is a good practice to better understand the details. It can be used for debug symbols with a debugger, but not loaded into memory using XMD. The Image and zImage files are binary rather than elf and are created from the vmlinux image during the kernel build.

To my knowledge XMD does not use symbols (I never done it) as that's the job of a debugger that runs on top of XMD like GDB.

You can let u-boot load the normal linux image and then after Linux starts you can stop it in XMD and do stepping and debug. If you need to debug the kernel startup then you need to set a hardware breakpoint at the start address so that XMD will stop after u-boot starts the kernel.

Thanks
John
0 Kudos
7,849 Views
Registered: ‎11-14-2012

Re: Debugging Linux Kernel using xilinx xmd

Thank you Very much John. I will try this way.

 

Also I tried another way, in which I tried to detect the processors of zc702 through SDK's run->debug configurations options, but unluckily processors are not getting detected, it is invoking some hw_server and thats all. I am not getting any Idea how to proceed from here on. I followed the below link to debug kernel through TCF:

http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_6/SDK_Doc/tasks/sdk_t_tcf_attach_debug_linux_kernel_tcf.htm

 

 

0 Kudos
Explorer
Explorer
4,536 Views
Registered: ‎06-03-2015

Re: Debugging Linux Kernel using xilinx xmd

Hi,

 

I would like to debug the kernel, linux-xilinx through xmd or xilinx SDK , can you please provide me clear steps, 

My understnding of the above discussion is " dow uboot to xmd" , "dow uImage to xmd", later start debugging using break points .

lets say

xmd# bps drivers/tty/serial/xilinx_uartps.c :1226

xmd#continue

xmd#n

 

is that right?

 

if not please provide me, exact steps for debugging linux kernel.

 

Thanks in advance

 

Regards
Satish.G

 

G Satish Kumar
0 Kudos
Explorer
Explorer
4,421 Views
Registered: ‎06-03-2015

Re: Debugging Linux Kernel using xilinx xmd

Hi all,

 

I got partial answer and waiting for ur support.

I got to know how to debug Linux kernel using XMD

 

boot zed board through SD card and stop booting the board at zed-uboot>
connect xmd debugger through uart and
xmd#connect arm hw
xmd#dow vmlinux

xmd#bps start_kernel hw
xmd#con

 <hitting breakpoint 0 at 0x12345  address>

xmd#stp

xmd#stp

 

stp is working here, but if we want to see the source code, what will be next step?

 

if we are not able to see the code through xmd , how it will connect to GDB debugger

 

thanks in advance

 

regards

Satsih.G

 

 

 

 

G Satish Kumar
0 Kudos
Explorer
Explorer
4,317 Views
Registered: ‎06-03-2015

Re: Debugging Linux Kernel using xilinx xmd

Hi all,

 

Can you guys, plerase reply to my post.

I am waiting for positive answer

 

Thanks & Regards

Satish.G

 

G Satish Kumar
0 Kudos
Adventurer
Adventurer
3,388 Views
Registered: ‎04-25-2016

Re: Debugging Linux Kernel using xilinx xmd

Hi, I come up with very basic question. The discussion shows that Xilinx XMD is a Linux Kernel which can be used for debugging purpose. Does it means that we can run all Linux commands in Xilinx XMD ?

 

The board need to be connected all the time with Vivado. How about running full embedded Linux on Zynq  with keyboard and mouse ? 

 

 

0 Kudos
Moderator
Moderator
3,379 Views
Registered: ‎10-06-2016

Re: Debugging Linux Kernel using xilinx xmd

Hi @gsatish10

 

You can use the AR#67767 as a reference point. When debugging kernel from xsdk (or xsct) you need to enable kernel awareness and load the symbols.

 

Hi @expertengr

 

You misunderstood the topic of the post. The discussed feature is about running the linux kernel in the target machine and be able to debug the kernel as it was an standalone application within the Xilinx tools.


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Adventurer
Adventurer
3,375 Views
Registered: ‎04-25-2016

Re: Debugging Linux Kernel using xilinx xmd

Is it possible to run embedded linux on Zynq with keyboard and mouse ? 

0 Kudos
Moderator
Moderator
3,372 Views
Registered: ‎10-06-2016

Re: Debugging Linux Kernel using xilinx xmd

Take a look: http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+-+Installing+the+Ubuntu+Desktop+on+PetaLinux+and+Demo+Tech+Tip

Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Explorer
Explorer
785 Views
Registered: ‎06-03-2015

Re: Debugging Linux Kernel using xilinx xmd

so this support debugging of Peta-linux 

If we want to test linux-xilinx 

support is provided for linux-xilinx ?

 

 

Regards
Satish,G

 

 

G Satish Kumar
0 Kudos