Files
Gen4_R-Car_Trace32/2_Trunk/demo/practice/intercom/synch_xconnect.cmm
2025-10-14 09:52:32 +09:00

81 lines
2.2 KiB
Plaintext

; --------------------------------------------------------------------------------
; @Title: Cross-connect PowerView instances with SYnch
; @Description:
; This script configures SYnch.Connect and SYnch.XTRACK to cross-connect
; all PowerView instances which are currently connected to the same
; debug module as the local PowerView isntance.
; INTERCOM must be enabled for all connected PowerView instances.
;
; Note: Deprecated since build 95187, use built-in command
; InterCom.execute ALL <command>
;
; Usage: Call without parameter
; DO ~~/demo/practice/intercom/synch_xconnect.cmm
;
; @Author: REI
; @Copyright: (C) 1989-2014 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: synch_xconnect.cmm 17068 2021-01-28 18:36:58Z rweiss $
IF VERSION.BUILD()>=95187.
(
;use built-in feature
InterCom.execute ALL SYnch.Connect OTHERS
InterCom.execute ALL SYnch.XTrack OTHERS
ENDDO
)
; get command line parameters
LOCAL &command &index &port
ENTRY &command
; called without command -> run this script with parameter COMMAND_CONNECT
IF "&command"==""
(
; iterate through all PowerView instances to run cross-connect script
&index=0
WHILE &index<InterCom.PODPORTNUMBER()
(
IF InterCom.PODPORT(&index)==InterCom.PORT() ;port of local instance?
DO "~~/demo/practice/intercom/synch_xconnect.cmm" COMMAND_CONNECT
ELSE
(
&port=InterCom.PODPORT(&index)
InterCom.executeNoWait &port DO "~~/demo/practice/intercom/synch_xconnect.cmm" COMMAND_CONNECT
)
&index=&index+1
)
ENDDO
)
; called with COMMAND_CONNECT -> cross-connect instances
IF "&command"=="COMMAND_CONNECT"
(
; enumerate all INTERCOM ports and cross-connect all instances
LOCAL &portlist
&portlist=""
; generate port list (excluding local port)
&index=0
WHILE &index<InterCom.PODPORTNUMBER()
(
LOCAL &port
&port=InterCom.PODPORT(&index)
IF &port!=InterCom.PORT()
&portlist="&portlist "+FORMAT.Decimal(1.,&port)
&index=&index+1
)
PRINT "Found PowerView instances on INTERCOM ports: &portlist"
; connect to all instances
SYnch.Connect &portlist
SYnch.XTrack &portlist
ENDDO
)
ENDDO