I've got fairly regular SOS panic of hard fault and I'm using the Particle Debugger with B5som dev kit. I'm unable to catch anything in the debugger or serial monitor via the USB port. The debugger only reports Info : [nrf52.cpu] external reset detected.
Should I expect to be able to get more from the debugger?
Or am I doing something wrong?
I've updated the debugger to latest firmware, running latest CLI and workbench.
I can debug by setting break points.
It's been a while since I've done it, but if I recall correctly, I set a breakpoint in panic_ (services/src/panic.c in the Device OS source). Then, when you hit that breakpoint, check the call stack.
From your words, I read that this is the size of the firmware, or the space it takes in the flash memory of the device.
As I re-learned today (here), that is different from the RAM your program uses. So the memory handler will help you identify if that is an issue.
Cheers
I wasn't far off, around 50k at boot going down to 40k after cloud connected. Not changing throughout my test.
Setting breakpoint in panic_ highlighted the panic was BusFault, I was tracking a Serial1 corruption (missing data) issue as well. It appears as though I was starving the CPU by running processing code on every byte received on the serial port causing both issues.