core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/soft_attach_debug.htm
author fturovic <frank.turovich@nokia.com>
Wed, 06 Oct 2010 10:31:32 -0500
changeset 2131 ff0156b93599
parent 1854 49624691da34
child 2136 f0b706fa897d
permissions -rw-r--r--
moved inf, mmp, remote conn, and views to project folder
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     2
<html>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     3
<head>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     4
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     5
<meta http-equiv="Content-Style-Type" content="text/css" />
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     6
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     7
<title>Using Soft Attach for On-Device Debugging</title>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     8
<link rel="StyleSheet" href="../../../book.css" type="text/css"/>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     9
</head>
1791
727385d8e2b3 added new customize carbide section and some relinking done for deleted duplicate page
fturovic <frank.turovich@nokia.com>
parents: 1754
diff changeset
    10
<body >
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    11
<h2>Using Soft Attach  for On-Device Debugging</h2>
1754
a1e1c11d5a44 broken links fixed
fturovic <frank.turovich@nokia.com>
parents: 1376
diff changeset
    12
<p align="center" class="fix">NEEDS REWRITING</p>
a1e1c11d5a44 broken links fixed
fturovic <frank.turovich@nokia.com>
parents: 1376
diff changeset
    13
<p>You can debug hardware via TCF using the soft attach option. This enables you to debug an image flashed to ROM or on a memory card. Soft attach includes all the capabilities fo Stop-mode debugging but can't debug any code loaded before the OS is booted. </p>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    14
<p>There are several components that must be provided to the debugger so that it can communicate with the attached hardware device. They are:</p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    15
<ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    16
  <li><b>Config_carbide.t32</b> - a required configuration file used to configure Carbide for soft attach debugging</li>
1754
a1e1c11d5a44 broken links fixed
fturovic <frank.turovich@nokia.com>
parents: 1376
diff changeset
    17
  <li><b>.cmm file</b> - you must select the correct .cmm script file for the hardware otherwise it will not initialize properly and the debugger will be unable to communicate. The .cmm script files are located in the <span class="code">&lt;Carbide&gt;\plugins\com.nokia.carbide.cpp.support_3.0.x.xxx\Symbian_Support\TCF\cmm_scripts</span> directory.<br>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    18
    <br>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    19
  Also, if there is a specific .cmm file for the device, like H2 or H4, especially if it includes <span class="code">_attach</span> in the name, choose that version over the others to do soft attach on the hardware. </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    20
  <li><b>.log file</b> - you must have a valid .log file for the ROM image in order to debug the image </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    21
</ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    22
<p>If the  <a href="../../projects/launch/wiz_new_launch_config.htm">New Launch Configuration Wizard</a> is used, you will be asked to identify the above files. If you used the <b>New</b> or <b><a href="../../reference/wnd_debug_configuration.htm">Debug</a></b> dialog to create a launch configuration, make sure that the above files are supplied. </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    23
<p>The major steps to perform a soft attach  are: </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    24
<ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    25
  <li><a href="#buildProject">Import and build</a> your project and the ROM image </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    26
  <li><a href="#startHardware">Startup the device</a> using the ROM image </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    27
  <li><a href="#debuggerSetup">Setup the debugger</a> and begin debugging </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    28
</ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    29
<div class="step">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    30
  <h4><a name="buildProject" id="buildProject"> </a>1. Importing and building the project and ROM image </h4>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    31
  <ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    32
    <li><a href="../ImportingProjects.html">Import</a> the project</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    33
    <li><a href="../projects/prj_build.htm">Build</a> the project</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    34
    <li><a href="../../reference/ROM_build_settings.html">Create</a> a ROM image 
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    35
      <p>Enter the desired command-line arguments for the ROM image in the ROM Build Command Line text box in the <b>Carbide ROM Build Settings</b> panel of the <b>Properties for &lt;project&gt;</b> dialog. </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    36
    </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    37
  </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    38
</div>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    39
<div class="step">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    40
<h4><a name="startHardware" id="startHardware"> </a>2. Starting up the device with the ROM image </h4>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    41
<ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    42
    <li>Transfer the ROM image to the hardware via memory card or flash </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    43
    <p class="note"><b>NOTE</b> Ensure that the hardware includes a boot loader program so that it can boot the ROM image from the memory card. </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    44
    <li>Power up the device  
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    45
      <p>Once  the operating system has booted up, it is ready for the debugger to attach </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    46
    </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    47
  </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    48
  <p>&nbsp;</p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    49
</div>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    50
<div class="step">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    51
<h4><a name="debuggerSetup" id="debuggerSetup"> </a>3. Setting up the debugger to debug </h4>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    52
<ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    53
  <li>On the hardware, launch the program to debug</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    54
  <li>Click Run &gt; Debug to launch the <a href="../../projects/launch/wiz_new_launch_config.htm">New Launch Configuration Wizard</a></li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    55
  <li>In the Launch Types page
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    56
    <ol type="a">
1754
a1e1c11d5a44 broken links fixed
fturovic <frank.turovich@nokia.com>
parents: 1376
diff changeset
    57
      <li>Select the TCF Launch Configuration</li>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    58
      <li>Click Next </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    59
    </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    60
  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    61
  <li>In the Symbian ROM Image Settings page
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    62
    <ol type="a">
1754
a1e1c11d5a44 broken links fixed
fturovic <frank.turovich@nokia.com>
parents: 1376
diff changeset
    63
      <li>Enter the path to the TCF Initialization Script .cmm file </li>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    64
      <li>Select the Target Processor  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    65
      <li>Click Next </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    66
    </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    67
    In the Symbian ROM Image Settings page
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    68
    <ol type="a">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    69
      <li>Enable Soft attach</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    70
      <li>Enter the Symbian ROM Log File </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    71
      <li>Click Next </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    72
    </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    73
  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    74
  <li>In the New Launch Configuration page
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    75
    <ol type="a">
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    76
      <li>Enable the &quot;Open launch configuration for additional customization of launch settings&quot; option </li>
1854
49624691da34 BUG 11654 - pulled most of the TRACE32 refs except those in stop-mode (which needs rewriting yet)
fturovic <frank.turovich@nokia.com>
parents: 1791
diff changeset
    77
      <li>Click Finish</li>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    78
    </ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    79
  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    80
  <li>Once the debugger connects to the hardware it will halt the hardware at a random memory address (Figure 2). Press Resume in the Debug view to begin debugging.</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    81
  <p align="center"><img src="images/soft_attach_random_address.png" width="593" height="268" class="figure"></p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    82
  <p class="figure">Figure 2. Debugger stopping at a random address using soft attach </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    83
  <li>Debug the program in the Carbide debugger </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    84
  <p>Once the debugger is connected to the hardware you can: </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    85
  <ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    86
    <li>Set breakpoints in the editor view </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    87
  </ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    88
  <blockquote>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    89
    <p>If breakpoints were already set in the project then an Editor view should display them as <a href="../../concepts/breakpoints.htm">resolved</a>. If no breakpoints have been set, now is the time to add them. </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    90
    <p class="note"><b>NOTE</b> The number of breakpoints you can set is controlled by the hardware. </p>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    91
  </blockquote>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    92
  <ul><li>Click Suspend to halt  the processor on the hardware </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    93
    <li>Use Disconnect (<i>preferred</i>) to stop debugging the program. This does not halt the processor.  </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    94
    <li>Use Terminate to end  the debug session</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    95
  </ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    96
</ol>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    97
</div>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    98
<h4>Related references</h4>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    99
<ul>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   100
  <li><a href="../../reference/panel_debug_exceptions.htm">Debug</a> perspective </li>
2131
ff0156b93599 moved inf, mmp, remote conn, and views to project folder
fturovic <frank.turovich@nokia.com>
parents: 1854
diff changeset
   101
  <li><a href="../../projects/views/view_executables.htm">Executables</a> view</li>
ff0156b93599 moved inf, mmp, remote conn, and views to project folder
fturovic <frank.turovich@nokia.com>
parents: 1854
diff changeset
   102
  <li><a href="../../reference/view_symbian_kernel.htm">Symbian Data</a> view</li>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   103
  <li><a href="../../reference/view_registers.htm">Registers</a> view</li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   104
  <li><a href="../../reference/view_breakpoints.htm">Breakpoint</a> view    </li>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   105
</ul>
1376
120480c02651 BUG 10758 - copyright revised date to 2010
fturovic <frank.turovich@nokia.com>
parents: 400
diff changeset
   106
<div id="footer">Copyright &copy; 2010 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>
400
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   107
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   108
</body>
9b005a8e6778 removed duplicate pages, unused images, and fixed links to same
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   109
</html>