; -------------------------------------------------------------------------------- ; @Title: Demo script for TC397XE-Astep on TriBoard-TC3x7 (AMP, waveform app) ; @Description: ; Helper script to start and initialize cores 1 to 5 ; @Keywords: AURIX2G, Infineon, multi-core, TriCore, waveform ; @Author: MEI ; @Board: TriBoard-TC3x7 ; @Chip: TC397XE ; @Copyright: (C) 1989-2017 Lauterbach GmbH, licensed for use with TRACE32(R) only ; @Props: NoWelcome, NoIndex ; -------------------------------------------------------------------------------- ; $Id: init_amp_waveform.cmm 11311 2017-09-05 13:29:17Z meick $ PARAMETERS &elfFile ¶ms &cpuName PRIVATE &coreName &arch &ix &title &intercomPort &url &Path &coreName=STRing.SCANAndExtract("¶ms","CORENAME=","") ; determine parameteters depending on selected core IF ("&coreName"=="TC1") ( &arch="tc" &ix=1. &title="TRACE32 PowerView for TriCore [Core 1]" ) ELSE IF ("&coreName"=="TC2") ( &arch="tc" &ix=2. &title="TRACE32 PowerView for TriCore [Core 2]" ) ELSE IF ("&coreName"=="TC3") ( &arch="tc" &ix=3. &title="TRACE32 PowerView for TriCore [Core 3]" ) ELSE IF ("&coreName"=="TC4") ( &arch="tc" &ix=4. &title="TRACE32 PowerView for TriCore [Core 4]" ) ELSE IF ("&coreName"=="TC5") ( &arch="tc" &ix=5. &title="TRACE32 PowerView for TriCore [Core 5]" ) ELSE ( PRINT %ERROR "unknown corename: &corename" ENDDO ) ¶ms="¶ms ARCH=&arch" ; Compute new Intercom port &intercomPort=INTERCOM.PORT()+&ix ¶ms="¶ms INTERCOM_PORT=&intercomPort" ; Determine Title of new PowerView instance ¶ms="¶ms SCREEN_HEADER=""&title""" ; Determine 'CORE' parameter for the config file &core=FORMAT.DECimal(0.,&ix+1) ¶ms="¶ms PBI_CORE=&core" ; Try to start slave PowerView instance DO Utils/amp_startpowerview.cmm "¶ms" RETURNVALUES &url IF ("&url"=="") ( PRINT %ERROR "Failed to start &title." ENDDO ) ; Configure slave PowerView instance INTERCOM.execute &url FramePOS ,,,, Auto INTERCOM.execute &url SYStem.CPU &cpuName INTERCOM.execute &url SYStem.CONFIG.CORE (&ix+1) 1. INTERCOM.execute &url SYStem.Option DUALPORT ON INTERCOM.execute &url SETUP.Var %SpotLight INTERCOM.execute &url MAP.BOnchip 0x0--0xffffffff // force onchip-breakpoints ; Connect slave PowerView instance to slave core INTERCOM.execute &url SYStem.Attach ; Load symbols on slave instance &Path=OS.PPD() INTERCOM.execute &url Data.LOAD.Elf "&elfFile" /SingleLineAdjacent /NoCODE INTERCOM.execute &url SYnch.MasterGo ON INTERCOM.execute &url SYnch.SlaveGo ON INTERCOM.execute &url SYnch.MasterBreak ON INTERCOM.execute &url SYnch.SlaveBreak ON INTERCOM.execute &url SYnch.MasterStep ON INTERCOM.execute &url SYnch.SlaveStep ON ; Open some windows INTERCOM.execute &url WinPOS 0% 0% 50% 100% INTERCOM.execute &url List.auto INTERCOM.execute &url WinPOS 50% 0% 50% 50% INTERCOM.execute &url Var.Watch INTERCOM.execute &url WinPOS 50% 50% 50% 50% ENDDO