embeded/Cortex-M3 Ti2017.12.21 17:33

음.. bl_startup_rvmdk.S를 보니

아래와 같은 구문이 정상적일 경우 점프할 주소를 넣어 주는 구문인가?

어셈블리를 좀 봐야겠네...


;******************************************************************************

;

; The reset handler, which gets called when the processor starts.

;

;******************************************************************************

    export  Reset_Handler

Reset_Handler

    ;

    ; Initialize the processor.

    ;

    bl      ProcessorInit


    ;

    ; Branch to the SRAM copy of the reset handler.

    ;

    ldr     pc, =Reset_Handler_In_SRAM


;******************************************************************************

;

; Initialize the processor by copying the boot loader from flash to SRAM, zero

; filling the .bss section, and moving the vector table to the beginning of

; SRAM.  The return address is modified to point to the SRAM copy of the boot

; loader instead of the flash copy, resulting in a branch to the copy now in

; SRAM.

;

;******************************************************************************

    export  ProcessorInit

ProcessorInit

    ;

    ; Copy the code image from flash to SRAM.

    ;

    if      :def:_FLASH_PATCH_COMPATIBLE

    movs    r0, #0x1000

    else

    movs    r0, #0x0000

    endif

    movs    r1, #0x0000

    movt    r1, #0x2000

    import  ||Image$$SRAM$$ZI$$Base||

    ldr     r2, =||Image$$SRAM$$ZI$$Base||

copy_loop

        ldr     r3, [r0], #4

        str     r3, [r1], #4

        cmp     r1, r2

        blt     copy_loop


    ;

    ; Zero fill the .bss section.

    ;

    movs    r0, #0x0000

    import  ||Image$$SRAM$$ZI$$Limit||

    ldr     r2, =||Image$$SRAM$$ZI$$Limit||

zero_loop

        str     r0, [r1], #4

        cmp     r1, r2

        blt     zero_loop


    ;

    ; Set the vector table pointer to the beginning of SRAM.

    ;

    movw    r0, #(NVIC_VTABLE & 0xffff)

    movt    r0, #(NVIC_VTABLE >> 16)

    movs    r1, #0x0000

    movt    r1, #0x2000

    str     r1, [r0]


    ;

    ; Return to the caller.

    ;

    bx      lr 


[링크 : https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/100834]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

CMSIS for stellaris/TM4C  (0) 2018.02.12
cortex m3 어셈블리 bl, cbz  (0) 2018.01.04
cortex-m3 keil 부트로더  (0) 2017.12.21
keil sct - 링커 스크립트  (0) 2017.12.11
lm3s 부트로더  (0) 2017.11.21
JTAG / SWD 핀 연결방법 조사..  (0) 2017.04.04
Posted by 구차니

댓글을 달아 주세요