Excluding Features from the ROM

Symbian platform can be customised by including or excluding features from the build. A feature is a section of Symbian platform API and its underlying implementation, which is used to accomplish one or more useful tasks. By default, all the features are included in the build.

Symbian platform provides ROM building tools for device creators to customise the OS according to their requirements. The ROM building kit includes the following files, which are used to exclude features from the build:

  • RemovableFeatures.iby: This file defines macros for all features that can be excluded from the Symbian platform build.

  • featureUIDs.xml: This file lists the UIDs for all the features that can be included or excluded from a Symbian platform build. The file also specifies the default range for these UIDs.

    You can include or exclude any of the features that are listed in the featureUIDs.xml file.

  • feature.iby: This file specifies whether to include or exclude the features listed in the featureUIDs.xml file based on the exclude macros defined in RemovableFeatures.iby. It uses the corresponding exclude macros defined in the RemovableFeatures.iby file to include or exclude features from the Symbian platform build. This file can be created by features tool. See How to Use the features Tool.

  • featureUIDs.h: This file defines constants for each feature listed in the featureUIDs.xml file.

    For example, the following defines a constant to store the UID for USB feature:

    const TUid KUsb= {0x10282663};

    This file can be created by features tool. See How to Use the features Tool.

As a device creator, you might want to exclude a feature from the Symbian platform build. To do so, follow the steps outlined below:

  1. Edit the RemovableFeatures.iby file to define an exclude macro for a Symbian platform feature listed in featureUIDs.xml.

    For example, the following macro definition in the RemovableFeatures.iby is used to exclude the USB feature from the Symbian platform build:

    #ifndef __REMOVABLEFEATURES_IBY__
    #define __REMOVABLEFEATURES_IBY__

    #define SYMBIAN_EXCLUDE_USB

    #endif
  2. Edit the feature.iby file and define a conditional block (#ifdef ... #endif) to remove a feature based on the exclude macro defined in RemovableFeatures.iby.

    For example, the following removes the USB feature from the Symbian platform build, if the corresponding exclude macro is defined in the RemovableFeatures.iby:

    #ifdef  SYMBIAN_EXCLUDE_USB
    EXCLUDE_FEATURE Usb
    #else
    FEATURE Usb
    #endif

    Note: The feature name passed as an argument to EXCLUDE_FEATURE and FEATURE macros must match with the feature name in the featureUIDs.xml file.

To include or exclude features from a Symbian platform build, use FEATURE and EXCLUDE_FEATURE obey file keywords along with the option statusflags and userdata for overriding their default values in the XML file.

To include a feature that is already excluded from the Symbian platform build, edit the RemovableFeatures.iby file and remove the corresponding exclude macro definition.

See Also

Enabling Feature Data File Generation