Debug problems

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

Debug problems

1,762 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by g4bch on Mon Apr 26 05:08:32 MST 2010
My LPCXpresso board seems to have developed a fault or I have pressed some buttons in the wrong order and upset it.
I connected the LPCXpresso with LPC1114 to the PC and after the new hardware wizard completed the set up of the LPC link, pressed the debug button to check out my project. It loaded without problem and as I single stepped through it; the second step I got an error. To help diagnose the problem I modified the offending line and restarted the debugger and at 96% was met by the following error messages.

Console window
No symbol "new" in current context.
set remotetimeout 60000

LPCXpresso: Error pop up
Error launching Debug/Bat.axf
03: Failed on chip set up: Et: Flash driver not ready.

I also got the same error message when trying to debug the Blinky project.
There does not seem to be any help information on the LPC link so I can't find any way of resetting, it if that is what it needs.

After losing the ability to use the LPC link In tried to investigate the original failure by selecting debug as local C/C== application. That resulted in even more errors being flagged, this time a Problem Occurred pop up window saying " 'Launching Bat.axf' has encountered a problem . Error creating session. The details are Cannot run program "gdb": Launching failed.
I am now stuck with this error and can't get the program back to trying to start the LPC link. I've tried all choices given in the debugger tab on the debug configuration window without success. All except MCU Debug (embedded target)give the same Launching failed error. MCU debug gives 2 LPCXpresso: Error pop up windows stating, SAX Error:Premature end of file at line:1 col1 in stream.
I get the same set of errors with the Blinky as my project, Bat.

I don't get any of the LPC options mentioned in the Debugger configuration thread.

Any ideas on how to fix it or is the board destined for the recycle bin?

Peter
0 Kudos
Reply
7 Replies

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Apr 27 06:46:22 MST 2010
Sorry - just realised that I was talking LPC17xx rather than LPC11xx. For LPC11xx you need to use Pin PIO0_1 rather than P2.10.

For information on ISP, please see the LPC11xx User Manual. Or googling for "ISP site:knowledgebase.nxp.com" will give quite a few hits from other posts in this forum.

Regards,
CodeRedSupport
0 Kudos
Reply

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by g4bch on Tue Apr 27 06:00:23 MST 2010
I've tried your suggestions unfortunately without any success. The sequence of events is outlined below.

Set Vector Catch to TRUE
Debug Blinky
LPC Error pop up
Error 02: Failed to connect: EM(07), invalid ACK returned from DP access.
Consol; as above plus:
Emu(0): Conn&Reset. Was: None. DpID: BB11477. Info=T1S6RGRIA

Ground P2.10
Ground RST  LED dims
Release RST  LED normal 
Release P2.10
Try to debug Blinky
Error 02 again
Consol:
No symbol "new" in current context.
set remotetimeout 60000

Turn OFF vector catch:
Debug Blinky
LPC error pop up with Error 3 again 

Leaving P2.10 connected to ground while trying to debug gives the same results

I can't find any reference to ISP or how to access it in the help. Isn't ISP what the LPC Link is supposed to be doing?

I don't understand how changing the clock speed on the target should upset it this much. On other processors I've used everything in the program memory is overwritten when the program is updated and the device starts normally. Is it using some kind of boot loader that has got corrupted in some way, I had assumed it was using JTAG and independent of target clock.
0 Kudos
Reply

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Apr 27 03:52:39 MST 2010

Quote: g4bch

The original project that caused the problem did try to change the clock speed. I haven't got the exact code here, but from memory it changed the PLL seting something like this.
LPC_SYSCON->SYSPLLCTRL    =0x2F  ;  // 12MHz x 16 / 4 = 48MHz
while (!(LPC_SYSCON->SYSPLLSTAT & 0x01));       /* Wait Until PLL Locked    */

The orignal error was that the program gave some sort of memory exception inthe while loop.


It sounds like whatever setting you applied to the PLL/clock has destablized the part.  This code is now resident in flash, it executes whenever you apply power  to the board. You can approach this problem in two ways. First, set the  vector catch option in your LPCXpresso project debug configuration to  'true':

Debug Configurations... -> Project -> Debugger (tab) -> Vector  catch (Target configuration)

The LPCXpresso debug will attempt to catch the part out of reset. If  this fails, you'll need to boot into the ISP. That is, GND P2.10, and  assert RST. Once in the ISP, the target clock configuration is stable,  and you should be able to connect. The first thing you'll want to do is  restore the previous clock setting so whatever you leave in flash  doesn't destablize the part again.

Regards,
CodeRedSupport
0 Kudos
Reply

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by g4bch on Tue Apr 27 01:59:38 MST 2010
I have tried the board on a different machine, this one a desk top with USB2 ports & powered hub.
Here is the sequence of events
When plugin in the hardware installation wizard installs correctly.
After running LPCXpresso, Blinky builds OK and after pressing the Debug button the found new hardware wizard starts together with a time out dialogue. The LPC-Link Debug Probe installs. ( another long wait for a restore point to be set ). New hardware available message pops up  and press Yes on the LPC_Link continue waiting dialogue.
Get LPCXpresso:Error pop
Error launching Debug\Blinky.axf  
03: Failed on chip setup: Et:Flash driver not ready.
Console message refelects the above error after
Found generic directory XML file in C:/nxp/lpcexpresso_3.2/bin/crt_directory.xml
It looks like the hardware has got curupted somehow. Is there any way of resetting it?
After reading the above reply I tried deirectly into the with the same results.

The original project that caused the problem did try to change the clock speed. I haven't got the exact code here, but from memory it changed the PLL seting something like this.
LPC_SYSCON->SYSPLLCTRL    =0x2F  ;  // 12MHz x 16 / 4 = 48MHz
while (!(LPC_SYSCON->SYSPLLSTAT & 0x01));       /* Wait Until PLL Locked    */

The orignal error was that the program gave some sort of memory exception inthe while loop.

Peter
0 Kudos
Reply

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Apr 26 09:51:58 MST 2010
Hi again,


Quote: g4bch

The board is currently running via a powered USB hub. I'll try running it direct, but my laptop is not exactly modern it only has one reliable USB port.


Hubs can definitely cause problems, so trying to connect without it in the loop is a good idea. [As an aside, some USB ports don't provide sufficient power - particularly if you have extra hardware attached to the LPCXpresso board - hence trying with a powered hub can sometimes also help!]

Quote: g4bch

The board did work until I tried to rebuild the project after modification when the problem started so I don't think that it is a hardware problem.,


Did you change code related to clocks/plls etc??

Anyway, let us know how you get on.

Regards
CodeRedSupport.
0 Kudos
Reply

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by g4bch on Mon Apr 26 09:38:43 MST 2010
Thanks for the reply
I haven't got the unit in front of me, but here are the answers I can give.

It is an unmodified board straight out of its packet.
I am running Windows XP SP2 on a laptop, no emulation.
The LPC link is being detected by the OS, when I plug it in it tells me it can run faster if I had a USB2 controller.
The board is currently running via a powered USB hub. I'll try running it direct, but my laptop is not exactly modern it only has one reliable USB port.
The board did work until I tried to rebuild the project after modification when the problem started so I don't think that it is a hardware problem., more a case of pressing buttons in the 'wrong order' and not knowing how to rectify it.
I'll try completely rebuilding the workspace  this evening when I get home and if that fails re-installing the S/W.

If it helps the LED on the LPC1114 board was flashing when I first powered up the board, it is now on continuously. I assumed the processor had the Blinky  program loaded at switch on.

Peter
0 Kudos
Reply

1,663 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Apr 26 08:36:27 MST 2010
Can you confirm a few more details for us?

Is this a "standard", unmodified LPCXpresso1114 board that you are trying to connect to and debug code on? In other words, you are not using the LPC-Link portion to debug another board, and you have not made any modifications to the LPC1114 portion of the LPCXpresso board (or mounted it on any other hardware)?

What operating system are you running on your PC? And is this a "real PC" or are you running a virtual/emulated Windows PC?

Is the LPC-Link actually being detected by Windows. It should show up in  (Windows 7) Start->Devices and Printers as a "USB Device with DFU  capabilities" until a debug session starts, and then as "LPC-Link  Probe".

If you are connecting to the board via a usb hub, please try connecting directly to your PC. Or if you are connecting directly to your PC, if you have a powered USB hub available, please try connecting via that? It would also be worth trying a different USB cable.

Can you try creating a [U][B]new[/B][/U] workspace (using File -> Switch Workspace) and reimport the LPC1114 examples (via Quickstart view, Import Example projects). Can you build these and then successfully debug one?

Regards,
CodeRedSupport
0 Kudos
Reply