MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Configuring MADDE development targets

MADDE provides a platform version called a target, which is used in application development. The target consists of a sysroot and a cross-compiler toolchain specific for this platform version. Sysroot is a set of libraries and header files, and toolchain provides tools for compiling, linking, and debugging software. You can use MADDE to fetch these MeeGo 1.2 Harmattan cross-compiler toolchains and sysroots and to create a cross-compilation environment for a specific platform version.

Every downloadable MADDE installer package includes configuration files for:

  • targets and runtimes in the current installer package
  • targets and runtimes provided in earlier downloadable MADDE installer packages

Thus, if you install a new MADDE installer on top of an existing MADDE version, you can use both the previously installed and the new targets and runtimes in your development work.

If necessary, you can also update targets manually:

Viewing targets

Before starting to develop an application, verify that you have the needed target, or platform version, installed in MADDE.

  1. To view the list of installed targets, enter the following command:
    mad list
    
    You can now view which targets are installed, available for installation, or set as default in MADDE.
  2. Check the status of the target that you want to select.
  • If the target is marked 'default', you are ready to start developing.
  • If the target is marked 'installed', you are ready to start developing. However, to facilitate application development with MADDE, you can set the target as default.
  • If the target is marked as 'installable', you have to install it before you can start using it.

Creating targets

You can create targets as follows:

  • To install the target, enter the following command:
    mad-admin create <target name>
    Note: You can also create targets that are automatically set as default or within a target.
  • To create a target that is automatically set as 'default', use the -s option. Enter the following command:
mad-admin create -s <target name>
  • To create a binary-compatible runtime within a target and set the target as default, use the -r option. Note that runtime creation takes some time. Enter the following command:
mad-admin create -s -r <target name>

Downloading targets

If you receive an error message stating that the necessary components which comprise the target (either sysroot or toolchain), is not found in MADDE:

  1. To download the files from a specified URL location, enter the following command:
    mad-admin fetch <URL|URL_ALIAS>
    Note: For convenience, URL aliases can be used instead of complete URLs. To list available URL aliases, run the mad-admin fetch command without arguments:
    mad-admin fetch
  2. After fetching the missing sysroot or toolchain, enter the following command:
    mad-admin create <target name>
  3. To check that the command was executed successfully, enter the following command:
    mad list

Setting a default target

When the target has been created successfully, it can be set as default or manually for each command. When a target is set as default, it is automatically used for all commands that require defining a target.

The mad tool uses the default target if you do not overwrite it with the -t option. The default target is stored into the MADROOT/targets/default file.

Note: In the MADDE terminal user guide, MADROOT' refers to the <MADDE install path>.

To set a default target, enter the following command:

mad set <target name>

To define a target which has not been set as default, use the -t option in the command.

Example:

mad -t <target name> make

For more information on MADDE commands, see MADDE command Reference.