Symbian3/SDK/Source/GUID-E48B708E-8B0B-5CF7-80D5-B55966387021.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     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 build
       
    13 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 in kits, and is located at <filepath>epoc32\tools\distrib\</filepath>. Run
       
    62 this program to start the installation wizard. By default, the compiler is
       
    63 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 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 is ARM RVCT. This compiler is indicated
       
    95 to <codeph>buildrom</codeph> using the argument <codeph>-DRVCT</codeph>.  </p>
       
    96 <p>The toolchain from Symbian OS v9.1 also supports binaries built with the <codeph>GCCE</codeph> compiler.
       
    97 Binaries built with this compiler can be combined in ROM with binaries built
       
    98 with <codeph>RVCT</codeph> to the <codeph>ABIv2</codeph>. To do this, use
       
    99 the <codeph>-D_GCCE</codeph> macro: </p>
       
   100 <p><userinput>buildrom -D_EABI=ARMV5 -D_GCCE -otechview.img h2 techview</userinput></p>
       
   101 <p>By default, if the binaries are not available in GCCE, they are taken from
       
   102 the <codeph>ARMV5_ABIV2</codeph> directory, and if not in there also, they
       
   103 are be taken from the <codeph>ARMV5</codeph> directory. (<codeph>ARMV5</codeph> is
       
   104 necessary as some of the runtime DLLs will be present only in that directory.)
       
   105  </p>
       
   106 <p>The order in which buildrom searches directories to get binaries to put
       
   107 into ROM can also be specified explicitly using a <codeph>BINARY_SELECTION_ORDER</codeph> command
       
   108 in an <filepath>oby</filepath> file. For example: </p>
       
   109 <p><userinput>BINARY_SELECTION_ORDER = GCCE, ARMV5_ABIv2, ARMV5</userinput></p>
       
   110 <p>The preceding command specifies explicitly that binaries should taken from <codeph>GCCE</codeph>,
       
   111 then <codeph>ARMV5_ABIv2</codeph>, and then <codeph>ARMV5</codeph>. </p>
       
   112 <p><b>Source issues </b> </p>
       
   113 <p>The <codeph>GCCE</codeph> build target uses the same DEF file format as
       
   114 the <codeph>ARMV5</codeph> target. By default, the GCC toolchian looks for
       
   115 the DEF files in the project's <codeph>EABI</codeph> directory. </p>
       
   116 <p> <b>Note:</b> The GCC compiler is very strict in checking that the source
       
   117 code conforms to the ANSI C++ standard. Therefore, source code that previously
       
   118 compiled with less strict compilers, such as RVCT 2.1, may no longer compile. </p>
       
   119 </conbody></concept>