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,
From the following link I have understood the compiler analyses the program and sets the stack size for the 8051. I am seeing a stack overlow when one ISR interrupts a lower priority ISR. If the compiler analyses the program and sets the stack, to a size it deems adequate, then how can it overflow ? I am using a 8051 and a Keil compiler.
Any help would be appreciated.
Thanks,
Rochus
The material you quote explains how C51 manages to keep almost all the data (function arguments, local variables) out of the actual stack, by applying static call tree analysis. You can help it by banking registers for interrupt handlers. But some data still end up on the stack, most notably the return addresses for CALL/RET and interrupts. Those occupy whatever remains of your IDATA.