📄 detecttarget.cmm
字号:
;****************************************************************************
;** detectTarget.CMM **
;** This script the target configuration **
;** Pass in &TARGET_TYPE **
;** **
;** Changes: **
;** 05-12-03 MSM6250 changes
;** 06-07-02 First version **
;** 09-25-02 Various changes **
;****************************************************************************
; The logic goes like this;
; Assume this is a surf target
; get the boot-mode pin settings and the MSM ID
; Boot Mode tells whether to load code into NOR/PSRAM/SRAM or SDRAM (for SURF)
; MSM ID tells whether the target is a MSM6100 or MSM6300 target.
;
local &msmId
;
;
IF STRING.SCAN("&TARGET_TYPE","MASTODON_SURF",0)>-1
(
;
; If the target has dip and rotary switch settings, read them
gosub GetSURFConfig
)
ELSE IF STRING.SCAN("&TARGET_TYPE","FFA",0)>-1
(
; found an FFA -- known to be NAND/16-bit SDRAM
&BOOT_MODE="NAND"
&SHADOW_MODE=0x0
)
ELSE
(
print "DetectSURFConfig: Please identify/implement the target type &TARGET_TYPE"
; implement different target types here, or fix the name used
)
;;-------------------------------------------------------------------------
;; TODO : Read HW_REVISION number here
;;-------------------------------------------------------------------------
; now find MSM type to know what type of MSM this is
;&msmId=data.long(RD:&HW_REVISION_NUMBER)
;IF &msmId==&HW_REVISION_NUMBER_MSM6250
; (
&TARGET_TYPE="&TARGET_TYPE&MSM6250"
; configure the JTAG clock
SYStem.JtagClock RTCK
; )
;ELSE
; (
; print "DetectTarget:ASIC MSM ID not recognized"
; )
print " &TARGET_TYPE"
print " Boot mode &BOOT_MODE"
ENDDO
;;-------------------------------------------------------------------
;
; Read DIP, Rotary, etc switches from SURF CPLDs
;
GetSURFConfig:
local &ConfigRegister &bootmodesw
; find the value of BOOT_MODE
; Bit 15 set to 1 signifies NAND and Bit 14 set to 1 signifies NOR
&ConfigRegister=data.word(RD:&SURF_CONFIG_REGISTER3)
&bootmodesw=&ConfigRegister&0x8000
IF &bootmodesw==0x8000
(
&BOOT_MODE="NAND"
)
ELSE
(
&BOOT_MODE="NOR"
)
RETURN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -