Hi there,
I am using Keil uVision v4.71.2 with NXP LPC11U35. What I would like to ask is whether an exception is thrown at a Stack overflow? At the HardFault_Handler how can I determine the type of the exception and if possible the address of assembly where it was thrown?
Thanks in advance.
A stack overflow need not throw any exception unless the stack pointer moves into unmapped memory space. But accessing invalid data can have the rest of the code perform actions that gives exceptions.
Hi Pier,
thank you for your answer.
so, if understood correctly, I can manually place the stack at the start of RAM so that if an overflow occur an exception is thrown? if yes, can you tell me how?
Thank you for your answer.
So if I understood correctly, I can move the stack to the start of memory and when an overflow occurs an exception will be thrown for the invalid address? If yes can you tell me how can I move the stack area?
Thanks again.