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  [ 3 posts ] 
Author Message
 Post subject: Turning Off Code Optimization in U-Boot
PostPosted: Mon Jan 10, 2011 4:59 pm 
Offline

Joined: Sat Sep 11, 2010 1:32 am
Posts: 23
I have my custom hardware in house and my new bootstrap (tests all hardware before jumping to U-Boot) runs great. However, U-Boot is getting an occasional crc error on the environment read from serial flash (even though the bootstrap, splash screen, and U-boot) all come from the same serial flash and all are good. After the Kernel is loaded from NFS, it gets a crc error during decompression.

So, in order to troubleshoot this properly, I need to get into U-Boot with my ICE debugger. I can get in but everything is messed up because the code is optimized by some compiler setting so variables are gone and the program counter hops around almost unusable.

Has anyone found where in the multitude of makefiles where I can turn off optimizer and make sure all debug information is included in the U-Boot build?

Thanks, Gary

P.S. The crc errors would lead me to believe I have a DDR config problem on my target hardware but the DDR passes all of my RAM tests and my splash screen looks perfect....


Top
 Profile  
 
 Post subject: Re: Turning Off Code Optimization in U-Boot
PostPosted: Mon Jan 10, 2011 5:50 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
In config.mk (project root directory), try changing/removing the -O? options

HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

OPTFLAGS= -Os #-fomit-frame-pointer


grep also for PLATFORM_CPPFLAGS, -O


Top
 Profile  
 
 Post subject: Re: Turning Off Code Optimization in U-Boot
PostPosted: Mon Jan 10, 2011 7:39 pm 
Offline

Joined: Sat Sep 11, 2010 1:32 am
Posts: 23
Thanks, My u-boot.bin file grew from 153K to 280K. This caused me to revise my memory allocs, my custom windows SAM-BA program I wrote, and the serial flash mapping. However, by later today, I should be debugging.

Thanks again, Gary


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] 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:  
cron