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.
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!
Google "Cortex M Hard Fault"; there are many articles & tutorials on the web - including a Keil application note.
You should also have a copy of the appropriate Joseph Yiu Definitive Guide; eg,
www.elsevier.com/.../978-0-12-408082-9
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