lpcware

Strange behavior on debugger startup

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by tvink on Fri Jun 05 13:59:31 MST 2015
Hi,

I have an lpc2294/01 project.  It has been commented down to a boolean initialization, a GPIO init call, and a main loop that does nothing but toggle between two states. 
I have a break point set on bBitPolarity = FALSE which is the 1st instruction in main();

When I start the debugger using the link in the "start here" panel the "current" line rests on an instruction in a procedure that should be inaccessible.  it is never called ( due to commenting ).

Pressing F5 makes the current line, the one with my breakpoint in main().  Pressing F5 again takes me back to a different line in the inaccessible code.

Pressing F5 again brings me to the 1st line in the GPIO Init code... which is where 3 F5's would normally take me.

In this case the debugger seems to work properly after these steps.



However various seeming unimportant changes to the source code have made differences in the behavior.  In some variations, the debugger never seems to synchronise with the source code.

I have tried various restarts... exit lpcxpresso, unplug debugger ( its an LPC-Link ), power cycle target, full power cycle of PC, target.

I have even tried making a new project and importing my code and header files in.

My hardware has the pull down on RTCK to enable the JTAG port.
I have weak pull ups on P2.26 and P2.27 to select "internal flash memory" at boot.
I have a pull up on P0[14] to avoid entering ISP mode.


Something is messed up but I am at a loss as to where to go next.


Please help.

Outcomes