Content originally posted in LPCWare by CodeRedSupport on Thu Feb 24 20:59:36 MST 2011
First, double check your optimization setting in your project build. Set optimization to None. It's possible the debug experience is compromised by an optimization setting. If the optimization level is set to None, it's possible the debug information emitted by the compiler for the while(1) loop is insufficient.
If ToggleGPIOBit is a function (or inline function), you should be able to high-level step into the function, and this should reflect in the source display. If the problem manifests attempting a high-level step over of ToggleGPIOBit, this suggests GDB did not find an appropriate place to either set a break point, or identify a target address to terminate the instruction step. If you suspect this is the case, add a NOP instruction to the while loop after the call to ToggleGPIOBit (see below), and retest. Note that if ToggleGPIOBit is a macro, there is no usable debug information generated. GDB is unlikely to be able to do the right thing.
static inline void __nop(void)
{
asm volatile ("nop");
}
Regards,
CodeRedSupport