Symbian3/SDK/Source/GUID-E48B708E-8B0B-5CF7-80D5-B55966387021.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-E48B708E-8B0B-5CF7-80D5-B55966387021" xml:lang="en"><title>GCCE
build targets</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p><b>Introduction </b> </p>
<p>The <codeph>GCCE</codeph> build target builds ARM code using a version
of the freely available GNU Compiler Collection (GCC) tools. The GCC compiler
is intended only for building applications, and cannot be used to compile
the complete Symbian platform. </p>
<p>The GCC binaries conform to ABIv2 for the ARM architecture. Details about
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>
<p>The following table lists the GCC build targets available for various ARM
architectures that use Thumb or Thumb2 instruction sets: </p>
<table id="GUID-FDDB808F-F04F-5802-8B14-772E5260E2B4">
<tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
<thead>
<row>
<entry>Build target</entry>
<entry>ARM architecture</entry>
<entry>Instruction set</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <codeph>GCCE</codeph>  </p> </entry>
<entry><p>V5 </p> </entry>
<entry><p>Thumb </p> </entry>
</row>
<row>
<entry><p> <codeph>GCCEV6</codeph>  </p> </entry>
<entry><p>V6 </p> </entry>
<entry><p>Thumb </p> </entry>
</row>
<row>
<entry><p> <codeph>GCCEV6t2</codeph>  </p> </entry>
<entry><p>V6 </p> </entry>
<entry><p>Thumb-2 </p> </entry>
</row>
<row>
<entry><p> <codeph>GCCEV7</codeph>  </p> </entry>
<entry><p>V7 </p> </entry>
<entry><p>Thumb-2 </p> </entry>
</row>
</tbody>
</tgroup>
</table>
<p> <b>Note:</b> Code built for the targets listed in the earlier table can
interoperate with code built by other compilers for ARM targets. </p>
<p><b>Prerequisite </b> </p>
<p>To build for the GCC targets, you must install the GCC CSL ARM toolchain.
The installer, <filepath>arm-none-symbianelf-2005-q1c.exe</filepath>, is supplied
with the OS kit, and is located at <filepath>epoc32\tools\distrib\</filepath>.
Run this program to start the installation wizard. By default, the compiler
is installed to <filepath>C:\Program Files\CSL Arm Toolchain\</filepath>. </p>
<p>The installation wizard does not modify the Windows <codeph>PATH</codeph> environment
variable. You must manually add the <filepath>bin</filepath> sub-directory
of the installed tools to the <codeph>PATH</codeph> variable. For example,
if the compiler is installed to <filepath>C:\gcce</filepath>, then <filepath>C:\gcce\bin</filepath> must
be added to the <codeph>PATH</codeph> environment variable. </p>
<p><b>Building for GCC targets </b> </p>
<p>GCC targets are not the default build targets. To build a program for any
GCC target, you must explicitly specify the targets as supported platforms
in the component's <filepath>BLD.INF</filepath> file, using <codeph>prj_platforms</codeph> statement. </p>
<p>For example: </p>
<codeblock id="GUID-E9BF3300-5BB9-538E-8D9A-33447B58E477" xml:space="preserve">PRJ_PLATFORMS
WINSCW GCCE GCCEV6 GCCEV6t2 GCCEV7</codeblock>
<p>allows the component to be built for <codeph>WINSCW</codeph>, <codeph>GCCE</codeph>, <codeph>GCCEV6</codeph>, <codeph>GCCEV6t2</codeph>,
and <codeph>GCCEV7</codeph>. </p>
<p>You can build component for the GCC targets using the following <filepath>bldmake</filepath> and <filepath>abld</filepath> commands: </p>
<p><userinput>bldmake bldfiles</userinput> </p>
<p><userinput>abld build gcce | gccev6 | gccev6t2 | gccev7 [udeb | urel]</userinput> </p>
<p> <b>Note:</b> To build for <codeph>GCCEV6t2</codeph> and <codeph>GCCEV7</codeph>,
you need GCCE v4.2 that supports building ARM code for Thumb-2. </p>
<p>Binaries are generated in the <filepath>udeb</filepath> and <filepath>urel</filepath> sub-directories
of the <filepath>epoc32\release\&lt;GCC platform&gt;\</filepath> directory. </p>
<p>Import library (<filepath>.dso</filepath>) files are generated in the <filepath>epoc32\release\ARMV5\lib\</filepath> directory.
This directory is used, as the library file format has not changed since <codeph>ARMV5</codeph>. </p>
<p> <b>Note:</b> These are the same directories that are used for import libraries
generated by RVCT for different build targets, such as <codeph>ARMV5</codeph>, <codeph>ARMV6</codeph>,
and so on. This allows other applications to link to any library, regardless
of the build target for which they are generated. </p>
<p><b>ROM building </b> </p>
<p>The compiler setting allows the Symbian OS base components to include the
correct compiler-specific run-time libraries in the ROM image.</p>
<p>The default compiler used to build the reference OS is ARM <codeph>RVCT</codeph>.
This compiler is indicated to <codeph>buildrom</codeph> using the argument <codeph>-DRVCT</codeph>.
 </p>
<p>The toolchain in OS v9.1 also supports binaries built with the <codeph>GCCE</codeph> compiler.
Binaries built with this compiler can be combined in ROM with binaries built
with <codeph>RVCT</codeph> to the <codeph>ABIv2</codeph>. To do this, use
the <codeph>-D_GCCE</codeph> macro: </p>
<p><userinput>buildrom -D_EABI=ARMV5 -D_GCCE -otechview.img h2 techview</userinput></p>
<p>By default, if the binaries are not available in GCCE, they are taken from
the <codeph>ARMV5_ABIV2</codeph> directory, and if not in there
also, they are be taken from the <codeph>ARMV5</codeph> directory. (<codeph>ARMV5</codeph> is
necessary as some of the runtime DLLs will be present only in that directory.)
 </p>
<p>The order in which buildrom searches directories to get binaries to put
into ROM can also be specified explicitly using a <codeph>BINARY_SELECTION_ORDER</codeph> command
in an <filepath>oby</filepath> file. For example: </p>
<p><userinput>BINARY_SELECTION_ORDER = GCCE, ARMV5_ABIv2, ARMV5</userinput></p>
<p>The preceding command specifies explicitly that binaries should taken from <codeph>GCCE</codeph>,
then <codeph>ARMV5_ABIv2</codeph>, and then <codeph>ARMV5</codeph>. </p>
<p><b>Source issues </b> </p>
<p>The <codeph>GCCE</codeph> build target uses the same DEF file format as
the <codeph>ARMV5</codeph> target. By default, the GCC toolchian looks for
the DEF files in the project's <codeph>EABI</codeph> directory. </p>
<p> <b>Note:</b> The GCC compiler is very strict in checking that the source
code conforms to the ANSI C++ standard. Therefore, source code that previously
compiled with less strict compilers, such as RVCT 2.1, may no longer compile. </p>
</conbody></concept>