📄 startup.s
字号:
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
;
; Use of this sample source code is subject to the terms of the Microsoft
; license agreement under which you licensed this sample source code. If
; you did not accept the terms of the license agreement, you are not
; authorized to use this sample source code. For the terms of the license,
; please see the license agreement between you and Microsoft or, if applicable,
; see the LICENSE.RTF on your install media or the root of your tools installation.
; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
;
;
; Portions Copyright (c) Texas Instruments. All rights reserved.
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
;------------------------------------------------------------------------------
;
; File: startup.s
;
; This code is intended to be used with hardware probe to flash NOR
; flash memory. It comprises two part - first hardware initialization
; (we need initialize SDRAM controler) and second - NOR flash erase
; and programming. It is assumed that user will download data to SDRAM
; between first and second step.
;
INCLUDE kxarm.h
INCLUDE omap2420.inc
INCLUDE bsp_cfg.inc
INCLUDE image_cfg.inc
TEXTAREA
IMPORT FlashMain
;-------------------------------------------------------------------------------
;
; Function: StartUp
;
;
LEAF_ENTRY StartUp
;---------------------------------------------------------------
; Initialize hardware
;---------------------------------------------------------------
;
; Hardware initialization needs specify CS3 initialization
; values for EMIFS. This code is intended to be used with
; NOR memory on CS3.
;
INCLUDE hwinit.s
b .
;---------------------------------------------------------------
; Erase NAND flash
;---------------------------------------------------------------
ldr sp, =0x40208000 ; 64KB stack
ldr r0, =0x00000000 ; offset
ldr r1, =0x00030000 ; size
ldr r2, =0x80001000 ; buffer
bl FlashMain ; Write memory
b .
ENTRY_END
END
;------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -