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 <[EMAIL PROTECTED]> 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
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>



-- 
Michael Williamson
315-425-4045x230
www.criticallink.com
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to