; -------------------------------------------------------------------------------- ; @Title: Nucleus symbol autoloader script ; @Description: Autoload script, called by TRACE32 if symbols are to be loaded ; @Keywords: nucleus ; @Author: DIE ; @Copyright: (C) 1989-2014 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Id: autoload.cmm 6420 2021-05-03 09:29:43Z rdienstbeck $ // define local macros LOCAL &module &type &code &data &space &basename &filepath // get name and relocation information // these parameters are passed from TRACE32 when calling this skript ENTRY &module &type &code &data &space //print "autoload: " &module " " &type " " &code " " &data // &module: name of module // &type: type of file: 1 = load module // &code: code address // &data: data address // get basename of module &basename=STRing.CUT(&module,-STRing.LENgth(OS.FILE.EXTENSION(&module))) // delete symbols if they already exist IF sYmbol.EXIST("\\&basename") ( &symname="`\\&basename`" sYmbol.Delete &symname ) // search file in source search path and open dialog when not there &filepath=sYmbol.SEARCHFILE("&basename") IF !OS.FILE("&filepath") // not found &filepath=sYmbol.SEARCHFILE("&basename.out") IF !OS.FILE("&filepath") // not found ( LOCAL &spath WinPOS ,,,,,, filebox normal "Searching symbols for &basename" DIALOG.File "*/&basename.*" ENTRY %LINE &filepath IF "&filepath"=="" ENDDO &spath=OS.FILE.PATH("&filepath") sYmbol.SourcePATH.Set &spath ) // load symbol file (options for sourcepath, e.g. /STRIPPART may need to be added when required) IF (&type==1) // load processes ( Data.LOAD.Elf "&filepath" &code /NoCODE /NoClear /name &basename ) ENDDO