We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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.
Refer to the following knowledgebase article: http://www.keil.com/support/docs/159.htm Jon
thanx a lot. that link has surely helped me. thanx a ton... regards, kaushik