Using Soft Attach for On-Device Debugging

NEEDS REWRITING

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.

There are several components that must be provided to the debugger so that it can communicate with the attached hardware device. They are:

If the New Launch Configuration Wizard is used, you will be asked to identify the above files. If you used the New or Debug dialog to create a launch configuration, make sure that the above files are supplied.

The major steps to perform a soft attach are:

  1. Import and build your project and the ROM image
  2. Startup the device using the ROM image
  3. Setup the debugger and begin debugging

1. Importing and building the project and ROM image

  1. Import the project
  2. Build the project
  3. Create a ROM image

    Enter the desired command-line arguments for the ROM image in the ROM Build Command Line text box in the Carbide ROM Build Settings panel of the Properties for <project> dialog.

2. Starting up the device with the ROM image

  1. Transfer the ROM image to the hardware via memory card or flash
  2. NOTE Ensure that the hardware includes a boot loader program so that it can boot the ROM image from the memory card.

  3. Power up the device

    Once the operating system has booted up, it is ready for the debugger to attach

 

3. Setting up the debugger to debug

  1. On the hardware, launch the program to debug
  2. Click Run > Debug to launch the New Launch Configuration Wizard
  3. In the Launch Types page
    1. Select the TCF Launch Configuration
    2. Click Next
  4. In the Symbian ROM Image Settings page
    1. Enter the path to the TCF Initialization Script .cmm file
    2. Select the Target Processor
    3. Click Next
    In the Symbian ROM Image Settings page
    1. Enable Soft attach
    2. Enter the Symbian ROM Log File
    3. Click Next
  5. In the New Launch Configuration page
    1. Enable the "Open launch configuration for additional customization of launch settings" option
    2. Click Finish
  6. 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.
  7. Figure 2. Debugger stopping at a random address using soft attach

  8. Debug the program in the Carbide debugger
  9. Once the debugger is connected to the hardware you can:

    If breakpoints were already set in the project then an Editor view should display them as resolved. If no breakpoints have been set, now is the time to add them.

    NOTE The number of breakpoints you can set is controlled by the hardware.

Related references