Hi Erich,
No need to apologize, your blog still has more information on the subject than the user's manual! If you've got any information on how to set up the comparator that would be great. Do you remember roughly how it was set up? Is it all done through gdb commands? I haven't gotten into the DWT documentation yet.
I'm trying to figure out where my FreeRTOS pxCurrentTCB pointer is getting clobbered, and of course it changes with every context switch so it's a lot of writes. I've set a canary value adjacent to it and put a watchpoint on that to catch any writes that might be due to stack or buffer overflows but I haven't caught anything yet. I was able to get some data out of the system last time I got a usage fault and verified that all of the stacks were OK and nothing around pxCurrentTCB seemed to be disturbed. I'm not sure if the null pxCurrentTCB is a cause or an effect.
I'm getting an INVSTATE usage fault, with PC = 0x100, which is of course an interrupt vector (that I'm not using), but I don't think a vector fetch is happening - I set a read watchpoint on 0x100 and it never trips. I think the INVSTATE fault is happening when something loads or pops 0x100 onto PC and it doesn't have the thumb bit set. LR is set to an EXC_RETURN value that indicates it's expecting to return to handler context. I have breakpoints on my fault handlers so it seems like it must be something in an ISR. I can sometimes run for 12 hours or more without a fault and when I do get one I've got about a 50% chance of getting any debug data out of it, and that sometimes requires restarting the IDE before an 'attach' will work.
Thanks,
Scott