sbsv1_os/e32toolp/docs/cpu_specific_builds.txt
branchRCL_3
changeset 73 22bdd8a90cc4
equal deleted inserted replaced
62:7416fe50a180 73:22bdd8a90cc4
       
     1 
       
     2 Intro.
       
     3 The ARMV5 build supports the notion of customization. This allows a
       
     4 programmer to define a new build target that is derived from the ARMV5
       
     5 build. A new build target is defined via a .BSF file. The build system
       
     6 becomes aware of a customized build by the presence of its .BSF file
       
     7 in $(EPOCROOT)\epoc32\tools. Such customizations are referred to by
       
     8 the name of their .BSF file e.g. the file XScale.bsf defines the build
       
     9 target XScale. This name can be used in exactly the same way as
       
    10 built-in names such as ARMV5.
       
    11 
       
    12 BSF Syntax It is intended that the syntax of a .BSF file be toolchain
       
    13 specific with the exception of the obligatory header:
       
    14 
       
    15 #<BSF>#					: token to identify this as a BSF file must appear at start of first line.
       
    16 CUSTOMIZES 	build			: identitifies which build is customized by this spec  e.g. ARMV5.
       
    17 
       
    18 Currently only ARMV5 can be customized which is the only supported
       
    19 RVCT toolchain build. ARMV5 implements the 'mostly thumb' policy. The
       
    20 ARMV5 specific .BSF syntax is as follows:
       
    21 
       
    22 
       
    23 THUMB_OPTIONS	opt1 opt2 ...	: compiler options used by default for user side code (expected to be THUMB mode)
       
    24 ARM_OPTIONS	opt1 opt2 ...	: compiler options used when BUILD_AS_ARM etc are specified (expected to be ARM mode)
       
    25 KERNEL_OPTIONS	opt1 opt2 ...	: compiler options used to compile kernel side code
       
    26 COMMON_OPTIONS	opt1 opt2 ...	: compiler options that are added to all the above
       
    27 
       
    28 The above four keywords specify compiler options that can be overriden
       
    29 in an MMP file via OPTION: e.g.
       
    30 
       
    31 OPTION ARMCC -Ospace.
       
    32 
       
    33 A final keyword specifies the system-wide options that cannot be
       
    34 overridden in an MMP file via OPTION. Typically these specify options
       
    35 within the EABI e.g. the SOFTVFP calling convention. They are called
       
    36 invariant since code compiled with different settings will not be
       
    37 binary compatible.
       
    38 
       
    39 INVARIANT_OPTIONS	opt opt2 ...	: these options are appended to all compiler command lines
       
    40 
       
    41 The following is the contents of the example file
       
    42 armv5_cpu_spec_example.bsf which is exported to
       
    43 $(EPOCROOT)\epoc32\tools from e32toolp\platform. It is intended that
       
    44 users can use this a the basis for their own customizations.
       
    45 
       
    46 --------------------------------EXAMPLE-----------------------------------
       
    47 
       
    48 #<bsf>#
       
    49 
       
    50 # Example build specialization file 
       
    51 # 
       
    52 # NB currently specialization only applies to ARMV5 build using RVCT.
       
    53 
       
    54 # This file customizes the default ARMV5. It specifies a build that
       
    55 # always uses optimization level O1 rather than the default O2.
       
    56 customizes ARMV5
       
    57 
       
    58 # The following options that can be overridden by MMP files
       
    59 
       
    60 # Use these options when compiling user-side THUMB code
       
    61 thumb_options	-thumb -O1 
       
    62 
       
    63 # Use these options when compiling user-side ARM code
       
    64 arm_options	-arm -O1 
       
    65 
       
    66 # Use these options when compiling Kernel code
       
    67 kernel_options	-arm -O1 
       
    68 
       
    69 # This just factors out common (contingent) options from the above.
       
    70 # These options can also be overridden by MMP files.
       
    71 common_options	--diag_suppress 1,161,654,1135,1152,1300 --diag_error 1267
       
    72 
       
    73 # Fixed options for this build. These options should only be changed with great care since
       
    74 # they have the potential to introduce incompatible ABI (or machine) level effects.
       
    75 # -cpu 5T - this build just targets a generic 5T
       
    76 # -Ono_known_library - we use our own library so tell the compiler not to make assumptions about its implementation
       
    77 # -fpu softvfp - some system code explicitly assumes this variant of the EABI (softvfp+vfp could be used on say XScale)
       
    78 # --dll_vtbl - this switches on class exporting and is needed to support Symbian OS DLL model
       
    79 # -apcs /inter - redundant on 5T, but worth saying anyway
       
    80 invariant_options	-cpu 5T -fy -Ono_known_library -fpu softvfp --dll_vtbl -apcs /inter
       
    81 
       
    82 ------------------------------------------END EXAMPLE-----------------------------------------
       
    83