45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: Example for User Controlled Memory Access (USR:) to CP15
|
|
; @Description:
|
|
; Script to load a target monitor routine
|
|
; to access the registers of coprocessor 15
|
|
; via the the TRACE32 User Controlled Memory Access (USR: memory class)
|
|
;
|
|
; See readme.txt or look for command Data.USRACCESS in the manual
|
|
;
|
|
; (Example tested with ARM922T (Altera Excalibur))
|
|
;
|
|
; @Author: HLG
|
|
; @Keywords: coprocessor, CP15, Data.USRACCESS, USR
|
|
; @Copyright: (C) 1989-2022 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; --------------------------------------------------------------------------------
|
|
; $Id: cp15.cmm 20812 2023-04-21 07:13:33Z csax $
|
|
|
|
|
|
|
|
IF !SYStem.UP()
|
|
(
|
|
PRINT %ERROR "Not yet connected to target. Please execute SYStem.UP first."
|
|
ENDDO
|
|
)
|
|
|
|
LOCAL &addr
|
|
&addr=0x1000
|
|
|
|
IF CPUIS("OMAP4430*")
|
|
&addr=0x4A326400
|
|
ELSE IF CPUIS("LPC23??")||CPUIS("LPC24??")
|
|
&addr=0x40007000
|
|
ELSE IF STRing.SCAN(CORENAME(),"CORTEXM",0)>=0 //Cortex-M ?
|
|
(
|
|
PRINT %ERROR "Sorry, this demo can't support Cortex-M CPUs (since they don't have CP15)"
|
|
ENDDO
|
|
)
|
|
|
|
Data.USRACCESS &addr++0xfff,,"~~~~/cp15.gnu.bin"
|
|
|
|
; If code and data-buffer can stay at fixed address use option /keep to improve performance:
|
|
; Data.USRACCESS 0x1000++0xfff,,"~~~~/cp15.gnu.bin" /KEEP
|
|
|
|
ENDDO
|