MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Developer tools

On the MeeGo 1.2 Harmattan platform, you can use a wide range of developer tools to:

  • Debug your applications and test their performance with the tools available on the device.
  • Test your applications in an environment practically identical to the Harmattan device with the Harmattan emulator (available for the Qt SDK and Harmattan Platform SDK) or Qt Simulator.

On-device tools

When you have activated developer mode, the following tools are installed on the device:

  • sdk-connectivity
  • meego-terminal
  • ssh
  • devel-su
  • VNC server

For more information on these tools, see Activating developer mode.

The VNC server is an additional application installed with the SDK Connectivity tool. For more information on VNC support in Harmattan, see section Launching remote connections with VNC.

You can also install additional on-device tools through the developer mode screen in the device Settings.

Additional on-device tools

The additional on-device tools are grouped into Debugging, Networking, Resource usage analysis, Power analysis, Performance, Tracing, Test automation, Utilities, and Logging categories. To install a tool, you must install the bundle package that includes all the tools in the category.

Additional developer tools
Tool category Tools available
Debugging
  • maemo-debug-scripts: provides a convenience package for debugging programs
  • GDB: shows what is going on inside an application while it executes, or what an application was doing at the moment it crashed
Networking
  • tcpdump: provides a powerful utility to capture and monitor network traffic data
Resource usage analysis
  • Valgrind: provides an open source suite of tools for debugging and profiling Linux programs
  • sp-memusage: provides a collection of memory usage monitoring tools and scripts
  • sp-endurance: provides tools to save various system endurance related information (resource usage, errors) on the target
  • sp-endurance-postproc: provides post-processing tools for producing reports from the data collected by sp-endurance
  • sp-smaps-measure: provides a tool for capturing memory consumption information of a process
  • sp-smaps-visualize: provides utilities for analysing smaps data captured by sp-smaps-measure
  • xrestop: provides statistics of each connected X11 client's server side resource usage
Power analysis
  • Energy Profiler: monitors power consumption, cumulative energy consumption, CPU processing activities, memory use, and network IP traffic activities on your Harmattan device
  • PowerTOP: tracks wake-ups and system states
Performance
  • OProfile: provides a system-wide profiler for Linux systems, capable of profiling all running code at low overhead
  • swaplogger: measures application frame update/drawing rate
  • xresponse: measures application response times to user input and monitors how and when the application updates its user interface.
  • htop: provides a text-only, interactive process viewer
Tracing
  • strace: shows how an application interacts with the operating system and how it uses the system calls or a subset of them
  • latrace: runs commands and traces and displays their dynamic library calls using a LD_AUDIT Glibc feature
  • functracer: collects backtraces, arguments and return values of functions specified in a plugin
  • sp-rtrace: runs programs and collects resource allocation and free backtraces from a given set of functions, even from optimised binaries
  • sp-rtrace-visualize: provides visualization tools and scripts for getting statistics and visualizations out of the sp-rtrace and functracer trace files
  • xtrace: provides an X server proxy that logs a human-readable trace of the X calls (done by X clients) and the X server replies
Test automation
  • xnee: provides a suite of programs that can record, replay and distribute user actions (X events) under the X11 environment
  • sp-stress: provides utilities that create artificial system load (CPU, memory and IO use) while other tests are being done
Utilities
  • wget: provides a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols
  • nano: provides a basic text editor with some additional features, for instance, for using shortcuts and positioning the cursor
  • x11-utils: provides a set of basic X window system debugging tools
Logging
  • sysklogd: provides a daemon that generates logs of messages received from programs and facilities on local and remote hosts
  • sp-timestamp: allows you to mark positions in the process execution and view them in LTTng GUI and when using strace

Emulation tools

In general, test your applications by running them on a Harmattan device. However, you can also use the Harmattan emulator (QEMU) or Qt Simulator as a secondary testing environment.

Consider at least the following differences when selecting your emulation tool:

  • When you use QEMU, the binary is compiled to the target device's architecture and when run, it uses the same libraries as the Harmattan device.
  • When you use Qt Simulator, the binary is compiled to the development host's architecture and when run, it uses the libraries in the host. For more information on Qt Simulator, see Qt documentation.
    • You can use Qt Simulator for testing an application that only uses Qt Mobility and Qt 4.7 APIs.

QEMU

You can use QEMU to run and test applications in an environment practically identical to the device. QEMU provides the Harmattan system and emulates the device hardware. Use QEMU to test the Harmattan user experience and run and test your application with the Harmattan services running.

You can use QEMU with the Qt SDK or Harmattan Platform SDK: