Overwrite Hardfault_Handler with a custom assembly implementation in STM32CubeIDE generated code
Hi Community,
I am trying to define a custom Hardfault_Handler definition in the assembly to overwrite the default template given in the stm32xxxx_it.c in the STM32CubeIDE generated code. When the definition is put under custom.s and added to the assembly include path in the IDE it compiles without any warning or error but when in a debug session it is found that it jumps to the default Hardfault_Handler implementation instead of the custom. The default one is suppressed by defining __weak attribute to use the custom definition.
What might go wrong? Any hints to solve this will be helpful.
