m6250.cmm
来自「QUALCOMM JNAND DRIVER」· CMM 代码 · 共 186 行
CMM
186 行
;****************************************************************************
;** m6250.cmm **
;** This script sets up MSM6250 for software load **
;** and debug. **
;** **
;** Changes: **
;** 05-12-03 MSM6250 changes
;** 05-01-02 First version **
;** 09-25-02 Cleanup **
;****************************************************************************
;This .cmm script acts as a main routine for setting up a MSM6250 platform.
;
; detect if this script has already been run -- only do this for parts that
; get called when the jtag reconnects with the target
;
;
;
; CMM script variables
;
;
;
; image to load to target
global &ELFname
global &ELFdir
ENTRY &ELFname
IF "&ELFname"!=""
(
&ELFdir=OS.FILE.PATH(&ELFname)
//PRINT "&ELFdir"
&ELFname=OS.FILE.NAME(&ELFname)
//PRINT "&ELFname"
)
WinClear
System.Reset
map.reset
; WINDOW work, pre-load
;winpos X.start y.start x.width y.height x.scalearea y.scalearea name mode title
; WinPOS sets up the parameters for the next window-generating command
; start, width, height parameters can be in
; % (percentage) of the T32 app window, upper left is 0%,0%
; nn. (integer), in units of rows or columns of text
; for scale area, see online help (units of rows & cols only)
; Delete all existing windows.
WinPage.Reset
SCREEN.ON // refresh screen after every print command
;create CMM logging window, named LOG_WIN
WINPOS 50% 5% 50. 20. 0. 0. LOG_WIN NORMAL "CMM Log Window"
area
&DATE=CLOCK.DATE()
&TIME=CLOCK.TIME()
PRINT " "
PRINT "JLOAD &ELFname commenced &DATE at &TIME"
;
; system options
;
;
; Turbo mode of debug state accesses - CPU makes checks of memory access in debug mode
System.Option TURBO off
; Disable "Emulator berr error"
System.Option ShowError OFF
; Disassembler selection - Automatically selects correct one.
System.Option DisMode Auto
; select CPU and options
SYSTEM.CPU ARM926EJ
SYSTEM.OPTION BIGENDIAN OFF
SYSTEM.OPTION ENRESET ON
SYStem.JtagClock RTCK
system.up
;
; Setup MSM for download -- memory registers, GPIOs, Memory controller if needed
;
do m6250_reg.cmm
;----------------------------------------------------------------------------
;
; Setup environment defaults
;
Symbol.AsmFrame on
Symbol.CutLine 3
Symbol.Spath + ".."
Symbol.case off
;
;
; Download and set initial breakpoints
;
; load the image
IF "&ELFname"==""
(
area.create WARNING 120. 60.
AREA.view WARNING
AREA.select WARNING
PRINT " use 'DO JLOAD <buildtype>' to check memory config against loaded image!"
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
PRINT " "
WAIT 3.s
area.close WARNING
area.select A000
print "select file to program in browser: "
d.load.elf *.elf
)
ELSE
(
print "Loading &ELFname.elf target image "
data.load.elf &ELFdir\&ELFname.elf
)
; resets registers
register.reset
; setup breakpoints
break.delete /all
do breakpoints.cmm
tronchip.set RESET off
;
;
;
; Setup Path for source code (y.spath env variable)
;
;
do setupyspath.cmm
;
;
;
; Window Setup
;
;
;
do setupWindows.cmm
PRINT "Completed JLOAD &ELFname ..."
PRINT " ...for &TARGET_TYPE boot: &BOOT_MODE"
ENDDO
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?