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?
Please sign in to leave a comment.