cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to check which line of code resides on a particular address on STM32CubeIDE?

RrW1
Associate III

Hi,

I came across a HardFault in my code while in debug mode on STM32CubeIDE, and I checked the SFRs register viewer and noticed that I ran into a PRECISERR, and the BFAR field shows which address triggered the data bus error. I have attached a screenshot of what my SFR window is showing, including the address stored in BFAR:

0693W00000BbjsaQAB.png 

Knowing that the BFARVALID bit is set, and my BFAR points to 0xB005_4620, is there a way to check which line of code resides in this address on the STM32CubeIDE?

I know that if I pause the Debug mode on STM32CubeIDE, and I place my mouse cursor on the functions/routines like, for example, HardFault_Handler(void), it shows me that the HardFault_Handler resides in 0x800_1770. Even the pc register in Registers window tells me that 0x800_1770 points to HardFault_Handler(void) as shown below:

0693W00000BbjszQAB.png 

Thanks!

10 REPLIES 10
RrW1
Associate III

Thanks for sharing this with me!