Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to debug u-boot for sam9261?
PostPosted: Sun Feb 06, 2011 10:44 am 
Offline

Joined: Thu Jul 03, 2008 8:48 am
Posts: 4
Hi,

I am having sam9261 and want to debug u-boot.
I can compile and debug AT91SAM9261-DataFlashBoot using Arm Developer suite in windows environment.
Issue is I cannot debug u-boot with this board?
I can compile u-boot with my Linux PC then copied this u-boot image in my windows environment from there I execute SAM BA- application and it helps me to download u-boot image in data flash.
After this I want to debug u-boot.


1) Is it possible to debug u-boot in ADS and AXD in windows environment using Wiggler?
a) IF yes then what is the procedure?

b) If no, can I debug u-boot by connecting Board with Linux PC using GDB?
b.1) if yes then let me know what the procedure for creating this debugging session is.

Thanks in advance
Ajay


Top
 Profile  
 
 Post subject: Re: How to debug u-boot for sam9261?
PostPosted: Sun Feb 06, 2011 12:16 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
Well it's possible to use a J-Link/SAM-ICE and Keil to step/debug all the way into and through the kernel. I've used AXD to do similar things with ROM/FLASH based code in the past.

Now this might not provide the level of debug hand-holding you're used too, but if you can read ARM assembler, and a .MAP file you should be fine. If it's a matter of understanding what's happening within your code, instrumentation might be the way to go.


Top
 Profile  
 
 Post subject: Re: How to debug u-boot for sam9261?
PostPosted: Sun Feb 06, 2011 2:35 pm 
Offline

Joined: Thu Jul 03, 2008 8:48 am
Posts: 4
HI,

Thanks for prompt response
I want to debug c source code of u-boot , for loading symbol axd looking for axf image.
gdb does not create axf file so i tried to adding sometimes
1) u-boot.elf or
2) u-boot.map or
3) u-boot.srec file
but axd always says
DBT Warning 00051: Format error in image file

Can you please let me know how to debug C Source code.

Regards
Ajay


Top
 Profile  
 
 Post subject: Re: How to debug u-boot for sam9261?
PostPosted: Sun Feb 06, 2011 4:53 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
AXF files are in ELF format, not sure if there any quirks to them, but given their age I'd have to imagine conversion tools exist.

u-boot isn't going to compile under Windows, or in Keil/RVT, things like AT91Bootstrap will. And Keil is certainly capable of compiling C code and downloading/debugging directly in to the SRAM or SDRAM on 9260/9G20 parts.

The way you want to attack it, you're pretty much limited to GDB. You should go look for some tutorials, or FAQ's, or consult your documentation.

Other more practical ways to debug C code include wrapping it in a harness that emulates the interfaces and test the bulk of the code in Visual Studio, et al, or provide enough instrumentation and interactivity to your broken code to trace the problem, and walk through the code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: