10.07.2015 Views

PDF version - ARM Information Center

PDF version - ARM Information Center

PDF version - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

디버그 통신 채널참고DCC 레지스터 액세스에 대한 자세한 내용은 해당 프로세서의 기술 참조 문서를참조하십시오.7.2.1 인터럽트 구동 디버그 통신예제 7-1에는 간단한 DCC 루틴을 보여 주는 코드 조각이 나와 있습니다. 디버그도구에서 보낸 텍스트는 대소문자가 변경되어 타겟에서 다시 표시됩니다. 이 예제 (install_directory\RVDS\Examples\...\dcc\) 에서 실행 가능 이미지를 빌드한 다음 JTAG 포트를 사용하여 타겟에서 해당 이미지를 실행합니다. RealView 디버거의 통신 채널 뷰를 사용하여 타겟과 통신할 수 있습니다. 자세한 내용은 RealView디버거 사용 설명서를 참조하십시오.예제 7-1 타겟 및 호스트 디버그 도구 간의 DCC 통신AREA DCC, CODE, READONLYENTRYpollinMRC p14,0,r3,$SCReg,0 ; Read Debug Status and Control RegisterTST r3, $TestFullBEQ pollin ; If R bit clear then loopreadMRC p14,0,r0,$DReg,0 ; read word into r0char_masksMOV r4, #0x20 ; EOR mask to invert case of a char by flipping bit 6MOV r5, #0xC0 ; AND mask to clear all but top 2 bits of each charchangeCaseTST r0, r5 ; Check whether character value >0x3FEORNE r0, r0, r4 ; If character value >0x3F, flip bit 6 to invert caseMOV r5, r5, LSL #0x8 ; Shift the character mask left by 1 charMOVS r4, r4, LSL #0x8 ; Shift the case inverter pattern left by 1 charBNE changeCase ; Branch to do the next charpolloutMRC p14,0,r3,$SCReg,0 ; Read Debug Status and Control RegisterTST r3, $TestEmptyBNE pollout ; if W set, register still fullwriteMCR p14,0,r0,$DReg,0 ; Write word from r0B pollin ; Loop for more words to readEND7-4 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!