Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to monitor what got me to an exception handlers?

How can i monitor where an HardFault_Handler (for example) exception occured?
which function, paramter or line rised this exception..
i think i would need to add a fuction to Handler functions so it will save the stack path to flash memory so i could watch it from the map file.

does it has to be an inline assembly function?

i would welcome any suggestion :)

thanks!

Parents
  • Hi Andrew, thanks for the quick response.
    i try to implement the functions from this source:
    www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html

    i guess im not using the inline assembly right.. why is the content of "static void HardFault_Handler(void)" is all commented with " ?
    it says it doesnt recognized the "lr" pramater, which is the first one.. so it wont recognized any of the syntax..

    iv'e replaced the "void HardFault_Handler(void)" function with this one, and the "prvGetRegistersFromStack" is also there..(in stm32f4xx_it.c)

    what am i missing?

    (im very new to this, so sorry for the trouble and thanks!)

Reply
  • Hi Andrew, thanks for the quick response.
    i try to implement the functions from this source:
    www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html

    i guess im not using the inline assembly right.. why is the content of "static void HardFault_Handler(void)" is all commented with " ?
    it says it doesnt recognized the "lr" pramater, which is the first one.. so it wont recognized any of the syntax..

    iv'e replaced the "void HardFault_Handler(void)" function with this one, and the "prvGetRegistersFromStack" is also there..(in stm32f4xx_it.c)

    what am i missing?

    (im very new to this, so sorry for the trouble and thanks!)

Children