Skip to main content Skip to local navigation

My breakpoints are broken

My breakpoints are broken

I recently updated my MPLAB X installation to version 5.10.  The compiler hasn't changed, just the IDE.  Two surprises occurred.  First is that my SAMD board now crashes the IDE when I plug it in.  Only on Windows 10 on my HP tablet. Works fine on my Mac.  But I won't get into that today.

Today, I discovered that I broke my breakpoints using my PIC16 board.  Specifically, using the PIC16f1619 Curiosity board.  It's a relatively simple 8-bit device with a single hardware breakpoint in it.  It appears that I've been misusing hardware breakpoints in C for a few years because of this warning:

Software Breakpoints in MPLAB X (v 5.10)

As of version 5.10 (Nov. 2018) MPLAB X now asks you explicitly to enable software breakpoints.

Never got this warning before so remained oblivious to the practical implementation of software breakpoints versus hardware ones. I typically put a single breakpoint in and let the code boot up and halt at it.  Then, single-step to see what's going on.  Apparently, that requires the use of additional software breakpoints.  Well, now I know better.  The software breakpoints add a bit of assembler code where you can't see it to halt the code.  Time to get used to it.