This commit is contained in:
2025-11-10 16:22:19 +09:00
parent 27bce98882
commit 56d7259bc5

View File

@@ -1,165 +0,0 @@
; --------------------------------------------------------------------------------
; @Title: Simple demo script for R8A779G-CR52 on WhiteHawk (RAM)
; @Description:
; Loads the sieve demo application into RAM and sets up a demo debug
; scenario.
; Use this script for getting started.
; Prerequisites:
; * Connect Debug Cable/Combiprobe to CN1 (Main JTAG)
; * Set boot core to Cortex-R52 and main JTAG to CoreSight. This can either be
; done via a switch board or by programming the CPLD.
;
; Switch MD (Switch SW1 Pin[1:8]) settings. Mode switch board is connected to CN9 on the WhiteHawk-CPU board:
; * Cortex-R52 boot
; MD6 = 1 (SW1[1] = OFF)
; MD7 = 1 (SW1[2] = OFF)
; * SCIF download mode (not boot code is executed)
; (SW1[3] = OFF)
; MD8 = 1 (SW1[4] = OFF)
; MD4 = 1 (SW1[5] = OFF)
; MD3 = 1 (SW1[6] = OFF)
; MD2 = 1 (SW1[7] = OFF)
; MD1 = 1 (SW1[8] = OFF)
; * Normal boot:
; MD5 = 0 (SW2[1] = OFF)
; MD35 = 0 (SW2[2] = ON)
; * Main JTAG = CoreSight, Sub JTAG = Normal Function
; MDT0 = 0 (SW2[3] = ON)
; MD21 = 1 (SW2[4] = OFF)
; MD20 = 0 (SW2[5] = ON)
; MD11 = 0 (SW2[6] = ON)
; MD10 = 0 (SW2[7] = ON)
; (SW2[8] = OFF)
;
; @Keywords: ARM, Cortex-R52
; @Props: Confidential
; @Author: BES
; @Board: WhiteHawk
; @Chip: R8A779G
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: r_carv4h-cr52_sieve_sram.cmm 19524 2022-06-20 07:59:40Z bschroefel $
;WinCLEAR
; --------------------------------------------------------------------------------
; Check prerequisites
IF VERSION.BUILD.BASE()<145267.
(
PRINT %ERROR "Please use more recent Software! Contact support@lauterbach.com."
ENDDO
)
; --------------------------------------------------------------------------------
; Initialize and start the debugger
;RESet
;SYStem.RESet
SYStem.CPU R8A779G-CR52
SYStem.MemAccess DAP
SYStem.JtagClock 10MHz
SYStem.Option.DUALPORT ON
SYStem.Mode.NoDebug
SYStem.Mode.Attach
;CORE.ASSIGN 1.
Trace.DISable
ETM.OFF
;SYStem.Up
;CORE 0.
Break
;GOSUB EnableATCM "0xE4000000"
; --------------------------------------------------------------------------------
; DRCR.RBE=0 (RPC Read cache = OFF) for flash region access
;Data.Set AD:0xEE20000C %LE %Long 0yXXXXxxxxXXXXxxxxXXXXxxx0XXXXxxxx
;Data.Set HD:0xE6170334 %LE %Long 0xE6300000
;Data.Set HD:0xE617033C %LE %Long 0xE6300000
;Data.Set HD:0xE617033C %LE %Long 0xE6300000
;Data.Set HD:0xE617033C %LE %Long 0xE6300011
;slee - Core1
;Data.Set HD:0xE6170374 %LE %Long 0xE6300000
;Data.Set HD:0xE617037C %LE %Long 0xE6300000
;Data.Set HD:0xE617037C %LE %Long 0xE6300000
;Data.Set HD:0xE617037C %LE %Long 0xE6300011
;slee - Core2
;Data.Set HD:0xE61703B4 %LE %Long 0xE6300000
;Data.Set HD:0xE61703BC %LE %Long 0xE6300000
;Data.Set HD:0xE61703BC %LE %Long 0xE6300000
;Data.Set HD:0xE61703BC %LE %Long 0xE6300011
; --------------------------------------------------------------------------------
; Load demo program (uses internal RAM only)
;Data.LOAD.Elf "C:\Renesas\adas_prk_3_r770\BSW_RTE\out\ADASPRK3.elf" /nocode
;Data.LOAD.Elf "C:\Renesas\adas_prk_3_r770\BSW_RTE\out\ADASPRK3.elf"
Data.LOAD.Elf "C:\Users\a5134225\Downloads\20251002_debug_files\Binary\TIMEOUT_60ms\ADASPRK3.elf" /nocode
; ============= Core 0
Core.select 2
register.set pc intvect_CoreExceptions
Core.select 0
;register.set pc brsStartupEntryHyp
;register.set pc intvect_CoreExceptions
; --------------------------------------------------------------------------------
; Start program execution
;Go.direct main
;WAIT !STATE.RUN()
; --------------------------------------------------------------------------------
; Open some windows
;WinCLEAR
Mode.Hll
;WinPOS 0. 0. 116. 26.
;List.auto
;WinPOS 120. 0. 100. 8.
;Frame.view
;WinPOS 120. 14.
;Var.Watch
;Var.AddWatch %SpotLight ast flags
;WinPOS 120. 25.
;Register.view /SpotLight
;break.Set Det_ReportError
;break.Set Os_UnhandledExc
;break.Set BswM_PreInit
;break.Set McutClock
ENDDO
; ================================================================================
; --------------------------------------------------------------------------------
EnableATCM:
(
PRIVATE &addr
PARAMETERS &addr
; Enable ACTM
Data.Set C15:0x19 %Long (&addr&0xFFFFF000)|0x1B
; Enable MPU at EL2, region 0 only
;Data.Set C15:0x4001 %Long 0yXXXXxxxxXXXXxxxxXXXXxxxxXXXXxxx1
;Data.Set C15:0x4116 %Long 0x1
;Data.Set C15:0x4086 %Long (&addr&0xFFFFF000)
;Data.Set C15:0x4186 %Long (&addr&0xFFFFF000)+0x7FC1
; Init values for ATCM, 64-bit access required by TRM
Data.Set (&addr&0xFFFFF000)++0x7FFF %Quad 0x0
)
RETURN