> // assign the sentinel address
> uint8_t *sentinel = (uint8_t *)0x234;
>
> // set the sentinel value
> *sentinel = 0xcc;
>
> // check the sentinel value
> if (*sentinel != 0xcc)
> {
> // stack overrun occurred
> }
Ok, that does what I wanted, thanks. :)
That brings up another question though..
I'd been using lcd_puts to send constant strings to the display, and I
added another one to indicate a stack problem. But now I'm chewing up
more ram..
How do I use strings in program space, instead of having the system
copy them into ram, on boot, and eat up that ram permanently?
--
There is no computer problem which cannot be solved by proper
application of a sufficiently large hammer.Message
Re: [AVR-Chat] Re: WinAVR / GCC question re Stack
2009-03-24 by David VanHorn