Hi, I would like to calculate the free remaining stack space during run time.
I tried to access the r13 register with:
LPSTR pcSP; { register volatile int mySP __asm("sp"); pcSP= (LPSTR)mySP; }
This compiles, but this does NOT load the contents of r13 into my pcSP pointer variable.
I also tried many other things (e. g. "r13" instead of "sp"), but the compiler will refuse to access "r13".
Anyone how knows, how I can read the contents of the stack pointer register r13?