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!
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!)
I think you'll find that article is using GCC - not Keil.
Inline assembler is very much an Implementation-Defined thing!
Take a look at the Keil App Note:
http://www.keil.com/appnotes/docs/apnt_209.asp