0

I am hitting a HardFault in code on an STM32G0B0 MCU (i.e. Cortex-M0+ processor, but I suspect the issue may be more widespread). The codebase supports a number of our custom boards, and works on a number of different Cortex-Mx processors. The current board is new, but is almost exactly the same as an existing board. So I'm basically trying a simple port of working code to a new working (HW works) board.

The specific problem I am having is that I hit a HardFault, and I cannot get any information about what causes it. Here are some symptoms/observations:

  1. Program counter (PC) is FFFFFFFE - clearly illegal value.
  2. Vectors are set up correctly (exception 3 points to my HardFault_Handler, VTOR register is set correctly)
  3. Breakpoint appears to be set properly, but it never gets triggered.
  4. The debugger shows almost no information that I can interpret (see below).

I am using Segger J-Link and Segger Ozone debugger, and am following what looks like an excellent methodology here: Analyzing Cortex-M Faults. However, while the examples shown there provide lots of information about the fault in question, I don't get any; contrast the "Cortex-M HardFault Exception" dialog in with this: enter image description here.

So two questions:

  1. How do I get the breakpoint to work?
  2. How do I get more information in that Dialog?

Note that gdb is giving me the same behavior (i.e. IP at FFFFFFFE, breakpoint doesn't work, no other information available) so the first question is quite generic; the second is more specific to Ozone, but probably similar issues exist with other debuggers.

Bob
  • 587
  • 8
  • 17

0 Answers0