Re: Global Variables Being Overwritten
- From: "Steve at fivetrees" <steve@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 01:08:03 +0100
"jgurtner" <jgurtner@xxxxxxxxxxx> wrote in message
news:1149033509.463217.49670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BINGO! Thanks a million!
you wrote:
"Some suggestions:
- Check your stack placement. Make sure it's not colliding with data
space. "
My compiler automatically placed the stack right in the middle of my
data. The stack was set to 80 bytes. I reset the size to 255 bytes
and the compiler moved it out in the open away from my other data.
(Not an major issue, but still not sure how to specify the exact
placement of the stack with my compiler).
Now the stack has plenty of room to expand!
Thanks again!
Excellent - glad to have been of service.
FWIW: I sometimes implement a "stack trap" - meaning that I assign a (small)
no-man's-land between stack and data, write some magic numbers there at
startup, and periodically check that the values have not been corrupted. If
they have been, I shout and wave... and then usually reset, since there's
not much point in continuing with corrupted data and/or stack... This is
useful in development for obvious reasons, but also in production, where the
idea isn't so much to catch bugs (there shouldn't be any!) but to catch a
runaway CPU... (I also always use a hardware watchdog too, but that's
another story...)
Steve
http://www.fivetrees.com
.
- References:
- Global Variables Being Overwritten
- From: jgurtner
- Re: Global Variables Being Overwritten
- From: Steve at fivetrees
- Re: Global Variables Being Overwritten
- From: jgurtner
- Global Variables Being Overwritten
- Prev by Date: Re: what's wrong with a pic ?
- Next by Date: Re: Global Variables Being Overwritten
- Previous by thread: Re: Global Variables Being Overwritten
- Next by thread: Re: Global Variables Being Overwritten
- Index(es):
Relevant Pages
|