Debug lauch stops at 96%

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

Debug lauch stops at 96%

1,650 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fenyv on Mon Sep 19 04:44:53 MST 2011
[SIZE=2][FONT=Arial]Hello,[/FONT]
[FONT=Arial]I'm using LPCXpresso 4.0.6[/FONT][/SIZE][SIZE=2][FONT=Arial] with LPC1114 LPCXpresso Board. (Windows XP SP3, desktop computer, short USB cable, no USB HUB, tried on multiple USB ports of that computer, etc.)[/FONT]
[FONT=Arial]Compilation works. Having started debug mode, it writes "Target Ready", then it downloads the application program normally. Th[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]e[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial] download's counter reaches 100% and shows the[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial] elapsed[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial] time (in ms) it needed for download.[/FONT]
[FONT=Arial]When "Launching (my[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial] [/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]app[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]'s name[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]) D[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]ebug[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]"[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial] 's [/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]counter reaches 96%[/FONT][/SIZE][SIZE=2][FONT=Arial] (right after downloading), the Debug window opens. However, the green fillings at the small arrow of Reset and Run symbols rarely appear: most often they remain grey.[/FONT]
[FONT=Arial]The counter stops at this 96%[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial] (it is always 96%, regardless of green filling)[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]. Having some 5s time passed, [/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]"[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]Console[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]"[/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial] window writes "[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]<terminated> (my [/FONT][/SIZE][/SIZE][SIZE=2][FONT=Arial]app[/FONT][/SIZE][SIZE=2][SIZE=2][FONT=Arial]'s name) Debug [C/C++ application] C:\...". Note the LED on the LPC-Link shows continous communication during this 5s periode.[/FONT]
[FONT=Arial]At this time instant the Debug window closes.[/FONT]
[FONT=Arial]It is the same with LPCXpresso Board's processor and with my application PCB's processor (external and good power supply) and also with another LPCXpresso Board (with my apps PCB) with the same result. It also doesn't depend on changing USB port, killing USB connection from Windows' device list, disconnect/reconnect, PC reboot, etc.[/FONT]
[FONT=Arial]It simlpy can't enter debug mode any more.[/FONT]
[FONT=Arial]Can you help me?[/FONT]
[/SIZE][/SIZE]
0 Kudos
Reply
8 Replies

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fenyv on Tue Sep 20 08:59:58 MST 2011
Hi,
(Pulling ISP to low, resetting, and then releasing ISP pin doesn't help now. If the processor is caught by the hardfault loop because some bad flash content, then download also doesn't work, except when the vector capturing somehow manages to change MCU's start process. I've tried it many times at testing of watchdog operations :) .)

Anyway, I've created a new workspace and rebuilt my application rather than copying the old folder's content to the new one. Now the debugger can run again, I couldn't even see that "96%".
Thanks for the idee.
The old and the new (myproject).debug.launch files differ somewhat. The old one had some extra rows (relatively to the new one), like:

[LEFT][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][B]<booleanAttribute key="org.eclipse.cdt.debug.mi.core.breakpointsFullPath" value="true"/>[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f0055]
[SIZE=2][COLOR=#7f0055][B]<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="com.crt.ctrlcenter.cmdfactory"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="true"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="com.crt.ctrlcenter.CRTEmbeddedCDebugger"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>[/B][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f0055][B]<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>[/B][/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][B]<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">[/B][/SIZE]
[SIZE=2][B]... and, of course, the watch window's actual descriptors differ too.[/B][/SIZE]
[SIZE=2][/SIZE] [/LEFT]
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Sep 20 00:34:33 MST 2011
I suggest that you take a step back. It sounds like you have an unmodified LPCXpresso board?


[LIST]
[*] Create a new workspace.
[*] Import some of the standard examples for the LPCXpresso board that you have.
[*]Boot your board into ISP mode (to prevent any code that is already in the flash causing problems)...
[/LIST]
[INDENT]http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip
[/INDENT]
[LIST]
[*] Try to debug one of the standard examples.
[/LIST]
Can you successfully connect and debug?

Regards,
CodeRedSupport
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Sep 19 13:08:25 MST 2011
That's boot rom :eek:

Is your ISP pin still low?

See also: http://knowledgebase.nxp.com/showthread.php?t=1755
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fenyv on Mon Sep 19 08:50:15 MST 2011
I've found some funny green text in MCU debug log:
"GDB trying to set entry point of 0x0118, but correct entry is 0x1FFF10DA"
And a red line in consol's log:
"set mem inaccessible-by-default off"
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fenyv on Mon Sep 19 08:15:32 MST 2011
Hi Zero,
I've checked it...
However, it's been a good idee to toggle "verbose console mode", for having a more detailed debug log.
I'm attaching it.
Thank you...
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Sep 19 08:04:29 MST 2011
Did you check your initial breakpoint?

http://support.code-red-tech.com/CodeRedWiki/InitialBP?highlight=%28breakpoint%29

Are other projects (samples?) running?
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fenyv on Mon Sep 19 07:50:27 MST 2011
Hi,
When it terminates at 96%, it closes also the Debug window. The pause key also doesn't turn into brown (remains grey) up to this point.

I've given many resets by temporarly grounding P1.0 (of course, with unconnected LPC-Link, as I don't want to overload its reset outputy pin). It doesn't help now.

I know this methode because I had some hardfaults eralier. However, if it's trapped by a hardfault then download doesn't work (since it is not Target Ready stage) until asserting that P1.0->GND.

Now downloading does work, and it stops aftermath. The last few rows of the debug log:
[SIZE=2][LEFT]"
Emu(0): Conn&Reset. DpID: BB11477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0 Poll delay: 0.
NXP: LPC1114/302 Part ID: 0x2540102B
Connected: was_reset=false. was_stopped=false
v Registered license, download limit of 128K
Writing 21308 bytes to 0000 in Flash (assumed clock: 36.0MHz)
Verified-same page 0-5 with 21308 bytes in 4766msec
Flash write Done
nSRST assert (if available)
Executing in user flash.
"
[/LEFT]
[/SIZE]
0 Kudos
Reply

1,615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Sep 19 05:44:29 MST 2011
I would guess that your application is hard-faulting in the startup code before hitting the breakpoint on main(). Have you tried hitting the "pause" button to see where it stops? You could also try: http://support.code-red-tech.com/CodeRedWiki/ResetDebugging

There are also other FAQs on the code red site on how to get debug access to the chip. Take a look at them.
0 Kudos
Reply