lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] About global parameter initial problem


From: yueyue papa
Subject: Re: [lwip-users] About global parameter initial problem
Date: Wed, 26 Nov 2008 21:29:16 +0800

Thank Mike.
 
My solution is nearly the same as you current do.

>>A little compiler and linker gynmastics, but "it was the only way to be sure".
Current I do some linker scripts to solve the problem. In the unit test envirionment, it seems problems gone away. Current in the integrated environment, I meet the crash problem. But I unable to distinguish where the crash come from. In my view, all globle parameter are really inited.
 
The same code working in one small project, but crashed in larger integrated project. I was struggling fro some days. Still no answer yet. I find the problems caused by global parmaters are come out after two days struggling. So I do not knwon current problem will cause me in.
On Wed, Nov 26, 2008 at 8:41 PM, Mike Williamson <address@hidden> wrote:
Hi Lee,

I don't recommend trying to initialize all the variables in the lwIP code on your own.  Our company had the same problem for the TI DSP67XX and DSP645X compiler toolchain, and we went down the path of modifying all the c code having variables needing initialization.  It required analysis to figure out which ones needed it and a fair amount of time.  Good luck making sure you catch them all, and good luck trying to stay in sync with the repository once you do it.  The latter is a much larger headache, as you're always on the hunt for variables that need to be initialized when new features are added, etc., and every compare against the CVS root for change yeilds a pile of false positives.   In the end we abandoned that approach and finally wrote a separate assembly level application entry point that forcibly cleared *all* unitialized linked data in our embedded program (we "fixed" our "broken" compiler).  A little compiler and linker gynmastics, but "it was the only way to be sure".

-Mike



On Wed, Nov 26, 2008 at 3:05 AM, Simon Goldschmidt <address@hidden> wrote:

> I find the lwIP did not manually init global parameters. In most of the

And it does this on purpose.

> system, the global paramter has default zero.  But my embeded system only
> init the static paramters, and won't init the gloable parameters.

That's a bug in your compiler. We've had this discussion some months ago. Since we do not want to support broken compilers, we decided the ones with broken compilers should add initialization on their own, I think... Sorry.

Initializing globals to zero is defined in the C standard somewhere. If you're interested in where (e.g. want to tell your compiler vendor to fix it), you can search the mailing list archive for the discussion, it was mentioned here a while ago.

Simon
--
Sensationsangebot nur bis 30.11: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users



--
Michael Williamson
315-425-4045x230
www.criticallink.com

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]