just an idea, has anyone played with stack overflow detection by using the MPU? E.g. use lowest 32 bytes of the stack area as a protected area and configure the MPU (e.g. region 7) as a non-accessible memory? It does not protect from sp manual adjusment but should detect runtime push-pop failures.
I am looking for a correct placement of the MPU set/reconfigure function, some kind of trace macros…