You can try the following snippet to track the stack pointer in your code:
register uint32 sp_track asm("sp");
// your code
The variable sp_track will now hold the value of the stack pointer and will change when the stack pointer changes, like pointer.
thanks for the hint! But I wonder, what does return the asm instruction "sp", a pointer? In this case what is doing the "register" attribute? Can I avoid that?