**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

Differences between revisions 5 and 6
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
 * You should now be stopped in the first instruction of the ResetISR function.  * You will now be stopped in the first instruction of the ResetISR function.

How do I debug from reset?

There is no convenient UI for this, so you will have to do this in several steps.

Case 1. I have ResetISR in my application

You can do this by changing the startup breakpoint. By default it is the first instruction in main().

  • Open the Debug Configuration for your application (Run->Open Debug Dialog).

  • Switch to the "Debugger tab".
  • In the "stop on startup at" field, enter ResetISR (or the name of the function called by the Reset vector if different)

  • Now Debug
  • You will now be stopped in the first instruction of the ResetISR function.

Case2. ResetISR is already in flash

First, you need to find the address of the reset vector. To do this,

  • Load your application and stop at main.
  • Now open the Peripherals view, and then click on "Flash_1". This will open a Memory window at address 0. Address 4 contains the address of the ResetISR function. Make a note of the address.
  • Stop debugging

Now, you need to set the startup breakpoint at this address.

  • Open the Debug Configuration for your application (Run->Open Debug Dialog).

  • Switch to the "Debugger tab".
  • In the "stop on startup at" field, enter the address you made a note of, prefixed by '*'. So, if the address was 0x3071, then enter *0x3071.
  • Now debug
  • You will now be stopped in the first instruction of the ResetISR function.

ResetDebugging (last edited 2008-12-04 16:41:06 by DerekMorris)