cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
michael1605
Newbie
Newbie
8,358 Views
Registered: ‎07-03-2015

debugging Linux applications on Microblaze

Hello,

could someone please answer some questions who is debugging Linux applications on Microblaze.

 

I have to prepare an environment to debug applications running on Microblaze Linux 2.6.38. Everywhere, I can find hints how to do it with ARM on Zynq, but this is only a Spartan-6. I might change the Linuxversion but not the hardware.

 

First, I compiled the kernel 2.6.38 (PLB, big endian) with initramfs_minimal.cpio.gz, then I compiled it with initramfs_complete.cpio.gz. In both cases, the Linux Kernel is running on Microblaze and I can access the filesystem with a serial link and with LAN using telnet.

 

To debug applications, I tried to run with Windows 7 (64-bit) the Xilinx SDK (Eclipse) included in ISE/XPS 14.7. For Linux applications running on Microblaze, I tried to use the GDB-Debugger in SDK. I think I have to start a GDBserver first and then start SDK to connect to it.

 

I could not find the GDBserver in the above mentioned filesystems. So, I downloaded the GDB sources for GDB 7.7 and did two configurations. One for the host (first VirtualBox with Ubuntu-Linux-32bit, later Windows 7) and one for the target (microblaze running on spartan-6).

 

to create the GDBclient for the PC:

configure --prefix=/opt/gdb/mb-linux/cross --target=microblaze-unknown-linux-gnu

The following commands 'make' and 'make install' are running without errors.

 

to create GDBserver for the FPGA:

configure --prefix=/opt/gdb/mb-linux/native --host=microblaze-unknown-linux-gnu

There is an error with the following command 'make'.

error: Gdb does not support native target microblaze-unknown-linux-gnu

 

I have really tried a lot, looked at many pages, e.g.:

http://www.wiki.xilinx.com/

Xilinx Wiki - Getting started

Xilinx Wiki - MicroBlaze

Xilinx Wiki - Create Linux Application

Xilinx Wiki -Debug Application

 

Many links were broken and if accessible, debugging Linux on Zynq or debugging a standalone application on microblaze was described.

 

It would be very helpful if someone who actually did debug Linux applications on microblaze with or without SDK could describe a little bit how it works.

Is GDB included in either of these filesystems and I did not see it ?

Do I need to create GDBserver ?

What is wrong with my settings to create GDBserver ?

Is there a totally different way to debug ?

 

Thanks in advance for your help,

Michael

0 Kudos
3 Replies
achutha
Xilinx Employee
Xilinx Employee
8,068 Views
Registered: ‎07-01-2010

@michael1605

 

 

I don't see a tutorial for Microblaze Linux application Debug but below links may give some insight of it.

 

http://www.xilinx.com/training/zynq/how-to-debug-a-linux-application-using-xilinx-sdk.htm

http://xilinx.wikidot.com/microblaze-linux

 

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos
michael1605
Newbie
Newbie
8,050 Views
Registered: ‎07-03-2015

Hello Achutha,

 

thank you for your reply.

I already knew those two links but I took a close look at them again.

 

The second link helps to run a Linux kernel on Microblaze. It ends when it's getting interresting for me. It does not describe anything about developing a Linux application.

 

The first link is using Zynq. Most of the steps can be done with Microblaze as well. When I start debugging, it changes to the debug perspektive and after some seconds I see the message

 

Hello_Linux_Debug(SDK Linux TCF Agent: Disconnected): Connection refused: connect

 

SDK.log in the SDK workspace shows:

15:20:34.399 ERROR - Unexpected error while parsing XMD response ?: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: invalid number or unquoted string near

 

I tried the following options but nothing helped:

Kernel with initramfs_minimal.cpio.gz and with initramfs_complete.cpio.gz.

Changed the access rights of /tmp (I used it for 'Remote File Path')

 

In the video for Zynq, it is said:

by default, there is a TCF agent running

 

I guess, the TCF agent can be seen on Zynq if you list all processes running.

What is the name of the TCF agent?

I guess this one is missing on my Microblaze.

 

Any other suggestions?

 

Kind regards,

Michael

0 Kudos
michael1605
Newbie
Newbie
7,636 Views
Registered: ‎07-03-2015

 

Hello,

The problem is not yet solved.

Did no one ever debug Linux applications on MicroBlaze ?

Is it working with the Xilinx SDK (Eclipse) or just with GDB ?

 

Kind regards,

Michael

0 Kudos