Adaptation/GUID-4862EA2E-6BFE-5E11-B527-7EBA94BB0EA2.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     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 task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-4862EA2E-6BFE-5E11-B527-7EBA94BB0EA2" xml:lang="en"><title>OBY Tutorial </title><shortdesc>Describes the new demand paging keywords available to the
       
    13 OBY. file. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    14 <context id="GUID-E46B9321-49E9-545D-B38B-CF2BB7AD8E19"><p><b>Introduction</b></p><p>The new keywords that are available in the OBY file are used
       
    15 to specify whether an object is paged, and if so what kind of demand
       
    16 paging it supports. </p><p>          With the addition of writable
       
    17 data paging, the list of paging modifiers is shown below:   </p><p><b>Procedure</b></p><p>          With the addition of writable data
       
    18 paging, the list of paging modifiers is shown below:   </p><table id="GUID-1DB56A5D-823B-4E26-80A3-C1362B309773">
       
    19 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/>
       
    20 <tbody>
       
    21 <row>
       
    22 <entry><p><b>Keyword</b></p></entry>
       
    23 <entry><p><b>Behaviour on Symbian platform</b></p></entry>
       
    24 </row>
       
    25 <row>
       
    26 <entry><p>paged</p></entry>
       
    27 <entry><p> Enables code and data paging  </p></entry>
       
    28 </row>
       
    29 <row>
       
    30 <entry><p>unpaged</p></entry>
       
    31 <entry><p> Disables code and data paging</p></entry>
       
    32 </row>
       
    33 <row>
       
    34 <entry><p>pagedcode</p></entry>
       
    35 <entry><p> Enables code paging</p></entry>
       
    36 </row>
       
    37 <row>
       
    38 <entry><p> unpagedcode</p></entry>
       
    39 <entry><p>Disables code paging</p></entry>
       
    40 </row>
       
    41 <row>
       
    42 <entry><p>pageddata</p></entry>
       
    43 <entry><p>Enables data paging</p></entry>
       
    44 </row>
       
    45 <row>
       
    46 <entry><p>unpageddata</p></entry>
       
    47 <entry><p> Disables data paging</p></entry>
       
    48 </row>
       
    49 </tbody>
       
    50 </tgroup>
       
    51 </table><p> These modifiers appear in OBY files at the end of statements
       
    52 relating to user-side ROM objects i.e. <codeph>'file=', 'dll=', 'data='
       
    53 and 'secondary='</codeph>statements). For example:  </p><codeblock xml:space="preserve">file=ABI_DIR\DEBUG_DIR\MyLibrary.dll \sys\bin\MyLibrary.dll unpaged</codeblock><p>The data paging keywords only make sense when applied to executable
       
    54 binary files.   </p><p>For an executable file, the use of one of the
       
    55 above keywords in the oby file will override the paging settings in
       
    56 the mmp file. However this will not be true, if the <codeph>pagingoverride</codeph>, <codeph>codepagingoverride</codeph> or <codeph>datapagingoverride</codeph> keywords are used in the MMP file, in the case of <codeph>nopaging</codeph>  or <codeph>alwayspage</codeph> .</p> </context>
       
    57 <result id="GUID-EA5E0DDD-4354-5DD4-89D2-462A0B0E8A81"><p>Executing
       
    58 the buildrom command builds with no errors or warnings. </p> </result>
       
    59 <example id="GUID-ED6203BD-3890-5F27-8BAA-AFE3B0FAA518"><title>OBY
       
    60 file example</title> <p>An example of an OBY file that uses the new
       
    61 demand paging keywords is given below: </p> <codeblock id="GUID-84F82A9B-8F29-5A58-A9C3-7DEB19D5B9ED" xml:space="preserve">// 
       
    62 // MyDPConfig.oby 
       
    63 //
       
    64 // The section below, is used to specify if XIP ROM paging is implemented.  
       
    65 #if !defined PAGED_ROM 
       
    66 #define PAGED_ROM 
       
    67 #endif
       
    68  
       
    69 // The sections below, is used to specify if code paging is implemented.
       
    70 #if !defined USE_CODE_PAGING 
       
    71 // Comment out the next line if code paging is wanted 
       
    72 #define USE_CODE_PAGING 
       
    73 #endif
       
    74  
       
    75 #if !defined CODE_PAGING_FROM_ROFS 
       
    76 // Comment out the next line if code paging from primary rofs is wanted 
       
    77 #define CODE_PAGING_FROM_ROFS 
       
    78 #endif 
       
    79 
       
    80 // The section below, is used to configure the writable data paging and to specify what the 
       
    81 // default paging behaviour is to be. 
       
    82 ROM_IMAGE[0] { 
       
    83 pagedrom 
       
    84 compress 
       
    85 //                 Min   Max   Young/Old 
       
    86 //                 Live  Live  Page 
       
    87 //                 Pages Pages Ratio 
       
    88 demandpagingconfig 256   512   3 
       
    89 pagingoverride defaultpaged
       
    90 
       
    91 // This section specifies what the default paging behaviour is to be for code paging. 
       
    92 #if defined USE_CODE_PAGING &amp;&amp; !defined USE_DATA_PAGING 
       
    93 codepagingpolicy defaultpaged 
       
    94 #endif 
       
    95 
       
    96 #if defined USE_DATA_PAGING 
       
    97 #if defined USE_CODE_PAGING 
       
    98 codepagingpolicy defaultpaged 
       
    99 #endif 
       
   100 
       
   101 datapagingpolicy defaultpaged 
       
   102 #endif 
       
   103 }
       
   104 
       
   105 #if defined CODE_PAGING_FROM_ROFS || defined USE_DATA_PAGING 
       
   106 ROM_IMAGE[1] { 
       
   107 pagingoverride defaultpaged 
       
   108 }
       
   109 #endif 
       
   110 
       
   111 // Now specify the files to be used
       
   112 file=ABI_DIR\DEBUG_DIR\MyLibrary.dll \sys\bin\MyLibrary.dll unpaged
       
   113 </codeblock> </example>
       
   114 <postreq id="GUID-5000ED29-DB7E-4855-965C-6B0C335A40C2"><p>The next step is to <xref href="GUID-6B9041F7-79A6-5CCA-9B4D-B8EF377FD378.dita">Build the writable
       
   115 data paging ROM</xref>  </p> </postreq>
       
   116 </taskbody></task>