avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Stack size question


From: Theodore A. Roth
Subject: Re: [avr-gcc-list] Stack size question
Date: Mon, 28 Jun 2004 08:24:36 -0700 (PDT)

On Mon, 28 Jun 2004, John Yannakopoulos wrote:

> Hi all!
>
> I have the following question: Can I determine the maximum stack size
> of my program? My at90s8535 resets and I suspect that a stack overflow
> occurs. Is there a tool (maybe from binutils) or some utility to check
> against stack size?

One trick I use with my multitasking OS is to fill each stack with 0xaa
at startup. Then I go into a debugging session with the JTAGICE after
the program has run for a while and do a memory dump of the stack. It's
usually obvious how much of the stack has been used.

Of course, you can't use JTAGICE with the 8535, but you might be able to
do something similar in a simulator.

---
Ted Roth
PGP Key ID: 0x18F846E9
Jabber ID: address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]