flag while debugging

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

flag while debugging

1,047 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ronkrem on Thu Jun 13 23:52:54 MST 2013
[SIZE=2]I am using LPCXpresso v4.2.3 [Build 292] [30/05/2012] on a LPC11U35/401. Is there a variable or something similar my program can access that indicates it is being supervised by the xpresso debugger? I need to exclude some code if the debugger is in control, but not otherwise.[/SIZE]
[SIZE=2]Many thanks.[/SIZE]
0 Kudos
Reply
4 Replies

1,030 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ronkrem on Fri Jun 21 00:21:04 MST 2013
Yes, I could check SYSRST. Many thanks.
0 Kudos
Reply

1,030 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Jun 14 17:49:06 MST 2013

Quote: ronkrem
I have an LCD display that is only reset by power up.


What about reading SYSRSTSTAT?
0 Kudos
Reply

1,030 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ronkrem on Fri Jun 14 06:06:34 MST 2013
I have an LCD display that is only reset by power up. There is no programmable reset line. The LCD initialisation code can only run once after the PCB is powered up. Running it again destroys the initialisation. Thus I power up the board, the already loaded code runs, I start the LPC-Link debugger from LPCXpresso and so the LCD initialisation code runs again, corrupting the display. Note that the LPC-Link is always connected.

What I was hoping for was something the running code could test so it could tell if it was being monitored by the debugger or not, and consequently skip the init code.

I have a workaround where I put a switch on one of the board's IO lines, put a while loop just after the GPIOInit call, and hold this set while powering up the board and starting the debugger. Once it is ready to I release the switch and press the debugger's run button. This prevents the processor from running the code on power up. Arkward as you can understand.
Regards, Ron
0 Kudos
Reply

1,030 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jun 14 00:26:03 MST 2013
Can you explain in more detail exactly what sort of code you are trying to exclude?

This earlier thread may provide some useful background information for you too....

http://knowledgebase.nxp.com/showthread.php?t=1921

Regards,
CodeRedSupport
0 Kudos
Reply