SLAU132Y September 2004 – June 2021
A function accesses its local nonregister variables and stack arguments indirectly through the stack pointer (SP or R1). The SP always points to the top of the stack (the most recently pushed value).
Since the stack grows toward smaller addresses, the local data on the stack for the C/C++ function is accessed with a positive offset from the SP register.