×
Namespaces

Variants
Actions

Carbide.c++ On-device Debugging Quick Start

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code Example
Installation file: File:TRK clients.zip
Article
Created: hamishwillee (14 Jan 2011)
Last edited: ltomuta (05 Jun 2013)

Needs-update.pngThis article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

Reasons: hamishwillee (25 Aug 2011)
Article needs to be updated to latest version of Carbide.c++ - currently article mentions ADT rather than pointing to Symbian C++ tools area on Nokia Developer. This corresponds to Carbide 2.0 (approximately) but need to confirm that it is still correct for latest carbide (3.0+)

This tutorial is for new Symbian C++ developers who want to use Carbide.c++ to debug on a production phone.

The emulator can be used for most of your debugging work. However, some situations still require debugging on a real device – for example, when you want to use hardware that isn't supported by the emulator (e.g. the camera or the acceleration sensor). In addition, some defects only show up on real hardware - e.g. those related to the hard memory constraints and speed differences. There is list of differences between the emulator and hardware in the SDK documentation here: » Symbian OS Tools And Utilities  » Emulator  » Emulator guide » Emulator/native platform differences.

Note.pngNote: This is a short tutorial which discusses the basic steps; A lot more information is available in the Carbide Help (Windows: start | All Programs | Symbian Foundation ADT 1.0 | Carbide.c++ | Carbide.c++ Help) in the section Carbide.c++ User Guide > Debugging projects (especially sub-topics "On-Device Connections Overview" and "Debugging variations").

Contents

Carbide.c++ and Target Configuration

1. Make sure that the Phone Debug build configuration is activated:
FD1-7 18.CarbideSelectActiveBuildConfigurationPhoneDebug.png
2. Next, click on the Debug button to start building and executing your application in debug mode.
FD1-7 19.CarbideDebugPhoneGCCE.png

3. The first time you are using on-target debugging, Carbide.c++ automatically generates a debug configuration. A wizard guides you through setting up the connection on your phone.

  • In the first step, choose the default Application TRK Launch Configuration:
    FD1-7 20.CarbideLaunchConfigurationLaunchTypes.png
  • In the following New Connection page, click on New to set up a new on-device debug connection to your phone. Enter a connection name for the phone that you want to use for debugging, and select whether to use USB or Bluetooth. In this example, we’re going to use USB, so make sure that the phone is connected to the PC via the USB cable (setting up a Bluetooth connection is similar to this process).
FD1-7 21.CarbideNewConnectionNameAndType.png


  • The next step, called USB Settings, allows you to configure and test the connection. A remote agent must first be installed on the device to establish the debug connection between your phone and the device.
  • Switch to the Install remote agents tab and select the appropriate remote agent for your version of S60 – in this case, 5.0.0 for S60 5th Edition.

Note.pngNote: Installing the remote agent through this dialog only works if the Nokia PC Suite is running and your device is connected. If you do not have the Nokia PC Suite on your PC, install the debug agent manually by clicking on Save. Store the installer file anywhere on your PC and transfer it to your device using the PC Suite. Note also that if the TRK you need is not present in this dialog (e.g. the Sony Ericsson TRK is not available in early Carbide.c++ releases) you may need to get it from the Carbide update server.

FD1-7 22.CarbideNewConnectionUSBSettings.png
  • After you have installed the debug agent on the phone, start it from the Application folder of the phone menu. Make sure that the status message from the App TRK application tells you that its status is Connected. You can switch between USB and Bluetooth mode by using the options menu. By default, Bluetooth is activated, so the application asks you to set up a Bluetooth connection when you first start it. If you want to use USB, cancel this request, go to the settings and switch to USB.
FD1-7 23.AppTRKonDevice.png
  • Now, you should be able to see and select your device from the Serial Port drop-down list. On your PC, the COM port number is likely to be different to the one shown in the screenshot.
FD1-7 24.CarbideNewConnectionUSBSettingsPortSettings.png
  • Next, select the device OS – again, S60 5.0.0 corresponds to Symbian^1 SDK. Click on Initiate service testing to see if the connection is working. If successful, you should see the status message:
FD1-7 25.CarbideStatusTestTRK.png
  • Click on Next to save your new connection settings. You will then jump back in the previous wizard.

4. Continue to the TRK SIS Selection dialog. If no .sisx file is defined in the SIS File to Install box, click on the dialog's Modify SIS builder settings for build configuration... link to define a new SIS builder configuration (as described in Building a SIS File in Carbide.c++).

FD1-7 26.CarbideTRK SIS Selection.png


5. Click on Finish to start debugging! The application is now built; the resulting .sisx file is silently installed on the phone and launched immediately afterwards. You can set breakpoints in Carbide.c++, debug your application and view memory regions just as when developing on the local PC.

Note.pngNote: You only have to enter these settings once! Next time you debug your application on the phone, simply start the TRK agent on your phone and establish the USB/Bluetooth connection, then press the debug button on Carbide. Everything else is handled automatically.

Summary

This tutorial explained how you configure your phone and Carbide.c++ for on-device debugging.


Licence icon cc-by-sa 3.0-88x31.png© 2010 Symbian Foundation Limited. This document is licensed under the Creative Commons Attribution-Share Alike 2.0 license. See http://creativecommons.org/licenses/by-sa/2.0/legalcode for the full terms of the license.
Note that this content was originally hosted on the Symbian Foundation developer wiki.

This page was last modified on 5 June 2013, at 18:43.
99 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×