debugging running program

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

debugging running program

312 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by internav on Tue Jan 28 09:20:29 MST 2014
how do you attach to a running program?  I am using lpcxpresso 6.1.4 and the target is a lpc1113/302.

In FAQ there is a topic on this and when i go to edit launch config, the debugger tab is different.  There is no target tab and no place to change the attach setting.

what am I missing?
0 Kudos
6 Replies

299 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by internav on Tue Jan 28 18:58:35 MST 2014
Hi,

My mistake, the flash was corrupt.

Now with the secondary bootloader and my program in flash, I can attach and debug.

But now the uart interrupt routine returns to neverland.  If my program is linked with the default script, ir runs fine in standalone mode.  With my script, it returns wrong.  here are the script files.  The code begins at 0x2000 and the bootloader has been changed from the normal 0x1000 to 0x2000 for the redirection.

added later:

I am using the system tick and that interrupt works fine.  Neither the systick or uart isrs are used in the bootloader.

tell me what other details you want.
0 Kudos

299 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Jan 28 13:57:21 MST 2014
Hi internav,
Could you please explain in details about your program flow? I think it is not there in your post. I suppose you are jumping to secondary bootloader  after some time.
Any way for better help and support please post details.
0 Kudos

299 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by internav on Tue Jan 28 13:16:40 MST 2014
Hi,

I don't see how this will work.  The code is loaded in flash with secondary  bootloader.  so i power up and  attach with emulator, and i'm already dead.
0 Kudos

299 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Jan 28 12:14:04 MST 2014
Hi internav,
Please put breakpoint in the function ResetISR(void) in file cr_startup_lpc11.c . The debug using step by step approach.
0 Kudos

299 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by internav on Tue Jan 28 11:54:18 MST 2014
Great that works.

I'm using the secondary bootloader to load another program.  Now that I load the debug session, I find I'm in the NMI handler.  I put a while(1) at the start of my main but i don't get that far.

So how do I trace- find out where I go wrong in the cr_startup_lpc11 startup code?
0 Kudos

298 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jan 28 09:30:16 MST 2014
You have chosen a "C/C++ Application" instead of the "C/C++ (NXP Semiconductors) MCU Application", which is why you see a different configuration.

The simplest way to create this is:
1. Delete your existing launch configuration
2. Create a new C/C++ (NXP Semiconductors)..." launch configuration

And edit it as described in the FAQ. We will update the FAQ to make this more obvious,
0 Kudos