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

📄 boot2.s

📁 这是某个项目中使用的ARM7TDMI平台上ucos系统的bootloader
💻 S
字号:
;-/****************************************************************************
;-**  Copyright  (c)  2004,  UTStarcom, Inc.
;-**          All Rights Reserved.
;-**
;-**  Subsystem  : Boot Support
;-**  File       : boot2.s
;-**  Created By : Sean Yang
;-**  Created On : 2005.01.25
;-**
;-**  Purpose:
;-**    Start up the boot loader
;-**
;-**  Note:
;-**
;-****************************************************************************/

;- Get the start Ram address
INTERNAL_SRAM_SIZE		EQU		0x00340000		; temp stack for boot loader
MAIN_ADDR   					EQU 	0x00200000

;------------------------------------------------------------------------------
;- Area Definition
;------------------------------------------------------------------------------

                AREA        reset, CODE, READONLY
                ENTRY
				EXPORT		entry
entry

;------------------------------------------------------------------------------
;- Branch on C code Main function (with interworking)
;----------------------------------------------------
;- Branch must be performed by an interworking call as either an ARM or Thumb
;- main C function must be supported. This makes the code not position-
;- independent. A Branch with link would generate errors
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;- check version, and copy version from FLASH to SRAM
;------------------------------------------------------------------------------
            IMPORT   check_version

            ldr     r13,=INTERNAL_SRAM_SIZE    ; temporary stack in internal Ram
            bl      check_version

;------------------------------------------------------------------------------
;- Jump to entry address in SRAM
;------------------------------------------------------------------------------

;The version program should clear external SRAM from 0x300000 to 0x380000

            ldr         r0, =MAIN_ADDR
            mov         lr, pc
            bx          r0

;------------------------------------------------------------------------------
;- Loop for ever
;---------------
;- End of application. Normally, never occur.
;- Could jump on Software Reset ( B 0x0 ).
;------------------------------------------------------------------------------
End
            b           End

    END

⌨️ 快捷键说明

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