Launching Scripts

The Profiling and Analysis tools help you launch scripts written in Python language. These scripts allow you to collect and export trace data automatically using remote launch. This feature is integrated with CodeWarrior IDE scripting. The scripts are launched in remote launch using the Jython console. The remote launch feature of CodeWarrior allows launch configurations to be executed remotely.

Note: The Profiling and Analysis tools specific scripting APIs are available in the SA_Scripting.doc document, which is located at <CW Installation Directory>\MCU\morpho_sa\sasdk\support.

You can export the data in a CSV file or set the tracepoints in the source code by launching a Python script. You can write the script to contain all details required to configure tracing and profiling. For example, enabling trace and profile, setting breakpoints, launching the application, resuming, suspending, and terminating. You can also set the trace mode, for example, automatic or continuous for trace collection in the script itself. You can also modify the sample Python scripts according to your needs to extend the functionality to other platforms by changing the configuration attributes. After writing these scripts, you run them in the Jython console and collect trace.

This chapter consists of the following topics: