Skip to main content

How does the TRACE32 autostart mechanism work? - Knowledgebase / TRACE32 PowerView - Lauterbach Support

How does the TRACE32 autostart mechanism work?

Authors list

When the TRACE32 application starts, certain PRACTICE scripts are executed automatically.

Autostart (Build 99519 and Later – August 2018)

Starting with build 99519, TRACE32 uses the following autostart sequence:

1. TRACE32 first runs autostart.cmm from the TRACE32 system directory (e.g. C:\T32).

2. autostart.cmm then executes:

  • system-settings.cmm (TRACE32 system directory)

  • user-settings.cmm (user settings directory: %APPDATA%\TRACE32 on Windows or ~/.trace32 on other systems)

  • work-settings.cmm (current working directory)

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

If autostart.cmm is missing, TRACE32 reverts to the old mechanism and executes t32.cmm (unless a start script is specified on the command line or in T32Start).

Important Notes
  • autostart.cmm is provided by Lauterbach and should not be modified. It will be overwritten during software updates.

  • Custom settings should be placed in system-settings.cmm, user-settings.cmm, or work-settings.cmm, which remain untouched by updates.


Autostart (Build 99518 and Earlier)

In builds prior to 99519, TRACE32 executed only one script at startup:

  • If a start script is specified on the command line (or in T32Start), only that script runs (and t32.cmm is ignored).

  • If no script is specified, TRACE32 executes t32.cmm from the current working directory.

  • If no script is found there, TRACE32 executes t32.cmm from the system directory (C:\T32).

Update (August 2017):

Lauterbach shipped a variant of t32.cmm that could also start system-settings.cmm, user-settings.cmm, and work-settings.cmm if those files existed.


Frequently Asked Questions

Q: How can I switch back to the old autostart mechanism?

A: Although the new mechanism is recommended, you can emulate the old behavior by editing system-settings.cmm in the TRACE32 system directory (C:\T32 on Windows). Add the following PRACTICE code at the top:

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
)

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

A: Move your custom settings from t32.cmm into system-settings.cmm, user-settings.cmm, or work-settings.cmm. Then delete or rename t32.cmm.


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

A: Use the command-line option --t32-safestart. This prevents PowerView from executing any PRACTICE script at startup.


Helpful Unhelpful

3 of 4 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