Symbian3/PDK/Source/GUID-E48B708E-8B0B-5CF7-80D5-B55966387021.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-E48B708E-8B0B-5CF7-80D5-B55966387021" xml:lang="en"><title>GCCE
       
    13 build targets</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p><b>Introduction </b> </p>
       
    15 <p>The <codeph>GCCE</codeph> build target builds ARM code using a version
       
    16 of the freely available GNU Compiler Collection (GCC) tools. The GCC compiler
       
    17 is intended only for building applications, and cannot be used to compile
       
    18 the complete Symbian platform. </p>
       
    19 <p>The GCC binaries conform to ABIv2 for the ARM architecture. Details about
       
    20 the ABI standard are published at <xref href="http://www.arm.com/products/DevTools/ABI.html" scope="external">http://www.arm.com/products/DevTools/ABI.html</xref>. </p>
       
    21 <p>The following table lists the GCC build targets available for various ARM
       
    22 architectures that use Thumb or Thumb2 instruction sets: </p>
       
    23 <table id="GUID-FDDB808F-F04F-5802-8B14-772E5260E2B4">
       
    24 <tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
       
    25 <thead>
       
    26 <row>
       
    27 <entry>Build target</entry>
       
    28 <entry>ARM architecture</entry>
       
    29 <entry>Instruction set</entry>
       
    30 </row>
       
    31 </thead>
       
    32 <tbody>
       
    33 <row>
       
    34 <entry><p> <codeph>GCCE</codeph>  </p> </entry>
       
    35 <entry><p>V5 </p> </entry>
       
    36 <entry><p>Thumb </p> </entry>
       
    37 </row>
       
    38 <row>
       
    39 <entry><p> <codeph>GCCEV6</codeph>  </p> </entry>
       
    40 <entry><p>V6 </p> </entry>
       
    41 <entry><p>Thumb </p> </entry>
       
    42 </row>
       
    43 <row>
       
    44 <entry><p> <codeph>GCCEV6t2</codeph>  </p> </entry>
       
    45 <entry><p>V6 </p> </entry>
       
    46 <entry><p>Thumb-2 </p> </entry>
       
    47 </row>
       
    48 <row>
       
    49 <entry><p> <codeph>GCCEV7</codeph>  </p> </entry>
       
    50 <entry><p>V7 </p> </entry>
       
    51 <entry><p>Thumb-2 </p> </entry>
       
    52 </row>
       
    53 </tbody>
       
    54 </tgroup>
       
    55 </table>
       
    56 <p> <b>Note:</b> Code built for the targets listed in the earlier table can
       
    57 interoperate with code built by other compilers for ARM targets. </p>
       
    58 <p><b>Prerequisite </b> </p>
       
    59 <p>To build for the GCC targets, you must install the GCC CSL ARM toolchain.
       
    60 The installer, <filepath>arm-none-symbianelf-2005-q1c.exe</filepath>, is supplied
       
    61 with the OS kit, and is located at <filepath>epoc32\tools\distrib\</filepath>.
       
    62 Run this program to start the installation wizard. By default, the compiler
       
    63 is installed to <filepath>C:\Program Files\CSL Arm Toolchain\</filepath>. </p>
       
    64 <p>The installation wizard does not modify the Windows <codeph>PATH</codeph> environment
       
    65 variable. You must manually add the <filepath>bin</filepath> sub-directory
       
    66 of the installed tools to the <codeph>PATH</codeph> variable. For example,
       
    67 if the compiler is installed to <filepath>C:\gcce</filepath>, then <filepath>C:\gcce\bin</filepath> must
       
    68 be added to the <codeph>PATH</codeph> environment variable. </p>
       
    69 <p><b>Building for GCC targets </b> </p>
       
    70 <p>GCC targets are not the default build targets. To build a program for any
       
    71 GCC target, you must explicitly specify the targets as supported platforms
       
    72 in the component's <filepath>BLD.INF</filepath> file, using <codeph>prj_platforms</codeph> statement. </p>
       
    73 <p>For example: </p>
       
    74 <codeblock id="GUID-E9BF3300-5BB9-538E-8D9A-33447B58E477" xml:space="preserve">PRJ_PLATFORMS
       
    75 WINSCW GCCE GCCEV6 GCCEV6t2 GCCEV7</codeblock>
       
    76 <p>allows the component to be built for <codeph>WINSCW</codeph>, <codeph>GCCE</codeph>, <codeph>GCCEV6</codeph>, <codeph>GCCEV6t2</codeph>,
       
    77 and <codeph>GCCEV7</codeph>. </p>
       
    78 <p>You can build component for the GCC targets using the following <filepath>bldmake</filepath> and <filepath>abld</filepath> commands: </p>
       
    79 <p><userinput>bldmake bldfiles</userinput> </p>
       
    80 <p><userinput>abld build gcce | gccev6 | gccev6t2 | gccev7 [udeb | urel]</userinput> </p>
       
    81 <p> <b>Note:</b> To build for <codeph>GCCEV6t2</codeph> and <codeph>GCCEV7</codeph>,
       
    82 you need GCCE v4.2 that supports building ARM code for Thumb-2. </p>
       
    83 <p>Binaries are generated in the <filepath>udeb</filepath> and <filepath>urel</filepath> sub-directories
       
    84 of the <filepath>epoc32\release\&lt;GCC platform&gt;\</filepath> directory. </p>
       
    85 <p>Import library (<filepath>.dso</filepath>) files are generated in the <filepath>epoc32\release\ARMV5\lib\</filepath> directory.
       
    86 This directory is used, as the library file format has not changed since <codeph>ARMV5</codeph>. </p>
       
    87 <p> <b>Note:</b> These are the same directories that are used for import libraries
       
    88 generated by RVCT for different build targets, such as <codeph>ARMV5</codeph>, <codeph>ARMV6</codeph>,
       
    89 and so on. This allows other applications to link to any library, regardless
       
    90 of the build target for which they are generated. </p>
       
    91 <p><b>ROM building </b> </p>
       
    92 <p>The compiler setting allows the Symbian OS base components to include the
       
    93 correct compiler-specific run-time libraries in the ROM image.</p>
       
    94 <p>The default compiler used to build the reference OS is ARM <codeph>RVCT</codeph>.
       
    95 This compiler is indicated to <codeph>buildrom</codeph> using the argument <codeph>-DRVCT</codeph>.
       
    96  </p>
       
    97 <p>The toolchain in OS v9.1 also supports binaries built with the <codeph>GCCE</codeph> compiler.
       
    98 Binaries built with this compiler can be combined in ROM with binaries built
       
    99 with <codeph>RVCT</codeph> to the <codeph>ABIv2</codeph>. To do this, use
       
   100 the <codeph>-D_GCCE</codeph> macro: </p>
       
   101 <p><userinput>buildrom -D_EABI=ARMV5 -D_GCCE -otechview.img h2 techview</userinput></p>
       
   102 <p>By default, if the binaries are not available in GCCE, they are taken from
       
   103 the <codeph>ARMV5_ABIV2</codeph> directory, and if not in there
       
   104 also, they are be taken from the <codeph>ARMV5</codeph> directory. (<codeph>ARMV5</codeph> is
       
   105 necessary as some of the runtime DLLs will be present only in that directory.)
       
   106  </p>
       
   107 <p>The order in which buildrom searches directories to get binaries to put
       
   108 into ROM can also be specified explicitly using a <codeph>BINARY_SELECTION_ORDER</codeph> command
       
   109 in an <filepath>oby</filepath> file. For example: </p>
       
   110 <p><userinput>BINARY_SELECTION_ORDER = GCCE, ARMV5_ABIv2, ARMV5</userinput></p>
       
   111 <p>The preceding command specifies explicitly that binaries should taken from <codeph>GCCE</codeph>,
       
   112 then <codeph>ARMV5_ABIv2</codeph>, and then <codeph>ARMV5</codeph>. </p>
       
   113 <p><b>Source issues </b> </p>
       
   114 <p>The <codeph>GCCE</codeph> build target uses the same DEF file format as
       
   115 the <codeph>ARMV5</codeph> target. By default, the GCC toolchian looks for
       
   116 the DEF files in the project's <codeph>EABI</codeph> directory. </p>
       
   117 <p> <b>Note:</b> The GCC compiler is very strict in checking that the source
       
   118 code conforms to the ANSI C++ standard. Therefore, source code that previously
       
   119 compiled with less strict compilers, such as RVCT 2.1, may no longer compile. </p>
       
   120 </conbody></concept>