Keil Logo Arm Logo

does KEIL compiler make out stack overflow?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Bala K
Posted
3-Aug-2003 19:20 GMT
Toolset
None
New! does KEIL compiler make out stack overflow?
hi all,
pls let me know if there is any provision in KEIL A51 compiler to sport a message if there's a stack over flow in the codes. i.e. if the stack size assigned is small & the codes overtly push & pop.
thanx in advance,
regards,
Bala
Read-Only
Author
Drew Davis
Posted
3-Aug-2003 21:26 GMT
Toolset
None
New! RE: does KEIL compiler make out stack overflow?
I don't see an option for the compiler to insert stack checks on functions calls.

It's perhaps worth pointing out that stack usage for 8051s in general and Keil in particular is somewhat unusual. The hardware stack is so small that little use is made of it in most cases. Function parameters, locals, and the like are assigned addresses at compile time based on the call tree of the program. A "stack overflow" is really more like a linker error message telling you that your data segments don't all fit.

Reentrant functions use a stack maintained by software. And the hardware stack does see some use, mostly for function return addresses (though those can be moved to the software stack if desired) and the rare bit of temporary storage.
Read-Only
Author
Jon Ward
Posted
4-Aug-2003 20:59 GMT
Toolset
None
New! RE: does KEIL compiler make out stack overflow?
Refer to the following knowledgebase article:

http://www.keil.com/support/docs/159.htm

Jon
Read-Only
Author
Bala K
Posted
6-Aug-2003 10:41 GMT
Toolset
None
New! RE: does KEIL compiler make out stack overflow?
thanx a lot. that link has surely helped me. thanx a ton...
regards,
kaushik

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.