⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bootarm.s

📁 MTK手机平台下载工具FLASHTOOL驱动源码
💻 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 + -