Can you use a BKPT opcode?

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

Can you use a BKPT opcode?

3,628 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Mon Apr 12 16:48:09 MST 2010
Can you use a BKPT opcode to break into the LPCXpresso debugger? Can this be used in the Reset_Handler or SystemInit routines to break into the debugger in the very early stages of execution?
0 Kudos
Reply
8 Replies

3,558 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Thu Apr 15 17:54:40 MST 2010
I solved my problem and thought I would post the fix. It was a screw-up on my part. I had two errors on the SWD connector wiring. I wired SWD pin 10, RESET, to pin 35 on the LPC1113/301 chip which is TRST. Fixing that improved things but it still was not perfect.

I wired SWD connector pin 8, TDI, to chip pin 32 which is TDI. In doing the wiring I assumed that there would be no harm in this connection since this is the normal connection for JTAG. Not so! It still was not working correctly until I cut the trace. Now all is well!

I would like to thank everyone for their help.

Pete.
0 Kudos
Reply

3,558 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Apr 13 23:18:04 MST 2010
I assume as you changed the chip to lpc1113 that you are not using the lpcxpresso board?

Can you reproduce the problem on lpcxpresso board? If you can please post your project. If not I suggest you have a hardware problem with your board.
0 Kudos
Reply

3,557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Tue Apr 13 20:55:19 MST 2010
I downloaded the new version of LPCXpresso V3.3.4 and installed it in a new directory and created a new workspace. I installed the examples and compiled blinky. I did change the oscillator source to RC and I changed the chip type to LPC1113/301. I made no other changes.

I still drop into HardFault. I have attached a screen shop.

This setup on this target board used to work OK, more or less. After a few GDB crashes I could get it to work properly. The breakpoint at the entry to main worked and interrupts worked. When I hit "resume" my app would run properly. I could stop it and re-start it OK. Now I am nowhere near that.

Did my new installation into a new directory create an entirely new environment? Does LPCXpresso put anything into the Windows regestry? Is there any mistake that I might have made in the settings in an old project that get carried over into my new installation? Such as Regestry settings, config files not in the install directory or workspace directory?

I have attached a shot of the break at HardFault this shows registers and the stack contents. I have also attached a shot of the SYSCTL registers.
0 Kudos
Reply

3,557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Apr 13 10:07:03 MST 2010
Can you reproduce this with Blinky (or one of the other examples) and tell us exactly (step by step) how to reproduce? We have not seen an issue like this.
0 Kudos
Reply

3,557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Tue Apr 13 09:49:23 MST 2010
Breakpoints are still giving me a problem. My code works properly if I power cycle the target after I download the image using "debug". The app recieves interrupts, uses timers with interrupts, and emits pulses as expected.

I set a breakpoint in my main a few lines down from the entry and that breakpoint works properly.

If I set the "stop on startup at:" Reset_Handler" or "main" it is ignored. The "stop on startup at:" enable box is marked. If I disable "stop on startup at:" and set the breakpoint on the first line of main myself the breakpoint is ignored. Even when the first breakpoint is ignored my second breakpoint continues to work properly.

Also when I set a breakpoint anywhere I get a yellow triangle with a "!" in it. If I hover over it I get a popup bubble that says; "Multiple markers at this line" and "unresolved breakpoint". However the breakpoint appears to work properly.
I don't understand the message "Multiple markers at this line", only the expected breakpoints are listed in the breakpoint panel.

What is happening here?
0 Kudos
Reply

3,557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Apr 12 23:40:06 MST 2010
To set change the initial breakpoint, please read this knowledgebase article. You can set the breakpoint on ResetISR (i.e the first statement after a reset).

http://lpcxpresso.code-red-tech.com/LPCXpresso/node/48
0 Kudos
Reply

3,557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Mon Apr 12 19:43:32 MST 2010
I have and it does not work. However I am getting such erratic results with breakpoints that I would like to know if it should work.
0 Kudos
Reply

3,557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Mon Apr 12 18:47:16 MST 2010
Try it and see?
0 Kudos
Reply