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

188 lines
5.2 KiB
Plaintext

; --------------------------------------------------------------------------------
; @Title: Example startup Script for TRITON evaluation board
; @Description:
;
; Example startup Script for TRITON evaluation board from
; Ka-Ro Electronics with XScale PXA250 or PXA255 processor.
;
; Memory locations for
; - TRITON-ETN/400/64S/32F/ETN/EXP
; - TRITON/400/64S/32F/UCB
; Flash at 0x00000000--0x01ffffff
; SDRAM at 0xa0000000--0xa3ffffff
;
; Memory locations for
; - TRITON-LP/300/16S/16F/ETN/EXP/I
; Flash at 0x00000000--0x00ffffff
; SDRAM at 0xa0000000--0xa0ffffff
;
;
; @Keywords: Ka-Ro, triton, Xscale
; @Author: WRD
; @Board: TRITON
; @Chip: PXA250, PXA255
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: triton.cmm 20803 2023-04-20 09:33:18Z bschroefel $
; wrd - 07.10.2003
; --------------------------------------------------------------------------------
; Select evaluation board and flash configuration
;
; Set default board selection by setting &evb and set board dependend
; flash configuration.
&evb="TRITON-ETN/400/64S/32F/ETN/EXP"
&flashsize=0x2000000
&flashwidth="Long"
;
; Select target controlled flash programming or TRACE32 tool based
; flash method. For default flash method set &flashtarget="tool" | "target"
&flashmethod="target controlled"
;
; Set default processor mounted on board by setting
; &processor="PXA250" | "PXA255"
&processor="PXA255"
; check and change settings with dialog box
GOSUB SelectBoard
; --------------------------------------------------------------------------------
; CPU setup
SYStem.RESet
SYStem.CPU &processor
SYStem.Option WaitReset ON
;diag 3211 ; needed for TRACE32 software before 13th Oct. 2003
SYStem.Up
; 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 "&flashmethod"=="target controlled"
(
; Flash declaration for TRACE32 target based flash programming
FLASH.RESet
FLASH.Create 1. 0x0000000++(&flashsize-1) 0x40000 TARGET &flashwidth
FLASH.TARGET 0xa0000000 0xa0002000 0x1000 ~~/demo/arm/flash/&flashwidth/i28f200j3.bin
)
ELSE
(
; Flash declaration for TRACE32 tool based flash programming
FLASH.RESet
FLASH.Create 1. 0x0000000++(&flashsize-1) 0x40000 I28F200J3 &flashwidth
)
; --------------------------------------------------------------------------------
; 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 /loclas /Caller
WinPOS 50% 50% 50% 50%
Var.Watch flags ast
ENDDO
; --------------------------------------------------------------------------------
; Function to select board and kind of flash programming
;
SelectBoard:
DIALOG.view
(
HEADER "TRITON board selection"
POS 1. 1. 12.
TEXT "Board"
POS 15. 1. 30.
BOARD: PULLDOWN "TRITON-ETN/400/64S/32F/ETN/EXP,TRITON-LP/300/16S/16F/ETN/EXP/I,TRITON/400/64S/32F/UCB"
(
)
POS 1. 2. 12.
TEXT "Processor"
POS 15. 2. 15.
XSCALE: PULLDOWN "PXA250,PXA255"
(
)
POS 1. 3. 12.
TEXT "Flash programming"
POS 15. 3. 15.
FLASH: PULLDOWN "tool based,target controlled"
(
)
POS 1. 5. 5.
DEFBUTTON "OK" "continue"
)
DIALOG.Set XSCALE "&processor"
DIALOG.Set BOARD "&evb"
DIALOG.Set FLASH "&flashmethod"
STOP
&evb=DIALOG.STRing(BOARD)
&processor=DIALOG.STRing(XSCALE)
&flashmethod=DIALOG.STRing(FLASH.state)
DIALOG.END
; set flash configuration depending on selected board
IF "&evb"=="TRITON-LP/300/16S/16F/ETN/EXP/I"
(
&flashsize=0x1000000
&flashwidth="Word"
)
ELSE
(
&flashsize=0x2000000
&flashwidth="Long"
)
RETURN