Search code examples
command-linetrace32lauterbach

How to create the Lauterbach new instance window automatically?


I have a Lauterbach script called "test.cmm" that perform another instance for multi-core debugging. I want to create a batch script to automate this action. If I am currently connected to Lauterbach and running on, for example, core 1, can I create a new instance of that Lauterbach connection by automatically by running this batch script? I would like to run the "test.cmm" script without manually clicking "Run Script" in the current window. I have attached an image for reference. Any sample script would helpful to understand the concept.

enter image description here


Solution

  • Since you are running the Arm version of PowerView, you should have quite a few multicore demos and some scripts that you could modify for your own use case already in your installed files.

    One such example would be ~~~~/demo/arm/hardware/imx8/imx8m/imx8mq-evk/imx8mq-amp/ which contains a Windows batch file and a Bash script for starting PowerView from the console in AMP mode. In this same folder, there is a configuration file (config_amp.t32) and a startup script (t32_amp.cmm) plus a demonstration of how the InterCom command is used to control another instance after TargetSystem.NewInstance is used to open a different PowerView window.

    If you have a debugger with dual whisker, there is another demo available (~~~~demo/arm/combiprobe/dual_whisker/start_amp.bat) showing this functionality although much of the concepts are similar to the aforementioned demo.

    As for running a cmm script from PowerView? The command DO from within PowerView is one of many ways. You can create menu items with keyboard shortcuts to execute test.cmm—part of that i.MX8 AMP demo, also detailed in ~~~~/pdf/training_menu.pdf. To run arbitrary commands/scripts from an automation script, you can use the t32rem executable on an API-enabled (via its configuration script) PowerView instance to send these commands.