12.07.2015 Views

ARM DS-5 Using the Debug Hardware Configuration Utilities

ARM DS-5 Using the Debug Hardware Configuration Utilities

ARM DS-5 Using the Debug Hardware Configuration Utilities

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Debug</strong>ging with your debug hardware unit8.9 Interaction between breakpoint handling in <strong>the</strong> debug hardware and yourdebuggerThe following describe <strong>the</strong> interaction between breakpoint handling in <strong>the</strong> debug hardware andbreakpoint handling in your debugger:Break details or break capabilitiesYou can find out what hardware breakpoint resources are available by viewing <strong>the</strong>break details or break capabilities in your debugger.Memory mapsYour debugger enables you to define a memory map to describe <strong>the</strong> layout andtype of memory in your system. When you set a breakpoint, areas of memory thatare marked as read-only, such as Flash and ROM, automatically use hardwareinstruction breakpoints. All o<strong>the</strong>r types of memory use software instructionbreakpoints by default.SteppingWhen you step through code, <strong>the</strong> debugger usually sets a temporary breakpointon <strong>the</strong> destination address. If <strong>the</strong> code is in read-only memory, or if <strong>the</strong> softwarebreakpoint implementation requires hardware assistance, a hardware breakpointis used for this. If you are unable to step, you might have to free up a hardwarebreakpoint resource.Some processors, such as <strong>ARM</strong>9, provide dedicated single-step hardware. debughardware uses this hardware if it is available, but steps larger than a singleinstruction might revert back to using breakpoints, to improve efficiency.NoteFor <strong>ARM</strong>7, <strong>ARM</strong>9, <strong>ARM</strong>11 or Cortex-A8 processors, interrupts are disabledwhen single-stepping with debug hardware. For <strong>the</strong> Cortex-M3 processor,interrupts are enabled when single-stepping with debug hardware.Interrupt behavior applies only to debug hardware single-instruction stepping.Higher-level stepping depends on <strong>the</strong> strategy in your debugger, that is, whe<strong>the</strong>ryou have used <strong>the</strong> place Breakpoint and run method, or <strong>the</strong> multiplesingle-instruction steps method.NoteWhen hardware single-step is used, debug hardware prevents <strong>the</strong> processor fromprocessing any pending interrupts.Resource allocation<strong>Debug</strong> hardware allocates hardware breakpoint resources as <strong>the</strong>y are received,ra<strong>the</strong>r than allocating all <strong>the</strong> resources at <strong>the</strong> same time when <strong>the</strong> debuggingsession begins. Therefore, if you attempt to set a breakpoint when <strong>the</strong>re areinsufficient resources available, debug hardware displays an error message assoon as you try to set <strong>the</strong> breakpoint, ra<strong>the</strong>r than waiting until debugging begins.8.9.1 See alsoConcepts• Semihosting on page 8-4• <strong>Hardware</strong> breakpoints on page 8-8• Software instruction breakpoints on page 8-9• Processor exceptions on page 8-10<strong>ARM</strong> DUI 0498F Copyright © 2010-2012 <strong>ARM</strong>. All rights reserved. 8-12ID021112Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!