?? 2443_bootup.cmm
字號:
;------------------------------------------------------------------------------;
; Project Path ;
;------------------------------------------------------------------------------;
&PRJPATH="E:\Work\S3C2443\sw"
area.create A000 80. 05.
area.view A000
area.select A000
;------------------------------------------------------------------------------;
; Configuring JTAG interface ;
;------------------------------------------------------------------------------;
print "Reset System"
SYStem.Down
sYmbol.RESet
sys.reset
MMU.RESet
print "Configuring S3C2443"
SYStem.CPU arm920T
SYStem.JtagClock 10M
SYStem.Option EnReset OFF
SYStem.Option WaitReset ON
SYStem.Option ResBreak OFF
SYStem.Option dacr on
print "system going up"
SYStem.Up
;------------------------------------------------------------------------------;
; System controller setting ;
;------------------------------------------------------------------------------;
print "Clock & Timer setting"
Register.Set cpsr (r(cpsr)&0xffffff00)|0xd3
Data.Set SD:0x53000000 %LE %LONG 0x0 ;disable watchdog
Data.Set SD:0x4C000024 %LE %LONG 0x1D ;set clkdiv(1:4:8) - CLKDIV0
Data.Set SD:0x4C000010 %LE %LONG 0x5C0301 ;Mpll:400MHz(92,3,1) - MPLLCON
Data.Set SD:0x4C000018 %LE %LONG 0x280101 ;Epll:96MHz(40,1,1) - EPLLCON
Data.Set SD:0x4C000020 %LE %LONG 0x10 ;MPLL output
Data.Set SD:0x560000e0 %LE %LONG 0xaaaaaaaa ;GPKCON to SDATA[31:16],
;because default value is input
;------------------------------------------------------------------------------;
; SDRAM Initialization ;
;------------------------------------------------------------------------------;
print "SDRAM Initialization"
print "Select memory type 1) mSDRAM, 2) mDDR SDRAM"
print "select the number : "
enter &choice
if &choice==1 ; mSDR
(
;1st : configuration register
d.s SD:0x48000000 %LE %LONG 0x48904 ; BANKCFG
d.s SD:0x48000004 %LE %LONG 0x40 ; BANKCON1 - mobile dram controller
)
else if &choice==2 ; mDDR
(
;1st : configuration register
d.s SD:0x48000000 %LE %LONG 0x4920D ; BANKCFG
d.s SD:0x48000004 %LE %LONG 0x44000040 ; BANKCON1 - mobile dram controller
)
;2nd
d.s SD:0x48000008 %LE %LONG 0x57003a ; BANKCON2 - timing parameter
d.s SD:0x4800000c %LE %LONG 0x80000030 ; BANKCON3 - EMRS register
;3rd : issue precharge all command
d.s SD:0x48000004 %LE %LONG 0x41
;4th : make refresh cycle 255clk
d.s SD:0x48000010 %LE %LONG 0xff
;5th : wait 2 auto-refresh cycle: 120clk?
r.s r0 r(r0)
;6th : issue MRS
d.s SD:0x48000004 %LE %LONG 0x42
;7th : set normal operation refresh cycle
d.s SD:0x48000010 %LE %LONG 0x313
;8th : issue EMRS
d.s SD:0x48000004 %LE %LONG 0x43
;9th : issue Normal mode
d.s SD:0x48000004 %LE %LONG 0x40
print "DRAM Initialization done..."
;------------------------------------------------------------------------------;
; Load IMAGE ;
;------------------------------------------------------------------------------;
print "loading"
; sys.o turbo on
;;; Audio test
; Data.LOAD.binary "&(PRJPATH)\data\audio\t1.wav" 0x31000000 ; for audio test
;;; Writing OneNAND
Data.LOAD.binary "&(PRJPATH)\2443BL_ONE\2443BL_ONE.bin" 0x31500000 ; for OneNAND test
Data.LOAD.binary "&(PRJPATH)\2443MON_U\2443MON_U.bin" 0x31500800 ; for writing OneNAND[Umon RO=0x30000000]
; Data.LOAD.elf "&(PRJPATH)\2443BL_ONE\Debug\2443BL_ONE.axf" ; for OneNAND test
;;; Writing NAND
; Data.LOAD.binary "&(PRJPATH)\2443BL_ONE\2443BL_NAND.bin" 0x30100000 ; for NAND test
; Data.LOAD.binary "&(PRJPATH)\2443MON_U\2443MON_U.bin" 0x30104000 ; for writing small NAND[Umon RO=0x30000000]
; Data.LOAD.binary "&(PRJPATH)\2443MON_U\2443MON_U.bin" 0x30120000 ; for writing large NAND[Umon RO=0x30000000]
;;; Upload Mon code
; Data.LOAD.Elf "&(PRJPATH)\2443MON_U\Debug\2443MON_U.axf" ; mon code test
;;; Upload Test code
Data.LOAD.Elf "&(PRJPATH)\2443TEST\Debug\2443_TEST.axf" ; test code test
; Register.Set pc 0x30000000 ; for binary up
; sys.o turbo off
;------------------------------------------------------------------------------;
; Set Startup Condition ;
;------------------------------------------------------------------------------;
mmu.cid 0:0 4000
print "S3C2443 Test"
go
enddo
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -