uish.s

来自「realview22.rar」· S 代码 · 共 54 行

S
54
字号
;;  Copyright ARM Ltd 2002. All rights reserved.
;;
;;  This implementation of __user_initial_stackheap places the
;;  heap at the location of the symbol bottom_of_heap.  
;;  This symbol is placed by the scatter file.  
;;
;;  It assumes that the application mode stack has been placed
;;  in the reset handler.  
;;
        PRESERVE8

        AREA   UISH, CODE, READONLY      ; name this block of code

                IMPORT __use_two_region_memory

                EXPORT stack_base

                IMPORT      ||Image$$STACKS$$ZI$$Base||
                IMPORT      ||Image$$STACKS$$ZI$$Limit||

stack_base      DCD         ||Image$$STACKS$$ZI$$Limit|| ; Note $$Limit is used for stack_base
stack_limit     DCD         ||Image$$STACKS$$ZI$$Base||


                IMPORT      ||Image$$HEAP$$ZI$$Base||
                IMPORT      ||Image$$HEAP$$ZI$$Limit||

heap_base       DCD         ||Image$$HEAP$$ZI$$Base||
heap_limit      DCD         ||Image$$HEAP$$ZI$$Limit||


        EXPORT __user_initial_stackheap

__user_initial_stackheap FUNCTION
    LDR   r0,heap_base
;;                                              
;;                                                      SVC stack inherited from init.s
;;
;;                                                      The mode stacks are set up in init.s with
;;                                                      offsets from stack_base. The SVC mode stack 
;;                                                      is set up last so R13 holds the SVC mode SP.
;;                                                      Before __user_initial_stackheap is called the
;;                                                      current value of R13 (SP) is copied into R1
;;                                                      so R1 does not need changing.

    LDR   r2,heap_limit
    LDR   r3,stack_limit
    MOV   pc,lr
    ENDFUNC
    
        END
        

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?