Dear Champs,
I am asking this for our customer.
How does the user read stack pointer during runtime?
They want to know the maximum stack usage to optimize their memory usage.
Note that they are aware of ERAD for stack overflow detection, and they just wonder how to read stack pointer in C or in embedded assembly code.