Unwanted breakpoint after hardfault.
Greetings,
I'm working on a project for the STM32F205ZG using CrossWorks and have a peculiar problem with breakpoints and hardfaults.
I have implemented a simple hardfault handler which flashes LED:s and beeps a buzzer. For testing, I generate the hardfault by reading and writing illegal memory areas. Problem is that CrossWorks seems to insert a breakpoint right after a hardfault is issued, which prevents the fault handler to execute. This means that the fault code will never run properly unless a debugger is connected and I can resume execution manually after the breakpoint.
I have disabled all breakpoints in the Breakpoints-menu. First I thought the debugger itself was responsible, but I tried using both a Segger JLink and TI ICDI and the same thing happens. I have written code similar to this using IAR and a STM32107 and it have worked as expected. I suspect that there is a hardware breakpoint set somewhere in CrossWorks which I can't find. Any ideas?
Thanks,
/Tomas
-
I experience the same problem.
STM32F205
It seems to be linked to the V7M exception that you can view in the Breakpoints (Hardfault in this case).
It seems to remain active even after you hit the debugger stop button, hit the disconnect st-linkv2 button, disconect the jtag connector, reset the device...
The only way to get rid of it, is to power cycle the unit.
I would like this to be set only when my debugging probe is connected, and cleared otherwise.
Is the MCU aware of the debugprobe?, is there anyway to do this?
Thanks,
-
I experience the same problem.
STM32F205
It seems to be linked to the V7M exception that you can view in the Breakpoints (Hardfault in this case).
It seems to remain active even after you hit the debugger stop button, hit the disconnect st-linkv2 button, disconect the jtag connector, reset the device...
The only way to get rid of it, is to power cycle the unit.
I would like this to be set only when my debugging probe is connected, and cleared otherwise.
Is the MCU aware of the debugprobe?, is there anyway to do this?
Thanks,
Please sign in to leave a comment.
Comments
2 comments