[Top][All Lists]
[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:34:16 +0800 |
Thansk Alain M.
You are correct. It is not caused the compiler. It is casued by startup code (bootstrap).
At first, I tried to adjusted the bootstrap code. (It is assemble code I struggling n year ago.) And finaly I just adjusted the link scripts force the ibss section to be intied. so the bootstrap will process. But I am still not sure whether all segment are inited. Dut to our system is a little strange.
So I suggest to manully init the global paramter in LwIP protject. I like the project, so I think the init will cause the developer easy to porting.
On Wed, Nov 26, 2008 at 9:22 PM, Alain M.
<address@hidden> wrote:
There is a possibility that it is not the compiler, but your startup code.
When a C program runs in an embedded (or anywhere), there is code that runs before main(). That code is responsible for initing your global variables.
Search you startup code, some times called crt.S ...
I have seen problems with this many times :)
Alain
Simon Goldschmidt escreveu:
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
- Re: [lwip-users] About global parameter initial problem, (continued)
- Re: [lwip-users] About global parameter initial problem, Simon Goldschmidt, 2008/11/26
- Re: [lwip-users] About global parameter initial problem, yueyue papa, 2008/11/26
- Re: [lwip-users] About global parameter initial problem, Mike Williamson, 2008/11/26
- Re: [lwip-users] About global parameter initial problem, yueyue papa, 2008/11/26
- RE: [lwip-users] About global parameter initial problem, bonny gijzen, 2008/11/26
- Re: [lwip-users] About global parameter initial problem, Jonathan Larmour, 2008/11/26
- Re: [lwip-users] About global parameter initial problem, address@hidden, 2008/11/26
- Re: [lwip-users] About global parameter initial problem, David Empson, 2008/11/26
- RE: [lwip-users] About global parameter initial problem, Pettinato, Jim, 2008/11/26
Re: [lwip-users] About global parameter initial problem, Alain M., 2008/11/26
- Re: [lwip-users] About global parameter initial problem,
yueyue papa <=