[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] hang of user app on its startup (bad ima ge file because of a tool chain bug?)
Hi Falk,
I haven't seen anything like this before - see below for some
comments/questions
Brettschneider Falk wrote:
>>Often my user app doesn't start, better to say it hangs
>>before reaching the
>>main() function.
Is it just the app that hangs, or does it lock up the kernel as well?
>>I compile and link the program with mb-gcc 3.4.1 (Xilinx EDK 8.1 Build
>>EDK_I.15 290805) on SuSE-Linux and generate the image this way:
>> mb-flthdr -z -o ...
>> zflat ...
>>After that I put it in Linux' romfs/bin and start it out of
>>the uclinux
>>startscript on Linux boot-up.
Do you see any different behaviour if you start it from the console /
command line?
>>First I suspected the filesizes of my user app to be not
>>aligned or such
>>things. Here's a list of program sizes (in bytes) I had, '!'
>>means that it
>>hung:
>>296059 !
>>296053 !
>>296356
>>296205 !
>>296160
>>288998
>>294000
>>294003 !
>>297219
>>297236
>>298160
>>298389
>>300408 !
>>300601
>>
>>The strange thing is, in case that it hangs I just have to
>>comment out or in
>>any little C sourcecode and after recompiling it starts up normally.
>>Usually, I just comment out a little printf call. I'm sure I
>>don't have a
>>stack overflow but it shouldn't matter anyway since it hangs
>>before reaching
>>the main loop. Maybe it's interesting that I have some global struct
>>instances in the program but actually not huge ones.
Do you have any global variables across multiple source files, maybe
declared with extern?
Have you confirmed that your auto-config.in settings (esp. regarding
MUL/SHIFT/DIV) match the CPU correctly?
Are you able to reduce it down to a minimal test case?
I've built and run uClinux apps well over 1Mbyte, so it's not the total
file size that should be a problem...
As a last resort, if you tell us what combination of hard mul/div/shift
etc you have, perhaps post the binary (working and non-working) and
someone can try it?
Hope this helps,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/