10.07.2015 Views

PDF version - ARM Information Center

PDF version - ARM Information Center

PDF version - ARM Information Center

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>ARM</strong>과 Thumb의 인터워킹AREA Arm,CODE,READONLY ; Name this block of code.IMPORT ThumbProgENTRY; Mark 1st instruction to call.<strong>ARM</strong>ProgMOV R0,#1; Set R0 to show in <strong>ARM</strong> code.BL ThumbProg ; Call Thumb subroutine.MOV R2,#3; Set R2 to show returned to <strong>ARM</strong>.; Terminate execution.MOV R0, #0x18; angel_SWIreason_ReportExceptionLDR R1, =0x20026; ADP_Stopped_ApplicationExitSVC 0x123456; <strong>ARM</strong> semihosting (formerly SWI)END; *******; thumb.s; *******AREA Thumb,CODE,READONLY ; Name this block of code.THUMB; Subsequent instructions are Thumb.EXPORT ThumbProgThumbProgMOVS R1, #2; Set R1 to show reached Thumb code.BX lr ; Return to the <strong>ARM</strong> function.END; Mark end of this file.다음 단계에 따라 모듈을 빌드하고 링크합니다.1. <strong>ARM</strong> 코드를 인터워킹용으로 어셈블하려면 다음을 입력합니다.armasm --debug --apcs=/interwork arm.s2. Thumb 코드를 인터워킹용으로 어셈블하려면 다음을 입력합니다.armasm --thumb --debug --apcs=/interwork thumb.s3. 객체 파일을 링크하려면 다음을 입력합니다.armlink arm.o thumb.o -o count.axf또는 인터워킹 베니어의 크기를 보려면 다음을 입력합니다.armlink arm.o thumb.o -o count.axf --info=veneers4. 호환되는 디버거를 적절한 디버그 타겟과 함께 사용하여 이미지를 실행합니다.5-10 Copyright © 2002-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0203IKNon-ConfidentialUnrestricted Access

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

Saved successfully!

Ooh no, something went wrong!