In my bare metal C application for a CM3, I have a startup script that runs a CRC on code and data sections in their target regions in memory. I noticed sometimes the check on code would fail, sometimes not, depending on if I had any breakpoints set. Well, I have determined from cause and effect that the extra breakpoints AFTER compilation ruined the CRCs on the code section, obviously because these breakpoints were added later by my IDE.
I wanted to check here whether the following proposal would be possible: In the CRC function, capture all extra breakpoints set at runtime in my code, and disable them so that the instructions would go back to as they were at compile, then run the CRC check function, then re-enable them at the end of that function.
Is there a way to do that? I think if not, then I'll just have to skip CRC checks during any debugging.