Why GCC Saves R3 in STM32H7 Bare‑Metal Code and How to Avoid It
Summary During a deep-dive debugging session on an STM32H7 (Cortex-M7) bare-metal application, a developer noticed unexpected behavior in the generated assembly for a simple wrapper function. Specifically, the compiler was performing a stack push and pop of register R3, despite R3 being defined by the AAPCS (Procedure Call Standard for the ARM Architecture) as a … Read more