The fshell build system uses a number of macros to control what should be built and how. These are defined in fshell/build/common/common.mmh and fshell/build/<PLATFORM>/platform.mmh. Each platform defines the things it does and doesn't support in its platform.mmh. common.mmh takes these and defines some derived macros. This system allows fshell to be built in a large number of configurations, ranging from minimal base textshell on Symbian OS v9.1 to full GUI on the latest Symbian Foundation codeline.
Any code wishing to use the fshell conditional system should #include <fshell/common.mmh>
and use the macros below and/or the ones defined in common.mmh to decide how to behave. Below follows the complete list of things that the platform.mmh can define. This isn't the complete list of all the macros that can be used, for that see common.mmh directly. common.mmh can be included anywhere that the preprocessor is used - eg in source code, MMP files, RSS files or bld.infs.
The macros that have a [NO_] in are assumed to be supported unless the [NO_] variant is defined. Eg in your MMP file you would check for btrace support with #ifdef FSHELL_BTRACE_SUPPORT
and to say a platform didn't support it you'd add #define FSHELL_NO_BTRACE_SUPPORT
to the platform.mmh. Unless the platform.mmh says otherwise, common.mmh would define FSHELL_BTRACE_SUPPORT
. Everything in fshell that uses btrace checks for FSHELL_SUPPORT_BTRACE
in either the bld.inf (in the case of a command that shouldn't be built at all if btrace isn't available) or in its MMP and/or source code (for a command that can still offer some functionality when btrace isn't available).
BTrace (including timestamp2) supported in kernel. Everything except legacy v9.1-based platforms support btrace.
Pips runtime available.
Platform/toolchain supports patchdata. Everything since about Symbian OS v9.1 does therefore it is assumed to be supported by default.
Kern::DynamicDfcQCreate API is present. Also used to guard TDfc::RawAdd.
buildrom macro to say that iosrv should replace econs.DLL with its own implementation.
S60 platform (value of this is either 3 or 5, for 3rd edition or 5th edition, or > 5 for foundation). Various UI code uses this to decide whether to build or not.
Symbian Foundation platform (value of this is n, where n is Symbian^n). Currently 3 is used for Symbian^3 or greater.
Symbian Timebox release (value can be 92 or 101).
Used to guard things that don't work in Symbian OS v9.1, that don't have their own macro. Its use is discouraged in any new code. Currently guards: switchview missing API; missing thread priorities; demand paging definitions; missing RFs API; kernel TFindHandle class.
All capabilities are available (platform.mmh must define either this macro or the specific FSHELL_CAP_xxx
that are supported)
Protected uids (0x10xxxxxx) should be used, as opposed to unprotected (0xE0xxxxxx), for exe and dll UID3. The UIDs themselves are all defined at the bottom of common.mmh so nothing else uses this macro directly. Unprotected UIDs should only be specified if the platform produces an unsigned or self-signed sis file.
Shorthand for defining the set of capabilties supported by Symbian Open Signing. For more information see https://www.symbiansigned.com/app/page/public/openSignedOnline.do . FSHELL_PROTECTED_UIDS must not be defined if open signing is being used.
Configure IBYs for base 'rom' command rather than 'buildrom' style.
ESock and C32 are available.
Bluetooth is available. If FSHELL_COMMS_SUPPORT
isn't available, BT is assumed not to be, also.
Etel and SMS available.
Apparc available.
Zip libraries available.
MMF/Devsound available.
Graphical windowserver (either version) is present (as opposed to text windowserver).
Gui libraries are available (as opposed to textshell or minigui environment). Assumed unless FSHELL_NO_GUI_SUPPORT or FSHELL_NO_WSERV_SUPPORT is defined.
Windowserver v2 is being used. Very few things need to know what windowserver version is in use, but occasionally it is needed.
The image conversion libraries (ICL) are available.
RAM defrag (in form of TRamDefragRequest API) is supported.
Indicate that local fshell connections (using the device screen and keyboard) should be available from the app launcher. If the combined launcher is not available, a separate application icon called "fshell (local)" will be created.
Indicate that remote TCP/IP connections (using vt100tcpcons) should be available from the app launcher. If the combined launcher is not available, a separate application icon called "fshell (TCP)" will be created.
Indicate that remote Bluetooth connections (using vt100btcons) should be available from the app launcher. If the combined launcher is not available, a separate application icon called "fshell (BT)" will be created.
Indicate that remote USB connections (using vt100usbcons) should be available from the app launcher. If the combined launcher is not available, a separate application icon called "fshell (USB)" will be created. The value of the macro is the console-title arguments to use (eg "port=ACM::1"
).
Indicate that remote USB connections (using vt100usbcons) should be available from the app launcher. If the combined launcher is not available, a separate application icon called "fshell (Serial)" will be created. The value of the macro is the console-title arguments to use (eg "port=COMM::1,rate=115200"
).
Indicate that remote rcons connections should be available from the app launcher. Legacy. If defined a separate application icon called "fshell (rcons)" will be created.
Build platform specific license support into fshell. Note, the platform must export \epoc32\build\fshell\core\generated\license.cpp that provides the implementation of the interface defined in \fshell\core\src\license.h. Obsolete.
Samping profiler (profiler.h) is present. (foundation forgot to include it in S^2).
Put "FLOGGER_clogger_stub.DLL" into the ROM file as "flogger.dll". Should only be specified at rombuild time (ie not in the platform.mmh).
Put "COMSDBGUTIL_clogger_stub.DLL" into the ROM file as "comsdbgutil.dll". Should only be specified at rombuild time (ie not in the platform.mmh).
Optional function-like macro, can be defined to override default IBY export path. Only a few platforms need to override this.
Optional function-like macro, can be defined to override default IBY export path. Only a few platforms need to override this.
The kernel supports Epoc::CopyToShadowMemory.
LBS libraries (Symbian or S60) are available.
SQLite libraries are available.
Embedded-system Graphics Library is available. If FSHELL_NO_WSERV_SUPPORT is defined, it is assumed EGL is not supported either.
Open Vector Graphics Library is available. If FSHELL_NO_WSERV_SUPPORT is defined, it is assumed OpenVG is not supported either.
Defined if the target platform is ARM11. Eg ARM1136 or ARM1176. Do NOT define for Cortex A8/A9. Only used by fdb.
Defined if the target platform supports ARM PRB. Should be defined for Cortex A8/A9. Only used by fdb.
On newer baselines DObjectIx has been replaced. This macro is to (hopefully temporarily) guard code that assumes that DObjectIx is being used.
Cryptographic libraries are available.
SHA2 message digest implementation is available.
MD4 message digest implementation is available.
Indicates that the baseline is recent enough to be aware of the flexible memory model. It doesn't necessarily mean that the flexible model is actually the one being used. It generally guards kernel APIs that weren't introduced until the FMM was (such as Kern::ChunkUserBase).
The regular expression libraries spcre.dll and libpcre.dll are available.
The Dynamic Startup Configuration (DSC) APIs such as RDscStore are available.
The MemSpy Engine APIs are available.
The TestExecute APIs are available.
The TraceCore APIs are available.
The HTTP libraries and all associated headers are available.
This macro has been removed as it is no longer necessary. The header <fshell/usbostcomm.h> is now available in all baselines.
The trolls are here!
As a convenience for building fshells commands that use Qt, a custom MMP include is available to set up the appropriate MMP configuration options and includes and to link against QtCore.lib. To use it add #include <fshell/fsh_qt_include.mmh>
to your MMP file. Any Qt libraries other than QtCore must have library
statements as normal.
For building Qt stuff with RVCT, RVCT 2.2 build 686 or later is required.
The RLoader::Delete() API is available in e32ldr.h or e32ldr_private.h
A couple of further macros follow - these are specifically for platforms that provide an custom implementation of the relevant command rather than using fshell's built-in version.
An example platform.mmh is included below. This is for an imaginary platform based on the S^4 release, that is text-only but supports most other things. Generally the older and/or more restricted the platform is, the more FSHELL_NO_...
macros you have to define.
// platform.mmh for the imaginary Mythic platform // This would belong in \fshell\build\mythic\platform.mmh
#ifndef FSHELL_PLATFORM_MMH #define FSHELL_PLATFORM_MMH
// We support all Platsec capabilities #define FSHELL_CAP_ALL #define FSHELL_PROTECTED_UIDS
// We're based on S^4 #define FSHELL_PLATFORM_FOUNDATION 4
// We are Mythic v1 #define FSHELL_PLATFORM_MYTHIC 1
// We are text-only #define FSHELL_NO_WSERV_SUPPORT
// We have a recent kernel that supports the flexible memory model #define FSHELL_FLEXIBLEMM_AWARE #define FSHELL_NO_DOBJECTIX_SUPPORT
// For the sake of argument, say we don't support Location Based Services but we do support regexes #define FSHELL_NO_LBS_SUPPORT #define FSHELL_SPCRE_SUPPORT
#endif // FSHELL_PLATFORM_MMH
Copyright (c) 2008-2011 Accenture. All rights reserved.