DPRG List  

[DPRG] 68HC11 stack problem resolved

Subject: [DPRG] 68HC11 stack problem resolved
From: Dan Miner miner at centtech.com
Date: Thu Jun 21 14:55:01 CDT 2001

Another solution that I've used with great success is to fill unused stack
with a known constant (such as $55) and after your program has run, look
at the enitre stack space to see the extent of clobbered constant bytes.
This shows you the maximum space used.  It's not 100% perfect though
because you COULD get an interrupt on top of the largest stack usage
that may be a rare event.  But it is a good first approximation.
                - Dan Miner

-----Original Message-----
>From: Clay Timmons [mailto:ctimmons at cadence.com]
Sent: Thursday, June 21, 2001 2:14 PM

I did a rough calculation that I should only be using about 190 bytes of
however test show that the code flakes out with 256 bytes available. 
Of course I am calling library functions like 32 bit multiply, printf etc.
take up who knows how much stack space.   I think I'll write a piece of 
code that will print the position of the stack pointer.  I can drop it in 
the deepest point of my code and see how much I'm really using. 

Thanks for everyones help, 

-Clay Timmons- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dprg.org/pipermail/dprglist/attachments/20010621/ac14050a/attachment.html

More information about the DPRG mailing list