|
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-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5" xml:lang="en"><title>The |
|
13 Symbian build process</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Symbian platform programs are initially developed for a Symbian emulator |
|
15 running on Windows, and are then rebuilt for the ARM processor (native) targets |
|
16 used in real Symbian platform phones. Building can be performed from the Windows |
|
17 command line, or from within an IDE if one is available. The descriptions |
|
18 given in this documentation set concentrate on command line building, as documentation |
|
19 for using an IDE is normally distributed with the IDE itself. </p> |
|
20 <p> <b>Note:</b> This page includes a description of the use of Symbian's |
|
21 SBSv1 build system, which provides the <codeph>bldmake</codeph> and <codeph>abld</codeph> command |
|
22 line tools. Symbian also provides a newer command line build system, called |
|
23 SBSv2, in its Platform Developer Toolkit (PDT) product. SBSv2 can help achieve |
|
24 improved build speed over SBSv1. </p> |
|
25 <section><title>Build targets</title> <p>This section describes the tools |
|
26 and compilers supported on the kits supplied by Symbian. Note that licensees |
|
27 or third-parties may supply additional tools, or extend support to additional |
|
28 compilers which are not described here. </p> <p>Symbian build their emulator |
|
29 code with the Metrowerks CodeWarrior compiler. This is known as the <codeph>WINSCW</codeph> build |
|
30 target. Binaries built with this compiler are put in the <filepath>epoc32\release\winscw</filepath> and <filepath>epoc32\winscw</filepath> directory |
|
31 trees. </p> <p>You can build your programs for the Symbian emulator using |
|
32 Metrowerks CodeWarrior. The build tools also have support for using the Microsoft |
|
33 Visual Studio .NET 2003, or Microsoft Visual Studio v6 IDEs. See <xref href="GUID-E08F6BA9-F1A9-50D5-8CBE-8304BBA24D1F.dita">The |
|
34 Symbian emulator build targets</xref> for more details. </p> <p>To build code |
|
35 for a phone, a compiler based on the Application Binary Interface (ABI) for |
|
36 the ARM Architecture is needed. This is a standard for the interfaces of binary |
|
37 code running in ARM environments, and is intended to allow inter-operation |
|
38 of binaries produced by different compilers that conform to the standard. |
|
39 The specification is published by ARM at <xref href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0038a/index.html" scope="external">http://infocenter.arm.com</xref>. </p> <p>The Symbian platform |
|
40 build tools are configured to work with two compilers in particular: </p> <ul> |
|
41 <li id="GUID-0F50C5D5-9C66-5414-9952-CFB0B6C3E88C"><p>ARM's own RealView Compiler |
|
42 Tools (RVCT). This is particularly intended for licensee's building ROMs for |
|
43 phones. For details, see ARM's website at <xref href="http://www.arm.com/products/DevTools/RealViewDevSuite.html" scope="external">http://www.arm.com</xref>. </p> <p>The situation |
|
44 is complicated by there existing two versions of the ARM ABI, referred to |
|
45 as v1 and v2 respectively. The toolchain allows either to be chosen. </p> </li> |
|
46 <li id="GUID-231F1526-3BB8-5602-B867-12B6A7CD11D9"><p>A version of the GNU |
|
47 Compiler Collection (GCC) that supports the ABI for the ARM Architecture. |
|
48 This compiler is delivered on Symbian platform kits, and is freely available. |
|
49 This target is known as <codeph>GCCE</codeph>. It can only be used to compile |
|
50 code to v2 of the ARM ABI, not to the earlier v1. </p> </li> |
|
51 </ul> <p>See <xref href="GUID-763DCEF4-C960-58A2-99DC-7FFD3187BFD4.dita">The native |
|
52 build targets</xref> for more details. </p> </section> |
|
53 <section><title>Project files</title> <p>Because of the variety of targets |
|
54 and toolchains available, Symbian platform allows projects to be specified |
|
55 in a form not specific to any. These neutral project files are then used by |
|
56 Symbian platform tools to create toolchain-specific project files when these |
|
57 are required. </p> <p>The key project files are: </p> <ul> |
|
58 <li id="GUID-015E5371-C812-5654-84AF-E29715AF9356"><p>a project definition |
|
59 file (<filepath>.mmp</filepath> file) that describes a project to be built. |
|
60 This is an environment neutral file that can be used by the tools to produce |
|
61 make files for any of the supported target environments. It also defines resource |
|
62 file and application information files to be built. </p> </li> |
|
63 <li id="GUID-1F3FEF0C-98BC-582F-B973-04D51F50E1D4"><p>a component description |
|
64 file (<filepath>bld.inf</filepath>), which lists all the projects in a component, |
|
65 and gives additional build instructions. </p> </li> |
|
66 </ul> <p>When you create a new project, you write these files (or typically |
|
67 copy existing similar files and modify them) in a text editor. IDE's may allow |
|
68 new projects to be created from existing template projects. </p> <p>See <xref href="GUID-81835322-5EF7-5839-9DC1-9A3FD396BD36.dita">How to build GUI applications</xref>, <xref href="GUID-594488FF-02C9-5066-85DB-5F88A754AE18.dita">How to build DLLs</xref>, |
|
69 and <xref href="GUID-12D8C373-5199-5B89-9910-00F769AC164A.dita">How to build EXEs</xref> for |
|
70 guidance on how to write project files for the three most common types of |
|
71 program. See the <xref href="GUID-49397CFD-955A-5DF6-9251-368C44224966.dita">Build |
|
72 tools reference</xref> for details on the file formats and syntax. </p> </section> |
|
73 <section><title>Building from the command line</title> <p>You can build for |
|
74 any target from the command line. The procedure is summarised below. </p> <ol id="GUID-6F57EEBA-7ECA-529C-AC4F-7B22AE90DFC3"> |
|
75 <li id="GUID-315A168A-926A-57D9-B1DF-CB36F6C8DED2"><p>Create a project specification |
|
76 (<filepath>.mmp</filepath>) file. </p> </li> |
|
77 <li id="GUID-F3C9187F-AAF6-5D4B-AE0E-135A152011CF"><p>Create a component definition |
|
78 file (<filepath>bld.inf</filepath>). In many cases this will specify a single |
|
79 project <filepath>mmp</filepath> file. </p> </li> |
|
80 <li id="GUID-8641EE54-AA0C-5825-A510-43DA55B36D11"><p>Run <filepath>bldmake</filepath> from |
|
81 the directory where the <filepath>bld.inf</filepath> file is located: </p> <p><userinput>bldmake |
|
82 bldfiles</userinput> </p> <p>This creates a <filepath>abld.bat</filepath> batch |
|
83 file, which you use in the next step. </p> </li> |
|
84 <li id="GUID-B49FCB10-1058-5C0F-A0FD-216C2D1D8A9B"><p>Use <systemoutput>abld |
|
85 build</systemoutput> to build the project. </p> <p>This builds the project |
|
86 for all valid targets and both release and debug variants. To build for a |
|
87 particular target and variant, use <systemoutput>abld build |
|
88 target-name variant</systemoutput>, for example </p> <p><userinput>abld build |
|
89 winscw udeb</userinput> </p> <p>to build for the debug variant of WINSCW. </p> </li> |
|
90 </ol> <p>For more details on using the tools, see <xref href="GUID-793A5EF9-CC16-5EEB-9011-6431EA76EB15.dita">How |
|
91 to use bldmake</xref> and <xref href="GUID-B6B54E07-3B34-5D5C-8815-93383FA8FB4B.dita">How |
|
92 to use abld</xref>. </p> </section> |
|
93 </conbody></concept> |