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.4 Cortex-M3 semihostingBecause Cortex-M3 does not provide vector catch on SVC, and <strong>the</strong> vector table contains jumpaddresses ra<strong>the</strong>r than instructions, semihosting cannot be supported using an SVC instruction.As an alternative, semihosting is implemented using a specific software breakpoint that isrecognized as a semihosting break by <strong>the</strong> debugger. The breakpoint instruction opcode containsan immediate 8-bit value. The C library uses <strong>the</strong> BKPT 0xAB opcode for semihosting. Thedebugger can test for this opcode pattern to determine if <strong>the</strong> breakpoint was a semihostingrequest or not.When <strong>the</strong> semihosting break is executed, <strong>the</strong> semihosting call is processed in <strong>the</strong> normal way.After processing, execution continues from <strong>the</strong> instruction that follows <strong>the</strong> software breakpoint.The debugger does not stop on <strong>the</strong> breakpoint.8.4.1 See alsoTasks• Adding an application SVC handler when using debug hardware on page 8-5.<strong>ARM</strong> DUI 0498F Copyright © 2010-2012 <strong>ARM</strong>. All rights reserved. 8-7ID021112Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!