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.14 <strong>Debug</strong>ging from resetYou can debug systems running in ROM. A typical embedded system has <strong>the</strong> applicationprogrammed in non-volatile memory, such as ROM or Flash. When target hardware is poweredup, <strong>the</strong> application starts running. When connecting <strong>the</strong> debugger to a target already running <strong>the</strong>application, <strong>the</strong> application stops at an arbitrary point in <strong>the</strong> code. The default behavior of <strong>the</strong>debugger is to stop <strong>the</strong> target on connection. Loading <strong>the</strong> image symbols gives you source codeview of <strong>the</strong> current location.This means that you can examine <strong>the</strong> state of <strong>the</strong> system and restart execution from <strong>the</strong> currentplace. In some cases, this is sufficient. However, in many cases it is preferable to restartexecution of <strong>the</strong> application as if from power-on. There are three ways to do this:• debugging with a simulated a reset• debugging with a reset register• debugging with a target reset.When you debug code that is running from ROM, you must ensure that at least one breakpointunit remains available so that you can set breakpoints on code in ROM, because you cannot usesoftware breakpoints for this purpose. On a processor without vector catch hardware, you mustdisable semihosting and vector catching as soon as possible after starting up <strong>the</strong> debugger. Thiscan reduce <strong>the</strong> chances of <strong>the</strong> debugger taking <strong>the</strong>se units for its own use.On <strong>ARM</strong> processors that use a breakpoint resource to implement software breakpoints, such as<strong>the</strong> <strong>ARM</strong>7TDMI, you must remove all software breakpoints if you are out of breakpointresources. This enables you to place a single hardware breakpoint in ROM.Ano<strong>the</strong>r factor in debugging a system in ROM is that <strong>the</strong> ROM image does not contain anydebug information. When debugging, symbol or source code information is available by loading<strong>the</strong> relevant information into <strong>the</strong> debugger from <strong>the</strong> ELF image on <strong>the</strong> host.8.14.1 See alsoTasks• Post-mortem debugging on page 8-2.Concepts• <strong>Debug</strong>ging with a simulated reset on page 8-19• <strong>Debug</strong>ging with a reset register on page 8-20• <strong>Debug</strong>ging with a target reset on page 8-21• <strong>Debug</strong>ging systems with ROM at <strong>the</strong> exception vector on page 8-22.<strong>ARM</strong> DUI 0498F Copyright © 2010-2012 <strong>ARM</strong>. All rights reserved. 8-18ID021112Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!