Meego Wiki
Views

SDK/Docs/1.1/Debugging for N900 device

From MeeGo wiki
< SDK | Docs | 1.1(Difference between revisions)
Jump to: navigation, search
(Created page with "Category:devguide Category:meego-1.1 Category:tutorial Category:application-developer Category:linux '''Note:''' This page is work-in-progress (27 Oct 2010).…")
 
Line 4: Line 4:
[[Category:application-developer]]
[[Category:application-developer]]
[[Category:linux]]
[[Category:linux]]
 +
[[Category:N900]]
'''Note:''' This page is work-in-progress (27 Oct 2010).
'''Note:''' This page is work-in-progress (27 Oct 2010).

Latest revision as of 14:04, 18 March 2011


Note: This page is work-in-progress (27 Oct 2010).

This page instructs in debugging N900 device in using a USB connection.

Note: For instructions in debugging Qt applications running on a remote MeeGo device, see Debugging in Qt Creator.

Debugging N900 device

To debug your application on your N900 device using a USB connection:

  1. Set up an SSH connection to your N900 device:
    1. Start X Terminal and log in as root:
      sudo -i
    2. Open the interfaces file. You can do this, for example, by running vim /etc/network/interfaces.
    3. Add the following text into the file and save the file:
      /opt/meego/qemu-arm/bin/qemu-system-arm -M n900 -mtdblock meego-handset-armv7l-qemu-1.0.90.3.20100921.1.img -sd sd-empty -sd meego-handset-armv7l-qemu-1.0.90.3.20100921.1-mmcblk0p.raw -serial stdio -clock unix -redir tcp:6666:10.0.2.15:22
    4. Connect your N900 device to your computer with the USB cable:
  2. To install gdbserver on device, set up usb networking:
    1. Start X Terminal on your N900 device and add the default gateway:
      route add default gw 192.168.2.14 usb0
    2. On your host computer, copy resolv.conf from /etc directory to the corresponding directory on your N900 device:
      scp /etc/resolv.conf root@192.168.2.15:/etc/
    3. Install gdb server:
      zypper in gdb-gdbserver
  3. Configure build settings for your application by selecting Projects mode > Build Settings > MeeGo sysroot Debug.
  4. Configure run settings for your application by selecting your device configuration.
  5. Switch to Edit or Debug mode.
  6. Add breakpoints to your code by right-clicking and selecting Set Breakpoint.
  7. Click Start Debugging.
Personal tools