boot2.s
来自「这是某个项目中使用的ARM7TDMI平台上ucos系统的bootloader」· S 代码 · 共 65 行
S
65 行
;-/****************************************************************************
;-** 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 + =
减小字号Ctrl + -
显示快捷键?