core/com.nokia.carbide.cpp.doc.user/html/reference/wnd_Trace32_config.htm
author fturovic <frank.turovich@nokia.com>
Mon, 10 Aug 2009 15:21:12 -0500
changeset 400 9b005a8e6778
parent 0 fb279309251b
permissions -rw-r--r--
removed duplicate pages, unused images, and fixed links to same

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
<title>Trace32 Support</title>
<link rel="StyleSheet" href="../../book.css" type="text/css"/>
</head>
<body bgcolor="#FFFFFF">
<h2>Symbian OS Trace32 Support</h2>
<p>After installing all necessary software such as Perl, JTAG, compilers, Devkits and SDKs and creating your project, you will need to define a Debug launch configuration for your project. For this example, we will define a Trace32 launch configuration. For new projects that do not have a launch configuration, a New Launch Configuration Wizard will appear and allow you to define settings.</p>
<p><a href="../projects/launch/launch_configs_overview.htm">Launch configurations</a> define a collection of settings used to tell the debugger how to start a debug session. The launch configuration panes for creating a Trace32 stop mode debug launch configuration  are described below. Figure 1 is an example of the Trace32 Debug launch configuration window and the related panes accessible in a tabbed format. Click <b>Debug</b> after all the preference panels have been set. The Debug window closes and the Carbide.c++ debugger begins a debugging session using the new configuration. The next time you click the Debug icon, this debug launch configuration is used to start a debug session.</p>
<div class="step">
  <h4>To open the Debug window </h4>
  <ul>
    <li>Select the Project in the C/C++ Project view that you want to debug</li>
    <li>Select the Run &gt; Debug... menu item to display the Debug launch configuration window (figure 1) </li>
    <li>Define a debug launch configuration to communicate with the protocol interface</li>
  </ul>
</div>
<p>The panes include: </p>
<ul>
  <li>The <a href="#Main">Main</a> tab (Figure 1) defines the project to be launched. Enter the name of the project in the Project field, and the executable name in the Executable field.</li>
  <li>The <a href="#Connection">Connection</a> tab (Figure 2) defines the Trace32 executable, configuration file and initialization script.</li>
  <li>The <a href="#Debugger">Debugger</a> tab (Figure3) defines debug configurations, such as entry point to begin debugging and target options.</li>
  <li>The <a href="#ROM">ROM Image</a> tab (Figure 4) allows you to define startup options and ROM image download information.</li>
  <li>The <a href="#Executables">Executables</a> tab (Figure 5) allows you to specify which executables that you want to debug  that are part of the project.</li>
  <li>The <a href="#Source">Source</a> tab (Figure 6)  (<i>standard CDT page</i>) defines the location of source files used to display source when debugging an application. By default, these settings are derived from the associated project's build path. You may override these settings here. </li>
  <li>The <a href="#Common">Common</a> tab (Figure 7) (<i>standard CDT page</i>)  defines general information about the launch configuration. You may choose to store the launch configuration in a specific file.</li>
</ul>
<h2>Main<a name="Main" id="Main"></a></h2>
<p align="center"><img src="images/panel_debug_T32_main.png" width="560" height="254" /></p>
<p class="figure">Figure 1 - Trace32 Launch Configuration Settings - Main Tab</p>
<h5>Table 1. Debug Launch configuration window&mdash;Main tab items</h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Project</b></td>
    <td>The project to associate with this debug launch configuration. Click Browse to select a different project. </td>
  </tr>
  <tr>
    <td><b>Executable</b></td>
    <td><span
 style="font-weight: normal;">This is the name of the executable that is linked to the project. </span>Click <b>Browse</b> to select a different executable. </td>
  </tr>
</table>
<h2>Connection<a name="Connection" id="Connection"></a></h2>
<p align="center"><img src="images/panel_debug_T32_connection.png" width="732" height="246" /></p>
<p class="figure">Figure 2 - Trace32 Launch Configuration Settings - Connection Tab</p>
<h5>Table 2. Launch configuration window&mdash;Connection tab items</h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Trace32 Executable </b></td>
    <td>Enter or browse to the Trace32 executable to be launched for debugging. By default, it will be set to <span class="code">c:\t32\t32marm.exe</span>. The default installation path is <span class="code">c:\t32</span>.</td>
  </tr>
  <tr>
    <td><b>Trace32 Configuration File </b></td>
    <td><p>Enter or browse to the Trace32 Configuration File. The default configuration file is a Carbide specific T32 config file (config_carbide.t32). Default location is  </p>
      <p><span class="code">C:\Program Files\Nokia\Carbide.c++ v2.0.x\plugins\com.nokia.carbide.cpp.support_<br>      
      &lt;<em>version</em>&gt;\Symbian_Support\Trace32\</span></p>
      <p>You can modify the <span class="code">config_carbide.t32</span> file to support UDP (User Datagram Protocol) connections by adding the following lines: <br />
<br />
RCL=NETASSIST<br />
PACKLEN=1024<br />
PORT=20000</p></td>
  </tr>
  <tr>
    <td><b>Trace32 Initialization Script </b></td>
    <td><p>Enter or browse to the Trace32 initialization cmm script file. This script will be run in Trace32 after connecting to Trace32. Users are expected to have their own scripts for the targets they are using. The cmm files are provided here for H2 and H4 boards:</p>
      <p><span class="code">C:\Program Files\Nokia\Carbide.c++ v2.0.x\plugins\com.nokia.carbide.cpp.support_<br>
      &lt;<em>version&gt;</em>&gt;\Symbian_Support\Trace32\cmm_scripts\H2 &amp; H4</span></p></td>
  </tr>
  <tr>
    <td><b>View Messages between Carbide and Trace32 </b></td>
    <td>The View Messages between Carbide and Trace32 check box allows you to specify whether or not the debug protocol messages between Carbide and T32 should be logged in a T32 Communication Log console window.</td>
  </tr>
</table>
<h2>Debugger<a name="Debugger" id="Debugger"></a></h2>
<p align="center"><img src="images/panel_debug_T32_debugger.png" width="593" height="403" /></p>
<p class="figure">Figure 3 - Trace32 Launch Configuration Settings - Debugger Tab</p>
<h5>Table 3. Launch configuration window&mdash;Debugger tab items</h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Break at entry point </b></td>
    <td>Select the check box and specify an entry point in the text box if you want the debugger to break at an entry point in the program being debugged. The default is set to E32Main since most applications entry point is E32Main. But you can specify a function name in the program being debugged.</td>
  </tr>
  <tr>
    <td><b>Soft attach </b></td>
    <td>Select to attach to a target without restarting the target device. This is very handy when the device uses flash, memory cards, or other external media for booting purposes and when it's not possible to configure the device to restart by the debugger. With soft attach, the debugger doesn't change the state of the target device. The debugger halts the target after attaching to the target to show the current PC location. User can preform normal debugging operations from then onwards. </td>
  </tr>
  <tr>
    <td><b>Debug from start address</b></td>
    <td>Select this option  to stop the target at the start address once the target initialization is done and the OS is downloaded; if you have chosen to download the OS.</td>
  </tr>
  <tr>
    <td><b>Run from start address </b></td>
    <td><p>Select this option to run the target from the start address once the target initialization is done.</p></td>
  </tr>
  <tr>
    <td><b>Start Address (hex) </b></td>
    <td>Specify the memory address that the Carbide debugger will use to set the program counter to start the target. This is typically the start address of the Symbian OS.</td>
  </tr>
  <tr>
    <td><b>Reset target at the start of each debug session </b></td>
    <td><p>Select this check box to reset the target at the start of each debug session. For Trace32, the reset is typically done as part of the CMM script file.</p>
        <p>Consult board specifications to determine if resetting is necessary.</p></td>
  </tr>
  <tr>
    <td><b>Target Processor </b></td>
    <td>Select a target processor from the drop down list of all supported processors. By default the field is set to Generic. When you select a processor, Carbide determines whether the debugger provides ARMV5 or ARMV6 support.</td>
  </tr>
  <tr>
    <td><b>Target Initialization File</b></td>
    <td><p>Select the check box and enter or browse to the target initialization file. Typically, this initialization file is used to initialize the target after connecting. When using Trace32, the initialization is done in the CMM script file.</p></td>
  </tr>
  <tr>
    <td><b>Memory Configuration File </b></td>
    <td>Select the check box and enter or browse to the memory configuration file. The Carbide debugger uses this configuration file to determine which memory is accessible, readable, and writable on the target.</td>
  </tr>
  <tr>
    <td><b>Default Instruction set </b></td>
    <td><p>The following options are available:</p>
      <ul>
        <li>Auto (examine code at current PC location) </li>
        <li>Arm (32 bit) </li>
        <li>Thumb (16 bit) </li>
    </ul>      
    <p>Arm is the default. It is used by the debugger to determine the processor mode when it cannot be determined otherwise. This can happen at addresses for which there is no symbolic information. The debugger uses the mode when setting breakpoints and disassembling code.</p></td>
  </tr>
</table>
<h2>ROM Image<a name="ROM" id="ROM"></a></h2>
<p align="center"><img src="images/panel_debug_T32_image.png" width="593" height="306" /></p>
<p class="figure">Figure 4 - Trace32 Launch Configuration Settings - ROM Image Tab</p>
<h5>Table 4. Launch configuration window&mdash;ROM Image  tab items</h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Parse Rom Log File</b></td>
    <td>Check this option to parse the ROM log file. </td>
  </tr>
  <tr>
    <td><b>Symbian Rom Log File</b></td>
    <td>Enter or browse to the Rom log file that is generated when the Symbian OS image is built. This is necessary for debugging any Symbian OS module.</td>
  </tr>
  <tr>
    <td><b>Symbian Epoc32 Directory </b></td>
    <td><p>Enter or browse to the epoc32 directory for the Symbian OS kit that is being targeted for debugging. This is necessary for the debugger to resolve the full paths for each module in the log file since the log file does not contain the full paths.</p></td>
  </tr>
  <tr>
    <td><b>Log unresolved modules</b></td>
    <td>Check this option to log unresolved modules. If the actual binary in the log file doesn&rsquo;t exist on the PC, then a warning message will be logged in a Rom Log console window.</td>
  </tr>
  <tr>
    <td><b>Debug non-XIP executables</b></td>
    <td>Check this option to target non-XIP executables. This allows the debugger to target a non-XIP module whenever it&rsquo;s loaded.</td>
  </tr>
  <tr>
    <td><b>Download Rom Image </b></td>
    <td>Check this box to enable downloading. </td>
  </tr>
  <tr>
    <td><b>Symbian Rom Image</b></td>
    <td>Enter or browse to the Symbian OS image (.img file) that will be downloaded onto the target at the specified download address.</td>
  </tr>
  <tr>
    <td><b>Download Address (hex) </b></td>
    <td><p>Specify the address where the image is to be downloaded. This address is target-specific. The address should be in hexadecimal format with the 0x prefix.</p>    </td>
  </tr>
  <tr>
    <td><b>Same as start address</b></td>
    <td>Check this option to make the download address the same as the start address.</td>
  </tr>
  <tr>
    <td><b>Ask for download at the start of each debug session</b></td>
    <td>Select this option  to prompt you to download the image at the start of the debug session.</td>
  </tr>
</table>
<h2>Executables<a name="Executables" id="exe"></a></h2>
<p>The <b>Executables</b> pane specifies which executables   to debug with your project based on the chosen rule. The Executables pane gives you project level control over the executables associated with it. The pane shows all the executables in the workspace or those imported into the Executables view from outside the workspace that can be debugged by this project. See the <a href="../view_executables.htm">Executables</a> view for information on controlling  executables from the workspace. </p>
<p align="center"><img src="images/panel_trk_exes.png" width="558" height="279"></p>
<p class="figure">Figure 5 - Trace32 Launch Configuration Settings - Executables Tab</p>
<h5>Table 5.  Executable pane &mdash;items </h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Load symbols for these executables and target them for debugging </b></td>
    <td><p>Select the rule which govern the executable support used by this project for debugging purposes. The options include: </p>
        <ul>
          <li><b>Executables in the workspace  from this SDK</b> &#8212; shows all executables in the workspace built using the specified SDK. This is the default setting. </li>
          <li><b>Executables built by this project</b> &#8212; shows only the executables built by this project  using the specified SDK</li>
          <li><b>Executables selected below</b> &#8212; shows only the executables chosen by the user. Initial list display uses the All Executables listing. </li>
          <li><b>All executables (slows launch)</b> &#8212; shows all the executables in the workspace regardless of which SDK created them. Selecting this option will slow down Carbide launches as the list is populated. </li>
        </ul></td>
  </tr>
  <tr>
    <td><b>Executables list </b></td>
    <td>Shows all the executables associated with this project. </td>
  </tr>
  <tr>
    <td><b>Add...</b></td>
    <td>Opens the <b>Select an executable file</b> dialog which can locate and select  executable files and add them to the project's executables list. </td>
  </tr>
  <tr>
    <td><b>Select All </b></td>
    <td>Enables  all the executables in the list for debugging. </td>
  </tr>
  <tr>
    <td><b>Unselect All </b></td>
    <td>Disables  all the executables in the list from debugging. </td>
  </tr>
</table>
<h2>Source<a name="Source" id="Source"></a></h2>
<p align="center"><img src="images/panel_debug_source.png" width="550" height="299" /></p>
<p class="figure">Figure 6 - Trace32 Launch Configuration Settings - Source Tab</p>
<h5>Table 6. Launch configuration window&mdash;Source tab items</h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Source Lookup Path</b></td>
    <td>Allows you to add locations to search for source files. You can arrange the list by selecting the type of source path and clicking Up and Down buttons. Select a type of source and click Remove button to delete the item from the list.</td>
  </tr>
  <tr>
    <td><b>Search for duplicate source files on the path </b></td>
    <td>Enable this option to search for duplicate source files on source paths listed.</td>
  </tr>
</table>
<h2>Common<a name="Common" id="Common"></a></h2>
<p align="center"><img src="images/panel_debug_common.png" width="556" height="330" /></p>
<p class="figure">Figure 7 - Trace32 Launch Configuration Settings - Common Tab</p>
<h5>Table 7. Launch configuration window&mdash;Common tab items</h5>
<table width="94%"  border="0" cellpadding="2" cellspacing="0">
  <tr>
    <th width="32%" scope="col">Item</th>
    <th width="68%" scope="col">Explanation</th>
  </tr>
  <tr>
    <td><b>Save As </b></td>
    <td>Allows you to save the launch configuration as a file local to the project or as shared file. For a shared file you can enter or browse to a folder within an existing project directory.</td>
  </tr>
  <tr>
    <td><b>Display in favorites menu </b></td>
    <td>Select menu for launch configuration to appear.</td>
  </tr>
  <tr>
    <td><b>Console Encoding</b></td>
    <td>Select the character set to use to display information in the console window. </td>
  </tr>
  <tr>
    <td><b>Standard Input and Output</b> </td>
    <td>Allocate input and output to console and/or specified file. If a file is selected, you can select Append option to append data to selected file. </td>
  </tr>
  <tr>
    <td><b>Launch in background</b></td>
    <td>Enable this option to launch debug operation in a background process. </td>
  </tr>
</table>
<p>&nbsp;</p>
<h5>Related concepts</h5>
<ul>
  <li><a href="../projects/launch/launch_configs_overview.htm">Launch Configurations</a></li>
  <li><a href="../concepts/debugger_about.htm">About the Debugger</a></li>
</ul>
<h5 align="left">Related tasks</h5>
<ul>
  <li><a href="../tasks/projects/prj_debug_config.htm">Creating a Launch Configuration</a></li>
</ul>
<h5 align="left">Related references</h5>
<ul>
  <li><a href="wnd_sophia_config.htm">Symbian OS Sophia Target Interface Support</a></li>
  <li><a href="perspective_debug.htm">Debug Perspective</a></li>
  <li><a href="view_debug.htm">Debug View</a></li>
</ul>
<div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>

</body>
</html>