?? bootarm.s
字號:
;*******************************************************************************
; Copyright Statement:
; --------------------
; This software is protected by Copyright and the information contained
; herein is confidential. The software may not be copied and the information
; contained herein may not be used or disclosed except with the written
; permission of MediaTek Inc. (C) 2004
;
;*******************************************************************************
;
;******************************************************************************
;
; Filename:
; ---------
; BOOTARM.S
;
; Project:
; --------
; DOWNLOAD AGENT
;
; Description:
; ------------
; This Module defines the boot sequence of asm level.
;
; Author:
; -------
; Jensen Hu
;
;*******************************************************************************
AREA |Init|, CODE, READONLY
|x$codeseg|
MODE_USR EQU 0X10
MODE_FIQ EQU 0X11
MODE_IRQ EQU 0X12
MODE_SVC EQU 0X13
MODE_ABT EQU 0X17
MODE_UNDEF EQU 0X1B
MODE_SYS EQU 0X1F
I_BIT EQU 0X80
F_BIT EQU 0X40
INT_SRAM_BASE EQU 0x40000000
STACK_PTR EQU 0x800
IMPORT C_Main
ENTRY
B ResetHandler
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ResetHandler
; Disable interrupt
MRS r0, cpsr
MOV r1, #(I_BIT|F_BIT)
ORR r0, r0, r1
MSR cpsr_cxsf, r0
; Set stack pointer to 0x40000800, the stack pool is from 0x40000800~0x40000000
MOV r1, #INT_SRAM_BASE
ADD r1, r1, #STACK_PTR
SUB r1, r1, #0x04
MOV sp, r1
; C_Main may be compiled by either ARM code or THUMB code, use BX to jump to C_Main to avoid undef instruction
LDR a4, =C_Main
BX a4
END
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -