Files
Gen4_R-Car_Trace32/2_Trunk/demo/arm/hardware/dbpxa250/dbpxa250.cmm
2025-10-14 09:52:32 +09:00

131 lines
4.5 KiB
Plaintext

; --------------------------------------------------------------------------------
; @Title: Demo Script for DBPXA250 Evaluation Board setup with XScale PXA250 processor
; @Description:
;
; DBPXA250 Evaluation Board setup with XScale PXA250 processor.
;
; - little endian mode
; - Flash configuration is depending on S15 position
; S15 at no-dot position:
; boot ROM (flash) at 0x0--0x01ffffff
; application flash at 0x04000000--0x05ffffff
; S15 at dot position:
; application flash at 0x0--0x01ffffff
; boot ROM (flash) at 0x04000000--0x05ffffff
; - S14 is for write protect of ROM bank
; At no-dot position ROM is write protected
; - SRAM at 0x0a000000--0x0a0fffff
; - SDRAM at 0xa0000000--0xa3ffffff
;
;
; @Author: WRD
; @Board: DBPXA250
; @Chip: PXA250
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: dbpxa250.cmm 20803 2023-04-20 09:33:18Z bschroefel $
; wrd - 20.03.2002
; --------------------------------------------------------------------------------
; Select target controlled flash programming or TRACE32 tool based
; flash method; &flashtarget="yes" | "no"
&flashtarget="yes"
; --------------------------------------------------------------------------------
; CPU setup
SYStem.RESet
SYStem.CPU PXA250
;sys.option DynVector On
SYStem.Up
; Program GPIO for SRAM and nCS1 Flash access
Data.Set ASD:0x40e00008 %Long 0 ; GPLR2
Data.Set ASD:0x40e0000c %Long 0x8000 ; GPDR0
Data.Set ASD:0x40e00014 %Long 0x1ffff ; GPDR2
Data.Set ASD:0x40e00018 %Long 0x8000 ; GPSR0
Data.Set ASD:0x40e00038 %Long 0 ; GRER2
Data.Set ASD:0x40e00044 %Long 0 ; GFER2
Data.Set ASD:0x40e00054 %Long 0x80000000 ; GAFR0_L
Data.Set ASD:0x40e00064 %Long 0xaaaaaaaa ; GAFR2_L
Data.Set ASD:0x40e00068 %Long 0x2 ; GAFR2_U
; Setup chip selects
Data.Set ASD:0x48000008 %Long 0x24f224f2 ; MSC0
Data.Set ASD:0x4800000c %Long 0x3ff1a441 ; MSC1
Data.Set ASD:0x48000010 %Long 0x7ff17ff1 ; MSC2
; Setup DRAM controller
Data.Set ASD:0x48000014 %Long 0x00000001 ; MECR
Data.Set ASD:0x48000028 %Long 0x00010504 ; MCMEM0
Data.Set ASD:0x4800002c %Long 0x00010504 ; MCMEM1
Data.Set ASD:0x48000030 %Long 0x00010504 ; MCMEM0
Data.Set ASD:0x48000034 %Long 0x00010504 ; MCMEM1
Data.Set ASD:0x48000038 %Long 0x00004715 ; MCIO0
Data.Set ASD:0x4800003c %Long 0x00004715 ; MCIO1
Data.Set ASD:0x48000004 %Long 0x004a7018 ; MDREFR
Data.Set ASD:0x4800001c %Long 0x00000000 ; SXCNFG
Data.Set ASD:0x48000024 %Long 0x00000000 ; SXMRS
Data.Set ASD:0x48000018 %Long 0x00000000 ; SXLCR
Data.Set ASD:0x48000004 %Long Data.Long(ASD:0x48000004)|0x00050000 ; MDREFR
Data.Set ASD:0x48000004 %Long Data.Long(ASD:0x48000004)&0xffbfffff ; MDREFR
Data.Set ASD:0x48000004 %Long Data.Long(ASD:0x48000004)|0x00008000 ; MDREFR
Data.Set ASD:0x48000000 %Long 0x00001ac8 ; MDCNFG
WAIT 10.ms
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(D:0xa0000000)
&tmp = Data.Long(d:0xa0000000)
Data.Set ASD:0x48000000 %Long Data.Long(ASD:0x48000000)|1 ; MDCNFG
Data.Set ASD:0x48000040 %Long 0x0000000 ; MDMRS
; --------------------------------------------------------------------------------
; Flash declaration
; Boot and application flash each with 2 Intel I28F128J3 Flash
; Devices in 16 bit mode parallel connected to 32 bit data bus.
IF "&flashtarget"=="yes"
(
; Flash declaration for TRACE32 target based flash programming
FLASH.RESet
FLASH.Create 1. 0x0000000++0x1ffffff 0x40000 TARGET Long
FLASH.Create 2. 0x4000000++0x1ffffff 0x40000 TARGET Long
FLASH.TARGET 0x0a000000 0x0a002000 0x1000 ~~/demo/arm/flash/long/i28f200j3.bin
)
ELSE
(
; Flash declaration for TRACE32 tool based flash programming
FLASH.RESet
FLASH.Create 1. 0x0000000++0x1ffffff 0x40000 I28F200J3 Long
FLASH.Create 2. 0x4000000++0x1ffffff 0x40000 I28F200J3 Long
)
; --------------------------------------------------------------------------------
; Load demo application to SDRAM
; load demo file
Data.LOAD.Elf ~~~~/arm.elf
; initialize CPSR and stack pointer
Register.Set cpsr 0x13
Register.Set r13 0xa0001000
; set program counter at program start
Register.Set PC main
; open some windows
WinCLEAR
WinPOS 0% 0% 66% 50%
List.auto
WinPOS 66% 0%
Register.view /SpotLight
WinPOS 0% 50% 50% 50%
Frame /Locals /Caller
WinPOS 50% 50% 50% 50%
Var.Watch flags ast
ENDDO