4.8.1. Using the export script command

To help you in the setting up of batch files or shell scripts used to enable profiling and execute your code, the ARM Profiler provides the Export Script button in the RTSM run configuration window within the ARM Workbench. To use this feature, follow these steps:

  1. Select Run  → Open Run Dialog...

  2. Select an RTSM run configuration in the explorer.

  3. Click the Export Script button

If you are running the ARM Profiler on Windows, this command produces an ApplicationName.bat file with all the appropriate commands to do a profiled run. In the xvid example, the generated output looks something like this:

@echo off

REM Automatically generated on 8/6/08 2:34 PM
set ARM_PROFILER_TOOLS=C:\Program Files\ARM\Profiler\tools\2.0.0.200808191200
pushd C:\workspace\xvid
"%ARM_PROFILER_TOOLS%\tools\rtsm\win32\model_shell.exe" -m
"%ARM_PROFILER_TOOLS%\tools\rtsm\win32\RTSMEmulationBaseboard_CT1136.dll" -a
coretile.core=xvid.axf --timelimit 2147483 -C 
coretile.core.profiler-enable=1 -C
coretile.core.profiler-output_file=@F_@N.apa -C coretile.core.vfp-enable_at_reset=1 -C
coretile.core.semihosting-heap_base=0x00000000 -C 
coretile.core.semihosting-heap_limit=0x0f000000 -C
coretile.core.semihosting-stack_base=0x10000000 
popd

This command produces a shell script instead of a batch file in Red Hat Linux:

#!/bin/sh

# Automatically generated on 8/6/08 10:31 AM

export ARM_PROFILER_TOOLS="/home/ARM/Profiler/tools/2.0.0.200808191200"
cd tools/ARM/Profiler/Contents/2.0/0/examples/xvid
LD_LIBRARY_PATH=/home/ARM/Profiler/tools/2.0.0.200808191200/rtsm/linux $ARM_PROFLIER_TOOLS/rtsm/linux/model_shell -m
$ARM_PROFILER_TOOLS/rtsm/linux/RTSMEmulationBaseboard_CT1136.so -a
coretile.core=xvid.axf --timelimit 2147483 -C 
coretile.core.profiler-enable=1 -C
coretile.core.profiler-output_file=@F_@N.apa -C coretile.core.vfp-enable_at_reset=1 -C
coretile.core.semihosting-heap_base=0x00000000 -C 
coretile.core.semihosting-heap_limit=0x0f000000 -C
coretile.core.semihosting-stack_base=0x10000000 

You can use any or all of the commands created by the export script in your own build system, to make profiling your code a seamless part of the process.

Copyright © 2007, 2008 ARM Limited. All rights reserved.ARM DUI 0414C
Non-Confidential