# HG changeset patch # User fturovic # Date 1279309372 18000 # Node ID 0c69c533fa52e64863211d35e2837e9a885fecfa # Parent 82122e7b15549704904cdd5d104462fb9282176b draft of run mode tutorial material diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_edit_settings.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/icon_edit_settings.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_01.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_01.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_02.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_02.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_05.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_05.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_06.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_06.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_07.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/images/run_mode_debug_07.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_00.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_00.htm Fri Jul 16 14:42:52 2010 -0500 @@ -0,0 +1,27 @@ + + + + + + +Debugging on Remote Targets (Run-mode) Tutorial + + + +

Debugging on Remote Targets (Run-mode) Tutorial

+

In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

+
    +
  1. Connect target device for PC
  2. +
  3. Install TRK v3.2.6 remote agent or later on the target device
  4. +
  5. Configure project for debugging
  6. +
  7. Debug project on target device
  8. +
+

Other references

+ + + + + \ No newline at end of file diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_01.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_01.htm Fri Jul 16 14:42:52 2010 -0500 @@ -0,0 +1,43 @@ + + + + + + +Connect target device to PC Tutorial + + + +

Connect target device to PC

+

In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

+
    +
  1. Connect target device to PC
  2. +
  3. Install TRK remote agent (v3.2.6) or later on the target device
  4. +
  5. Configure project for debugging
  6. +
  7. Debug project on target device
  8. +
+
+

The most reliable connection between a remote device and your PC is a cable. In this case, the USB cable that physically connects your phone to the a PC USB connection. Once connected, Carbide uses plug-and-play (PnP) to create a remote connection to the phone or remote device.

+

NOTE This tutorial assumes that Carbide is setup properly enabling you to create, build, and debug applications with an emulator.

+
+

Connecting remote devices to PC

+
    +
  1. Connect the USB cable between the remote device and PC running Carbide.
    +

    Use the Remote Connections view to verify a successful connection or by looking at the remote connection trim display shown at the bottom of the workplace window.

    +

    Remote Connection view   Remote Connection trim indicator

    +

    The Status column indicates whether the service you need for debugging, TRK, is Available. If it's status is Not Accessible you are probably missing the TRK remote agent on the remote device.

    +
  2. +
  3. Click OK on the remote device when it asks to use PC Suite mode with USB.
    +

    NOTE Debugging requires the use of PC Suite mode. If you are in another mode, like Mass storage mode, an alert appears asking you to change.

    +
  4. +
+
+

NEXT: Install TRK remote agent

+

Other references

+ + + + + \ No newline at end of file diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_02.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_02.htm Fri Jul 16 14:42:52 2010 -0500 @@ -0,0 +1,49 @@ + + + + + + +Install TRK remote agent Tutorial + + +

Install TRK remote agent

+

In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

+
    +
  1. Connect target device to PC
  2. +
  3. Install TRK remote agent (v3.2.6) or later on the target device
  4. +
  5. Configure project for debugging
  6. +
  7. Debug project on target device
  8. +
+
+

To debug on a remote device you need a program to communicate between the Carbide debugger and your executable running on the device. That program is the TRK (Terminal Resident Kernel) remote agent, also known as Application TRK.

+

 

+
+

Installing or updating the TRK remote agent

+
    +
  1. Select the Connection to edit in the Remote Connections view.
  2. +
  3. Click the Edit Settings... icon (Edit Settings icon) in the Remote Connections toolbar.
    +

    Click Edit Settings icon

    +
  4. +
  5. Click the Install Remote Agents tab.
    +

    Click Install Remote Agents tab

    +
  6. +
  7. Select the latest remote agent to install.
    +

    Choose the remote agent to install. Since there are different builds for different OSes, knowing the OS installed on the device helps.

    +
  8. +

    Click Install Remote Agents tab

    +

    NOTE If you don't know what OS version is on the device, always choose the remote agent that supports the highest OS version available. Should that one not work, drop down to the next OS version in line and repeat.

    +
  9. +

    Click Install.

    +
  10. +
+
+

NEXT: Configure project for debugging

+

Other references

+ + + + + \ No newline at end of file diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_03.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_03.htm Fri Jul 16 14:42:52 2010 -0500 @@ -0,0 +1,31 @@ + + + + + + +Configure project for debugging Tutorial + + + +

Configure project for debugging

+

In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

+
    +
  1. Connect target device to PC
  2. +
  3. Install TRK remote agent (v3.2.6) or later on the target device
  4. +
  5. Configure project for debugging
  6. +
  7. Debug project on target device
  8. +
+
+

 

+

Configure project for debugging

+

 

+

NEXT: Debug project on target device

+

Other references

+ + + + + \ No newline at end of file diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_04.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/tutorials/run_mode_debug_example_04.htm Fri Jul 16 14:42:52 2010 -0500 @@ -0,0 +1,29 @@ + + + + + + +Debug project on target device Tutorial + + + +

Debug project on target device

+

In this example we demonstrate how to debug applications on a remote device using the Application TRK remote debug agent. This enables you to test programs on the actual device it will operate on while observing its behavior using the Carbide debugger. The steps to do this include:

+
    +
  1. Connect target device to PC
  2. +
  3. Install TRK remote agent (v3.2.6) or later on the target device
  4. +
  5. Configure project for debugging
  6. +
  7. Debug project on target device
  8. +
+
+

 

+

 

+

Other references

+ + + + + \ No newline at end of file diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_01.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_01.htm Fri Jul 16 14:41:18 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_01.htm Fri Jul 16 14:42:52 2010 -0500 @@ -1,30 +1,30 @@ - - - - - - -Installing PERL - - - -

Installing PERL

-

PERL is required for many Symbian OS utilities and commands.

-
-

Installing PERL

- -
-

Software can be downloaded from: http://www.activestate.com/Products/ActivePerl/.

-

NOTE Later releases of Perl are not yet supported by the Symbian utilities and can cause unknown compiling errors.

-
-
-
Other references
- - - - - + + + + + + +Installing Perl + + + +

Installing Perl

+

Perl is a high-level, general-purpose, interpreted, dynamic programming language which many Symbian OS build utilities and commands require.

+
+

Installing Perl

+ +
+

Software can be downloaded from: http://www.activestate.com/Products/ActivePerl/.

+

NOTE Later releases of Perl are not yet supported by the Symbian utilities and can cause unknown compiling errors.

+
+
+
Other references
+ + + + + diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_02.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_02.htm Fri Jul 16 14:41:18 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_02.htm Fri Jul 16 14:42:52 2010 -0500 @@ -1,61 +1,59 @@ - - - - - - -Installing an SDK - - - -

Installing an SDK

-

To create projects an SDK must be installed. If more than one SDK is installed one must be specified as the default.

-
-

Installing an SDK

-

The following SDKs can be downloaded from Nokia at: http://www.forum.nokia.com/.

-
    -
  1. Install at least one of the following SDKs using the install directions that accompany the SDK: -
      -
    • Series 60 5.0
    • -
    • Qt for S60
    • -
    • Series80
    • -
    • Series 60 cust kits
    • -
    • Techview Development kits
    • -
    -
  2. -
  3. Set the default SDK to use for projects -
      -
    1. In Carbide.c++ -
        -
      1. Click Window > Preferences > Carbide.c++ > SDK Preferences to open the SDK Preferences panel
      2. -
      3. Select the SDK and click SDK Properties to open the SDK Properties dialog
      4. -
      5. Set the Default SDK value to Yes
      6. -
      7. Close all the dialogs
      8. -
      -
    2. -
    3. In a command-line prompt: -
        -
      1. Set the default device devkit by typing on the command line:
        -
        - > devices –setdefault @device id: name
      2. -

        The device id and name can be found in the devices.xml file. For example, for a Techview 9.2 kit you might type
        -
        - > devices –setdefault @ SymbianOS_92_2006_wk40:com.symbian.techview

        -
      3. Now ensure the default device is set by entering:
        -
        - > devices
      4. -
      -
    4. -
    5. Make sure the correct SDK default is set.
    6. -
    -
  4. -
-
- -
Other references
- - - - + + + + + + +Installing an SDK + + + +

Installing an SDK

+

To create projects an SDK must be installed. If more than one SDK is installed one must be specified as the default.

+
+

Installing an SDK

+

The following SDKs can be downloaded from Nokia at: http://www.forum.nokia.com/.

+
    +
  1. Install at least one of the following SDKs using the install directions that accompany the SDK: +
      +
    • Nokia Symbian^3
    • +
    • Nokia Qt for SDK 1.0
    • +
    • S60 5th Edition v1.0
    • +
    +
  2. +
  3. Set the default SDK to use for projects +
      +
    1. In Carbide.c++ +
        +
      1. Click Window > Preferences > Carbide.c++ > SDK Preferences to open the SDK Preferences panel
      2. +
      3. Select the SDK and click SDK Properties to open the SDK Properties dialog
      4. +
      5. Set the Default SDK value to Yes
      6. +
      7. Close all the dialogs
      8. +
      +
    2. +
    3. In a command-line prompt: +
        +
      1. Set the default device devkit by typing on the command line:
        +
        + > devices –setdefault @device id: name
      2. +

        The device id and name can be found in the devices.xml file. For example, for a Techview 9.2 kit you might type
        +
        + > devices –setdefault @ SymbianOS_92_2006_wk40:com.symbian.techview

        +
      3. Now ensure the default device is set by entering:
        +
        + > devices
      4. +
      +
    4. +
    5. Make sure the correct SDK default is set.
    6. +
    +
  4. +
+
+ +
Other references
+ + + + diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_03.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_03.htm Fri Jul 16 14:41:18 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_03.htm Fri Jul 16 14:42:52 2010 -0500 @@ -1,49 +1,49 @@ - - - - - - -Configuring Environment Variables - - - -

Configuring Environment Variables

-

To implement run mode on-device debugging the following tasks need to be completed.

-
-

Configuring Environment Variables

-
    -
  1. Set EPOCROOT variable -
      -
    1. Right click on My Computer and select Properties
    2. -
    3. Select the Advanced tab
    4. -
    5. Select the Environmental Variables button
    6. -
    7. Setup a new System variable called EPOCROOT. The value will depend on the path of the epoc32 folder in the kit, for example:
    8. -

      Variable name: EPOCROOT
      - Variable value: \bin\techview\

      -
    -
  2. -

    NOTE Take note of the location of the epoc32 folder when using multiple kits. Some kits place the epoc32 folder at \bin\techview\ and some kits will place it at the root. If you have multiple installations and switch to a new kit, you will need to change the EPOCROOT path; otherwise build problems may occur. When building the ROM image, scripts may complain about the EPOCROOT path or that it can’t find bldmake.bat if an incorrect EPOCROOT path is set.

    -
  3. Set Path to Tools Directory -
      -
    1. If using an installer the tools path is set up automatically and points to:
    2. - Variable: PATH
      - Value: C:\Program Files\Common Files\Symbian\Tools -
    3. If installing from zip files you will need to setup the tools path manually. Add the path to the beginning of the PATH variable:
    4. - Variable: PATH
      - Variable Value: \epoc32\tools;\epoc32\gcc\bin; -
    5. If using multiple kits that use a mix of installer and zip files then you can set up your PATH variable like this:
    6. - Variable: PATH
      - Value: \epoc32\tools;\epoc32\gcc\bin;C:\Program Files\Common Files\Symbian\Tools -
    -
  4. -
-
-
Other references
- - - - - + + + + + + +Configuring Environment Variables + + + +

Configuring Environment Variables

+

To implement run mode on-device debugging the following tasks need to be completed.

+
+

Configuring Environment Variables

+
    +
  1. Set EPOCROOT variable +
      +
    1. Right click on My Computer and select Properties
    2. +
    3. Select the Advanced tab
    4. +
    5. Select the Environmental Variables button
    6. +
    7. Setup a new System variable called EPOCROOT. The value will depend on the path of the epoc32 folder in the kit, for example:
    8. +

      Variable name: EPOCROOT
      + Variable value: \bin\techview\

      +
    +
  2. +

    NOTE Take note of the location of the epoc32 folder when using multiple kits. Some kits place the epoc32 folder at \bin\techview\ and some kits will place it at the root. If you have multiple installations and switch to a new kit, you will need to change the EPOCROOT path; otherwise build problems may occur. When building the ROM image, scripts may complain about the EPOCROOT path or that it can’t find bldmake.bat if an incorrect EPOCROOT path is set.

    +
  3. Set Path to Tools Directory +
      +
    1. If using an installer the tools path is set up automatically and points to:
    2. + Variable: PATH
      + Value: C:\Program Files\Common Files\Symbian\Tools +
    3. If installing from zip files you will need to setup the tools path manually. Add the path to the beginning of the PATH variable:
    4. + Variable: PATH
      + Variable Value: \epoc32\tools;\epoc32\gcc\bin; +
    5. If using multiple kits that use a mix of installer and zip files then you can set up your PATH variable like this:
    6. + Variable: PATH
      + Value: \epoc32\tools;\epoc32\gcc\bin;C:\Program Files\Common Files\Symbian\Tools +
    +
  4. +
+
+
Other references
+ + + + + diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_04.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_04.htm Fri Jul 16 14:41:18 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/run_mode_debug_04.htm Fri Jul 16 14:42:52 2010 -0500 @@ -1,35 +1,35 @@ - - - - - - -Setup a Virtual Drive for Techview and Cust Kits - - - -

Setup a Virtual Drive for Techview and Cust Kits (optional)

-

Techview Kits and cust kits have kernel components, kernel extensions and device drivers that are typically built on a virtual drive. So if you want to debug them the debugger will need to load files from the virtual drive that the binaries were built on. If you do not know the virtual drive the kit was built on you should first pick a drive letter randomly.

-
-

Setup a Virtual Drive for Techview and Cust Kits

-
    -
  1. To subst a drive, type on a command line:
    - > subst drive_letter: path_to_kit
    -
    For example:
    -> subst M: C:\Symbian\S60_3_0_200626
  2. -
  3. On the command line type:
    ->subst
    -

    You should see the new virtual drive pointing to your kit. If the debugger tries to load a file it can’t find, it will look for it on the virtual drive. You can see this in the stack crawl. The stack crawl should give the full path of the file on the virtual drive the file was built on. The debugger will not be able to load the file until the correct virtual drive is specified.

    -

    If this happens you can redo the virtual drive to use the drive specified in the stack crawl or navigate to the file using the existing virtual drive. From that point the IDE will add that path and recursively check folders for files it needs.

    -
  4. -
  5. Make sure when you set up your default SDK in the Carbide IDE that you use the virtual drive.
  6. -
-
-
Other references
- - - - - + + + + + + +Setup a Virtual Drive + + + +

Setup a Virtual Drive (optional)

+

SDKs have kernel components, kernel extensions and device drivers that are typically built on a virtual drive. So if you want to debug them the debugger will need to load files from the virtual drive that the binaries were built on. If you do not know the virtual drive the kit was built on you should first pick a drive letter randomly.

+
+

Setup a Virtual Drive for SDKs

+
    +
  1. To subst a drive, type on a command line:
    + > subst drive_letter: path_to_kit
    +
    For example:
    +> subst M: C:\Symbian\S60_5_0_201012
  2. +
  3. On the command line type:
    +>subst
    +

    You should see the new virtual drive pointing to your kit. If the debugger tries to load a file it can’t find, it will look for it on the virtual drive. You can see this in the stack crawl. The stack crawl should give the full path of the file on the virtual drive the file was built on. The debugger will not be able to load the file until the correct virtual drive is specified.

    +

    If this happens you can redo the virtual drive to use the drive specified in the stack crawl or navigate to the file using the existing virtual drive. From that point the IDE will add that path and recursively check folders for files it needs.

    +
  4. +
  5. Make sure when you set up your default SDK in the Carbide IDE that you use the virtual drive.
  6. +
+
+
Other references
+ + + + + diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new.png Binary file core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new.png has changed diff -r 82122e7b1554 -r 0c69c533fa52 core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new_hover.png Binary file core/com.nokia.carbide.cpp/themes/carbide/graphics/icons/obj48/c3_new_hover.png has changed