Question:
Is there any option available for detecting stack overflow?
Answer:
CrossCore Embedded Studio has a stack overflow detection feature, where it will test the stack pointer is within the stack on entry to each function. This will enable to detect any stack overflow and subsequent corruption of anything besides the stack in memory.
It can be enabled by selecting the "Generate code to catch a Stack Overflow (-check-stack)" option in the Compiler settings under "Run-Time Checks"
Unfortunately, it won't catch any other memory accesses writing over the stack.