Nxp Semiconductors OM13014,598 Fiche De Données
NXP Semiconductors
LPCXpresso
Getting started with NXP LPCXpresso
LPCXpresso
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User guide
Rev. 11.2 — 11 July 2012
23 of 48
Fig 26. Selecting correct part number
6.2.3 Optimization issues
When optimization is enabled, it will reorder code. What this means is that the code from
multiple C lines will be intermingled. In addition, assignments and initializations might be
pulled out of loops so they are only executed once. Changes like these will make the
code confusing to debug. Some symptoms you might see are breakpoints that only work
the first time through, or seeing the debugger’s current line indicator fail to advance or
even move backwards when you click step. It is best to always use –O0 for debugging.
Since optimization can make such a big difference in code size and performance, it is a
good idea to test your project with optimization and plan for a final build that is optimized.
multiple C lines will be intermingled. In addition, assignments and initializations might be
pulled out of loops so they are only executed once. Changes like these will make the
code confusing to debug. Some symptoms you might see are breakpoints that only work
the first time through, or seeing the debugger’s current line indicator fail to advance or
even move backwards when you click step. It is best to always use –O0 for debugging.
Since optimization can make such a big difference in code size and performance, it is a
good idea to test your project with optimization and plan for a final build that is optimized.
6.2.4 Displaying assembly instructions
Click the i-> icon. This changes the Instruction Stepping Mode to step by processor
instructions, rather than source lines. This also shows the disassembly view around the
current instruction.
instructions, rather than source lines. This also shows the disassembly view around the
current instruction.
6.2.5 Exiting debug mode and stopping debugging
To stop debug press the ‘Stop’ button (red square) shown in the toolbar at the top of the
debug view.
debug view.
6.2.6 Recovery of board
After playing around with the LPCXpresso board, especially when trying out new PLL
settings, reconfiguring the SWDIO/SWDCLK pin functions, disabling AHBCLKCTRL bits,
or trying power down modes, the board may be disabled and no longer enter debug
mode. This is caused by code on the on-board flash that incorrectly disables the system
clocks or the debug port soon after reset before the debugger can connect to the core.
The easiest solution to this is to load a working project into LPCXpresso, ground the ISP
pin (see the chip User’s Manual for details) and then try to enter debug mode.
settings, reconfiguring the SWDIO/SWDCLK pin functions, disabling AHBCLKCTRL bits,
or trying power down modes, the board may be disabled and no longer enter debug
mode. This is caused by code on the on-board flash that incorrectly disables the system
clocks or the debug port soon after reset before the debugger can connect to the core.
The easiest solution to this is to load a working project into LPCXpresso, ground the ISP
pin (see the chip User’s Manual for details) and then try to enter debug mode.
Grounding the ISP pin during reset will put the target MCU into In-System Programming
(ISP) mode. It will wait for a command through the serial port or the USB port. This
(ISP) mode. It will wait for a command through the serial port or the USB port. This