I would like to implement MPU for stack overflow detection. I suppose that I should know in advance where the boundaries of stack and heap are.
Is it possible to read these boundaries from C code? Or is it possible to define exact region which will be reserved for stack and heap?
I know I can set stack and heap size in startup file, but there is no definition for top of the stack (or bottom of the heap).