Skip to main content

TRACE32 autostart mechanism - Knowledgebase / TRACE32 PowerView - Lauterbach Support

TRACE32 autostart mechanism

After starting the TRACE32 application some PRACTICE scripts will be executed automatically.   

Autostart since TRACE32 build 99519 and later (August 2018)

Since build 99519 TRACE32 starts the following script on startup:

1. TRACE32 first executes the file autostart.cmm from the TRACE32 system directory (usually C:\T32).

2. autostart.cmm starts then the following scripts:         

  • system-settings.cmm (from the TRACE32 system directory)
  • user-settings.cmm (from the user settings directory (on Windows %APPDATA%\TRACE32 or ~/.trace32 otherwise))
  • work-settings.cmm (from the current working directory)

 3. Finally, TRACE32 executes additionally the file specified on the command line (or in T32Start).

If the file autostart.cmm does not exist in the TRACE32 system directory, TRACE32 build 99519 (and later) will fall back to the  previous autostart-mechanism and start t32.cmm (if no start script was specified on the command line (or in T32Start))

The file autostart.cmm is provided by Lauterbach and should not be changed. Every software update will overwrite autostart.cmm.
Individual settings should be added in the files system-settings.cmm, user-settings.cmm and work-settings.cmm (which will not be changed by Lauterbach). 

Autostart of old TRACE32 build 99518 and earlier

Until build 99518 TRACE32 started only one script on startup.

  •  If an individual start script is specified on the command line (or in T32Start), only this script is executed (while t32.cmm was not executed)     
  • If no start script is specified, the file t32.cmm from the current working directory is executed.     
  • If no start script is specified and there is no t32.cmm in the working directory, the file t32.cmm from the TRACE32 system directory (usually C:\T32) is executed.

Starting from August 2017 Lauterbach shipped a variant of t32.cmm, which started the scripts system-settings.cmm (from the TRACE32 system directory),   user-settings.cmm (from the user settings directory (on Windows %APPDATA%\TRACE32 or ~/.trace32 otherwise)) and work-settings.cmm (from the current working directory) if the user had created those files.


Frequently Asked Questions


How can I switch back to the old autostart mechanism?

It is recommended to use the new autostart mechanism. However, if you need to use the old one, you can do the following:

Option 1: You can easily switch back to the old autostart-mechanism by deleting the file autostart.cmm from the TRACE32 system directory.         However, be aware that every software update from Lauterbach will restore the file autostart.cmm.

 Option 2: Alternatively you can do the following, to get the same result as with the old autostart mechanism, but without deleting autostart.cmm:   

 1. Open the file system-settings.cmm from the TRACE32 system directory (which is usually C:\T32 on Windows). Create the file if it doesn't exist.

 2. Copy the following PRACTICE code to the top of system-settings.cmm:

IF (VERSION.BUILD()>=99519.)&&(PRACTICE.CALLER.FILE(1)==OS.FILE.ABSPATH("~~/autostart.cmm"))
(
    PRIVATE &cmm &param
    ENTRY  %LINE &param
    BookMark.RESet // Clear all bookmarks loaded via AutoSTOre in autostart.cmm
    HISTory.SIZE 10. // Clear command history loaded via AutoSTOre in autostart.cmm
    IF VERSION.ENVironment(STARTUP)!=""
      &cmm=VERSION.ENVironment(STARTUP)
    ELSE IF OS.FILE.readable("./t32.cmm")
      &cmm="./t32.cmm"
    ELSE IF OS.FILE.readable("~~/t32.cmm")
      &cmm="~~/t32.cmm"
    IF "&cmm"!=""
      RUN "&cmm" &param
    END
)


How can I just remove that dialog, which tells me that t32.cmm is no longer started automatically?

It is recommended to move the required user defined settings from t32.cmm to system-settings.cmm, user-settings.cmm or work-settings.cmm and then delete (or rename) t32.cmm. However, there are also other options:

Option 1: Delete or rename t32.cmm

Option 2: Start TRACE32 with a start-up script specified on the command line with option "-s" or in T32Start at         "Advanced Settings > StartupScript". That start-up script may be empty.     

Option 3: Open or create the file work-settings.cmm in your TRACE32 working directory         (usually the directory from where you've started TRACE32) and append the following two lines to the end of the script (before the line "ENDDO" if it exists) 

IF (VERSION.BUILD()>=99519.)&&(VERSION.ENVironment(STARTUP)=="")
      END  // End all scripts and close dialogs 


How can I suppress the automatic execution of any PRACTICE script?

The command line option --t32-safestart tells PowerView not to start any PRACTICE script after the start of the application.

Helpful Unhelpful

1 of 2 people found this page helpful

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image