[ECOS] ARM startup stack & C++

Andrew Lunn andrew.lunn@ascom.ch
Wed Aug 8 08:32:00 GMT 2001


On Wed, Aug 08, 2001 at 05:15:31PM +0200, Robin Farine wrote:
> Hi gang,
> 
> I have got some stack overflow during execution of non-trivial static
> initializers with C++ programs. The file vectors.S for ARM declares a startup
> stack of 512 bytes when configured for separate interrupt stack. What do you
> think I should do to get a big stack for initializers/finalizers?
> 
> 1) Change the hardcoded 512 into 8192 ;-)

Not a good idea. The patch will get lost/forgotten when you hand the
completed code over the industrilisation team of intergration. 

> 
> 2) Add a configuration option for the startup stack size but nothing will use
>    this "big" area afterwards, correct?

Sounds reasonable. Anyone with a non-trivial static initialiser
probably has enough MB of memory that 8K is will not be missed. 

> 4) A completely different and wonderful solution?

Change your static to dynamic initialisationm so it can be done in the
context of a thread you can control the size of the stack.

        Andrew



More information about the Ecos-discuss mailing list