📄 jnand_addr_init.cmm
字号:
;============================================================================
; Name:
; JNAND_ADDR_INIT.CMM
;
; Variable initialization script used by both jnand.cmm and jnandtest.cmm
;
;
; Copyright (c) 2002 by QUALCOMM, Incorporated. All Rights Reserved.
;----------------------------------------------------------------------------
;============================================================================
;
; EDIT HISTORY FOR MODULE
;
; $Header: //depot/asic/MSMSHARED/tools/jnand/jnand_addr_init.cmm#3 $ $DateTime: 2004/02/26 14:43:26 $ $Author: dionh $
;
; when who what, where, why
; ------- --- --------------------------------------------------------
; 02/26/04 drh Add support for erasing entire NAND flash
; 02/06/03 pg Moved from ASWP402 server to ASWP401 server.
; 07/12/02 drh Added InitBootCmd definition
; 07/06/02 drh Created
;
;============================================================================;
;-------------------------------------------------------------------------------
; This structure is used to communcate between TRACE32 Debugger and
; our FLASH plug-in.
;-------------------------------------------------------------------------------
;
; struct type_jtag_flash_param {
; uint32 flashaddr; // offset 0x00
; uint32 flashwidth; // offset 0x04
; uint32 width; // offset 0x08
; uint32 offset; // offset 0x0C
; uint32 addr; // offset 0x10 in: address of the flash to write/erase
; uint32 size; // offset 0x14 in: size of data to write/erase
; uint32 reserved; // offset 0x18
; uint32 status; // offset 0x1C in: 1=program, 2=erase, 5=erase, out: 0=o.k., 0x100=fail
; byte data[0x20000]; /offset 0x20 // give 128K worth of buffer
; // this is where TRACE32 will store data that
; // we'll be writing to the FLASH
; };
;-------------------------------------------------------------------------------
; These variables implement the structure above in PRACTICE variables
;
; &JnandCodeAddr and &JnandParamAddr come from a generated file and are
; the only varibles which contain any MSM specific information
;-------------------------------------------------------------------------------
;
GLOBAL &StartAddr &ParmBlk
GLOBAL &ParmFlashaddr &ParmFlashwidth &ParmWidth
GLOBAL &ParmOffset &ParmAddr &ParmSize
GLOBAL &ParmReserved &ParmStatus &ParmCmd &ParmData
GLOBAL &ReportBytesGap &ReportBlocksGap &ReportImageSize
GLOBAL &EraseCmd &ProgramCmd &InitCmd &InitBootCmd &FinishCmd
GLOBAL &TestCmd &ReportCmd &VerifyCmd &EraseChipCmd &DumpCmd
GLOBAL &ReportInt &Result &CmdName
&StartAddr= &JnandCodeAddr
&ParmBlk= &JnandParamAddr
;print "parm block at " &ParmBlk
; addresses of contents of parameter block
;
&ParmFlashaddr= &ParmBlk+0x00
&ParmFlashwidth= &ParmBlk+0x04
&ParmWidth= &ParmBlk+0x08
&ParmOffset= &ParmBlk+0x0C
&ParmAddr= &ParmBlk+0x10
&ParmSize= &ParmBlk+0x14
&ParmReserved= &ParmBlk+0x18
&ParmStatus= &ParmBlk+0x1C
&ParmCmd= &ParmBlk+0x1C
&ParmData= &ParmBlk+0x20
&ReportBytesGap= &ParmBlk+0x00
&ReportBlocksGap= &ParmBlk+0x04
&ReportImageSize= &ParmBlk+0x08
; command values for parameter block
;
&EraseCmd= 0x02 ;; Lauterbach cmd to erase flash
&ProgramCmd= 0x01 ;; Lauterbach cmd to program flash
&InitCmd= 0x09 ;; our cmd to probe and bad block check to happen
&FinishCmd= 0x0A ;; our cmd to cause RAM copy of block map to be written
&TestCmd= 0x0B ;; our cmd to cause self test
&ReportCmd= 0x0C ;; our cmd to cause a report of bad blocks
&VerifyCmd= 0x0D ;; our cmd to cause verify of spans
&InitBootCmd= 0x0E ;; our cmd to init into boot block program mode
&EraseChipCmd= 0x20 ;; our cmd to erase entire NAND flash
&DumpCmd= 0x21 ;; our cmd to dump NAND flash
; misc
;
&ReportInt= 0
&Result= 0x0
&CmdName= "No command yet"
enddo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -