[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] GDB with uClinux



Hi Walt,


White, Walt J (GE Infrastructure) wrote:
>>My current build/debug process:
>>Edit my application c code and compile it, and the uClinux kernel on my RedHat machine, and then TFTP a pImage.romfs file to the U-Boot bootloader which allows me to then boot the new kernel and run my application.
>>
>>Currently my only debug capability is through printf() to the console.  This works, however I'd like to be able to set break points in the c source, step, and examine variables in my application.  I've been able to do this using the GDB debugger incorporated in the Xilinx Platform Studio.  However, that was for simple applications built on the Windows machine (through cygwin) that I downloaded to the target via the JTAG port, using XPS.  I'd like to be able to use this same XPS GDB debugger for my uClinux application and want to know if anyone else has done this and if so, how it is done.  
>>
>>I read on http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux that the uClinux kernel essentially must be built in a true linux environment, rather than the cygwin shell that XPS uses.  I'm wondering if it may be possible to take the output from my linux build along with the kernel and my application source code, and have the XPS GDB use it for debugging.  Has anyone done this or know of a way to use a debugger for applications under uClinux?

We have worked out the basics of debugging user applications with GDB, 
but this support has not been fully integrated into the tools, and the 
kernel.

The approach is to use an applciation called gdbserver, running on the 
microblaze, that loads your target application, and traps it in single 
step mode.  Then, mb-gdb connects to gdbserve rover ethernet as per 
usual (or serial if you want), and off you go.

A few issues - the gdbserver app disitrubted with uclinux-dist is 
ancient, and will never work on any targets exception m68knommu.  We 
have imported a newer version, and integrated microblaze support, how 
ever it's not part of the official distribution yet.  I will see about 
getting an archive for you to try.

The second catch is that I'm pretty sure you'll need a tweaked version 
of mb-gdb to do this.  Againn, let me refresh my memory on the status of 
this and i'll see what I can caome up with.

Rgards,

John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/