Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: WinAVR / GCC question re Stack

2009-03-24 by David VanHorn

> // 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.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.