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