1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>makelcf[.TWL]</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9<STYLE type="text/css"> 10<!-- 11.sample_source{ 12 background-color : #e8e8e8; 13} 14H3{ 15 color : teal; 16} 17.command_list{ 18 margin-bottom : 16pt; 19} 20.command_desc{ 21 } 22.command_item{ 23 margin-top : 16pt; 24 background-color : #e8e8e8; 25} 26.blockquoted_table { 27 border : 1px; 28 width : 80%; 29} 30TD,TH{ 31 border-color : #c0d8d8; 32 padding : 1pt 4pt 1pt 4pt; 33 border-width : 1px; 34 border-style : solid; 35} 36--> 37</STYLE> 38</HEAD> 39<BODY> 40<H1 align="left">makelcf <IMG src="../image/NTR.gif" align="middle"></H1> 41<H1 align="left">makelcf.TWL <IMG src="../image/TWL.gif" align="middle"></H1> 42<H2>Description</H2> 43<P>The TWL-SDK has a tool to support a technique called overlay that divides the program too big to fit in memory into files, stores them as ROM images, and loads code into memory from given ROM images, as needed, on instruction from the program to initialize and execute the code. This tool also supports the AUTOLOAD mechanism, which is able to load a program into multiple regions at start time.</P> 44<P>The <CODE>makelcf</CODE> tool automatically creates a Linker Command File (LCF) that gives NITRO execution files support for these overlay techniques, and the <CODE>makelcf.TWL</CODE> tool does the same for TWL execution files. Based on the description in the Linker Spec File (LSF), <CODE>makelcf[.TWL]</CODE> creates Linker Command Files for each application from an LCF template file.</P> 45<H2>Using the Tool</H2> 46<H3>Start Command</H3> 47<P><CODE>% makelcf [-DNAME=VALUE...] [-MDEFINES_FILE] [-V1|-V2] SPECFILE LCF-TEMPLATE [LCFILE]</CODE></P> 48<P>This creates a Linker Command File from the LCF template file specified by <CODE>LCF-TEMPLATE</CODE> in accordance with the description in the Linker Spec File specified by <CODE>SPECFILE</CODE>, naming it as specified by <CODE>LCFILE</CODE>. <CODE>LCFILE</CODE> can be omitted. If omitted, the contents of LCF are written to the standard output.</P> 49<P>The <CODE>-D</CODE> option lets you define a variable and its value. The value of this variable can be referenced at the time of the Linker Spec File description.</P> 50<P>You can define a variable and its value with the <CODE>-M</CODE> option, as you would with the <CODE>-D</CODE> option. A text file that consists of the <CODE>[NAME=VALUE]</CODE> line is received as an argument. By using this option, the variables and their values that exceed the command line length restriction can be described in the definition.</P> 51<P><FONT color="#ff0000">The LSF file format has been expanded to support the feature for designating a linking symbol (described in <CODE>SEARCH_SYMBOL</CODE>) when using the overlay via the expanded LCF file in CodeWarrior for Nintendo DS (hereafter called CodeWarrior) versions 2.0 and later.</FONT>The <CODE>–V1</CODE> and <CODE>–V2</CODE> options allow for the selection of either CodeWarrior version 1.x or 2.x when <CODE>makelcf</CODE> outputs an LCF file from an LCF template file. If the <CODE>-V1</CODE> option is designated or if there is no <CODE>-V</CODE> option designated, the format for the 1.x version is used. If <CODE>-V2</CODE> is designated, the format for the 2.x version is used.</P> 52<H3>Linker Spec File Format</H3> 53<P>The ARM9 and ARM7 processors both can have only one <I>static module</I>, but they can have numerous <I>overlay modules</I> if there is a need, memory and other resources permitting. If memory and other resources permit, it is possible to create multiple overlay modules as needed.</P> 54<P>The Linker Spec File (LSF) describes the various settings regarding these overlay tasks. The LSF defines how to divide up and create files from object files of the code that comprises the application program.</P> 55<P>The LSF is a text file constructed from the section definitions shown below. Each section definition has a declaration at the beginning, followed by section-related parameters enclosed in curly brackets. 56</P> 57<TABLE border="1"> 58 <TBODY> 59 <TR> 60<TH>Section Definition Target</TH> 61<TH>Section Definition Format</TH> 62<TH>Example Definition</TH> 63 </TR> 64 <TR> 65<TD>Static<BR>module<BR> <CODE>(Static)</CODE></TD> 66 <TD> 67 <PRE><CODE>Static <I>[section name]</I> 68{ 69 <I>[section parameter description part]</I> 70 .... 71}</CODE></PRE> 72 </TD> 73 <TD> 74 <PRE>Static main 75{ 76 Address 0x02004000 77 Object $(OBJS_STATIC) 78 Library $(LLIBS) $(GLIBS) $(CW_LIBS) 79 StackSize 1024 80}</CODE></PRE> 81 </TD> 82 </TR> 83 <TR> 84<TD>Autoload<BR> Module<BR> <CODE>(Autoload)</CODE></TD> 85 <TD> 86 <PRE><CODE>Autoload <em>[section name]</em> 87{ 88 <I>[section parameter description part]</I> 89 .... 90}</CODE></PRE> 91 </TD> 92 <TD> 93 <PRE>Autoload ITCM 94{ 95 Address 0x01FF8000 96 Object * (.itcm) 97 Object $(OBJS_AUTOLOAD) (.text) 98 Object $(OBJS_AUTOLOAD) (.rodata) 99 Object $(OBJS_AUTOLOAD) (.init) 100 Object $(OBJS_AUTOLOAD) (.ctor) 101 Object $(OBJS_AUTOLOAD) (.sinit) 102}</CODE></PRE> 103 </TD> 104 </TR> 105 <TR> 106<TD>Overlay<BR> Module<BR> <CODE>(Overlay)</CODE></TD> 107 <TD> 108 <PRE>Overlay <em>[section name]</em> 109{ 110 <I>[section parameter description part]</I> 111 .... 112}</CODE></PRE> 113 </TD> 114 <TD> 115 <PRE>Overlay overlay_1 116{ 117 After main 118 Object $(OBJDIR)/overlay.o 119}</CODE></PRE> 120 </TD> 121 </TR> 122 <TR> 123<TD>LTD Autoload<BR>Module<BR> <CODE>(Ltdautoload)</CODE><BR><BR> <FONT color="#ff0000">Available only in TWL environment</FONT></TD> 124 <TD> 125 <PRE><CODE>Ltdautoload <em>[section name]</em> 126{ 127 <I>[section parameter description part]</I> 128 .... 129}</CODE></PRE> 130 </TD> 131 <TD> 132 <PRE><CODE>Ltdautoload LTDMAIN 133{ 134 After main 135 After overlay_1 136 Force (function, main.o) 137 Object $(OBJDIR)/main.o (.text) 138 Object * (.ltdmain) 139 Object $(OBJS_LTDAUTOLOAD) 140 Library $(LLIBS_EX) $(GLIBS_EX) 141}</CODE></PRE> 142 </TD> 143 </TR> 144 <TR> 145<TD>LTD Overlay<BR>Module<BR> <CODE>(Ltdoverlay)</CODE><BR><BR> <FONT color="#ff0000">Available only in TWL environment</FONT></TD> 146 <TD> 147 <PRE><CODE>Ltdoverlay <em>[section name]</em> 148{ 149 <I>[section parameter description part]</I> 150 .... 151}</CODE></PRE> 152 </TD> 153 <TD> 154 <PRE><CODE>Ltdoverlay ltdoverlay_1 155{ 156 After LTDMAIN 157 Object $(OBJDIR)/ltdoverlay.o 158}</CODE></PRE> 159 </TD> 160 </TR> 161 <TR> 162<TD>Incidental<BR>information<BR> <CODE>(Property)</CODE></TD> 163 <TD> 164 <PRE><CODE>Property 165{ 166 <I>[Incidental information parameter description part]</I> 167 .... 168}</CODE></PRE> 169 </TD> 170 <TD> 171 <PRE><CODE>Property 172{ 173 OverlayDefs %_defs 174 OverlayTable %_table 175 Suffix .sbin 176}</CODE></PRE> 177 </TD> 178 </TR> 179 </TBODY> 180</TABLE> 181<P><BR> This section name can be used to get the Overlay ID and other information. This section name can be used to get the Overlay ID and other information. For details about the method, see <A href="../fs/fs_overlay_id_types.html">An Explanation About the FS Library's Overlay ID</A>.</P> 182<P>Each LSF must have a static-module section, even if overlays are not being used. If more than one Overlay Module has been allocated, there must be as many Overlay Module sections as there are Overlay Modules. If overlays are not being used, then there is no need for an Overlay Module section. The Incidental Information section can be omitted. In that case, all incidental information parameters take their default values.</P> 183<P>The following are explanations of the parameters set in each section.</P> 184<H3>Section Parameters</H3> 185<H4>Static Section (Static Module Definitions Section)</H4> 186<BLOCKQUOTE> 187<DL class="command_list"> 188<DT class="command_item"><CODE>Address</CODE> <I>[address]</I> 189<DD class="command_desc">The section gets placed at the specified address. In addition to decimal addresses, you can specify hexadecimal or octal addresses by prefixing the value with <CODE>"0x"</CODE> or <CODE>"0"</CODE> (C-language notation). 190<DT class="command_item"><CODE>Object</CODE> <I>[object filename...] [(selected sections)]</I> 191<DD class="command_desc">This specifies the object files to include in the static module. <BR>You must specify the object filename and path, because a linker response file must be created. When using the SDK make system, the object path is given to <CODE>makelcf</CODE> as <CODE>$(OBJDIR)</CODE>, so you can specify the object path in the following format. 192<BLOCKQUOTE><CODE>Object $(OBJDIR)/main.o</CODE></BLOCKQUOTE> 193 As a result of compiling the source file specified by the makefile's <CODE>SRCS</CODE> variable, the generated object file is given with a path to <CODE>makelcf</CODE> as <CODE>$(OBJS_STATIC)</CODE>. If it is not necessary to specify successive object files, you can use the following format. 194<BLOCKQUOTE><CODE>Object $(OBJS_STATIC)</CODE></BLOCKQUOTE> 195The object file specified by <CODE>Object</CODE> is passed with a path to the response file (<code>*.response</code>). Similar to executable binaries, <code>makelcf</code> creates response files in the <code>$(BINDIR)</code> directory.<BR> <BR> Specify library files with the new <CODE>Library</CODE> statement instead of the <CODE>Object</CODE> statement.<BR> <BR>You can add an asterisk to specifications, as shown in the following example, to support special sections for purposes such as loading to ITCM, DTCM, and WRAM. 196<BLOCKQUOTE><CODE>Object * (.itcm)</CODE></BLOCKQUOTE> 197 This specification refers to all files defined in the <code>.itcm</code> section. Statements similar to this are often used in the autoload section. 198<DT class="command_item"><CODE>Library</CODE> <I>[library filename...]</I> 199<DD class="command_desc">Specify the library file in the static module. When using the SDK <code>make</code> system, library groups specified with the variable <code>LLIBRARIES</code> in the makefile, SDK library groups, and CodeWarrior library groups are identified as <code>$(LLIBS)</code>, <code>$(GLIBS)</code>, and <code>$(CW_LIBS)</code>, respectively. Use the following format to specify the library. 200<BLOCKQUOTE><CODE>Library $(LLIBS) $(GLIBS) $(CW_LIBS)</CODE></BLOCKQUOTE> 201The library file described in <CODE>Library</CODE> is passed with the <CODE>-1</CODE> option to the response file. 202<DT class="command_item"><CODE>SearchSymbol</CODE> <I>[Other section name or overlay group name...]</I> 203<DD class="command_desc">If multiple symbols with the same name exist over multiple sections, this allows you to designate which of those symbols to link to. This specification can be set for each section.<BR><BR>To search for symbols referenced by the current section, the linker first searches through its own section and then searches in order through the overlay group or section defined by this specification. A link error results if the symbol cannot be found in the overlay group or section given here.<BR><BR>If the specification is omitted, all sections are targeted for symbol search. In this case, if overall there is only one symbol with the relevant name, that symbol is linked, but if there is more than one symbol with the relevant name, a link error results because the linker does not know which symbol to use. <BR><BR> <B>When using this feature, you must run <CODE>makelcf</CODE> with the <CODE>-V2</CODE> option to achieve compatibility with CodeWarrior for Nintendo DS version 2.0.</B> 204<DT class="command_item"><CODE>Force</CODE> <I>[symbol name, object file name, or library name]</I> 205<DD class="command_desc">This is specified when placing a particular symbol in any section.<BR><BR> The <CODE>Force</CODE> statement corresponds to the <CODE>FORCE_OBJECT</CODE> keyword used in LCF files, so the object files specified using <CODE>Force</CODE> must be placed in the same section using the <CODE>Object</CODE> statement.<BR> For more information, see the CodeWarrior documentation.<BR> <BR> <FONT color="#ff0000">This feature is supported by CodeWarrior for DSi v.1.2 patch 1 and later.</FONT> 206<DT class="command_item"><CODE>StackSize</CODE> <em>[stack size (in bytes)]<BR></em> or<BR> <CODE>StackSize</CODE> <em>[stack size (in bytes)]</em> <em>[IRQ stack size (in bytes)]]</em> 207<DD class="command_desc">Specifies the stack size of the <CODE>NitroMain</CODE> function when it is first executed in the static module and the IRQ stack size. Both of these sizes can be specified in base 8, base 10, or base 16.<BR><BR> The stack size value has the following meaning depending on the sign of the numeric value. 208 <TABLE class="blockquoted_table"> 209 <TBODY> 210 <TR> 211<TD width="66">When positive</TD> 212<TD width="356">The number of bytes specified by the value gets assigned to the stack.</TD> 213 </TR> 214 <TR> 215<TD width="66">When 0</TD> 216<TD width="356">The maximum possible size gets assigned to the stack.</TD> 217 </TR> 218 <TR> 219<TD width="66">When negative</TD> 220<TD width="356">The absolute value gets subtracted from the maximum possible size, and the resulting size gets assigned to the stack.</TD> 221 </TR> 222 </TBODY> 223 </TABLE> 224<BR> For the IRQ stack size, the value is assigned as the stack size. The specifications for stack size and IRQ stack size can be omitted. In that case, the stack size setting is 0 (maximum possible size), and the IRQ stack size is <CODE>0x800</CODE> bytes. 225</DL> 226</BLOCKQUOTE> 227<H4>Autoload Section (Autoload Module Definitions Section)</H4> 228<P>Autoload is a system that transfers the module to several regions at the program startup. The transfer process occurs before calling the common libraries in <CODE>crt0.o</CODE>, so it is possible to transfer the system libraries such as OS and FS to ITCM/DTCM. <CODE>ITCM</CODE> and <CODE>DTCM</CODE> are reserved as section names to be auto-loaded to ITCM or DTCM. Specify one of these.</P> 229<BLOCKQUOTE> 230<DL class="command_list"> 231<DT class="command_item"><CODE>Address</CODE> <I>[address]</I> 232<DD class="command_desc">See the <CODE>Address</CODE> parameter in the <CODE>Static</CODE> section. 233<DT class="command_item"><CODE>After</CODE> <EM>[other section name...]</EM> 234<DD class="command_desc">The current section is placed immediately after the other specified section. When more than one section is specified in <CODE>After</CODE>, the current section is placed immediately after the section with the largest final address. (This is done so there is no overlapping region with all of the sections.) <CODE>Address</CODE> and <CODE>After</CODE> are not enabled within the same section. The first one in the description has the priority. 235<DT class="command_item"><CODE>Object</CODE> <I>[object filename...] [(selected sections)]</I> 236<DD class="command_desc">This specifies the object files that are included in the Autoload Module. <BR>As a result of compiling the source file specified by the makefile's <CODE>SRCS_AUTOLOAD</CODE> variable, the generated object file is given with a path to <code>makelcf</code> as <CODE>$(OBJS_AUTOLOAD)</CODE>. If it is not necessary to specify successive object files, use the following format. 237<BLOCKQUOTE><CODE>Object $(OBJS_AUTOLOAD)</CODE></BLOCKQUOTE> 238Everything aside from what appears above is the same as the <CODE>Object</CODE> parameter in the <CODE>Static</CODE> section. 239<DT class="command_item"><CODE>Library</CODE> <I>[library filename...]</I> 240<DD class="command_desc">Same as the <CODE>Library</CODE> parameter in the <CODE>Static</CODE> section. 241<DT class="command_item"><CODE>SearchSymbol</CODE> <I>[Other section name or overlay group name...]</I> 242<DD class="command_desc">Same as the <CODE>SearchSymbol</CODE> parameter in the <CODE>Static</CODE> section.<BR> 243<DT class="command_item"><CODE>Force</CODE> <I>[symbol name, object filename, or library name]</I> 244<DD class="command_desc">Same as the <CODE>Force</CODE> parameter in the <CODE>Static</CODE> section.<BR> 245</DL> 246</BLOCKQUOTE> 247<H4>Overlay Section (Overlay Module Definitions Section)</H4> 248<BLOCKQUOTE> 249<DL class="command_list"> 250<DT class="command_item"><CODE>Address</CODE> <I>[address]</I> 251<DD class="command_desc">See the <CODE>Address</CODE> parameter in the <CODE>Static</CODE> section. 252<DT class="command_item"><CODE>After</CODE> <EM>[other section name...]</EM> 253<DD class="command_desc">See the <CODE>After</CODE> parameter in the <CODE>Autoload</CODE> section. 254<DT class="command_item"><CODE>Object</CODE> <I>[object filename...]</I> 255<DD class="command_desc">Specifies the object files that are included in the Overlay Module.<BR>As a result of compiling the source file specified by the makefile's <CODE>SRCS_OVERLAY</CODE> variable, the generated object file is given with a path to <code>makelcf</code> as <CODE>$(OBJS_OVERLAY)</CODE>. If it is not necessary to specify successive object files, use the following format. 256<BLOCKQUOTE><CODE>Object $(OBJS_OVERLAY)</CODE></BLOCKQUOTE> 257Everything aside from what appears above is the same as the <CODE>Object</CODE> parameter in the <CODE>Static</CODE> section. 258<DT class="command_item"><CODE>Library</CODE> <I>[library filename...]</I> 259<DD class="command_desc">See the <CODE>Library</CODE> parameter in the <CODE>Static</CODE> section. 260<DT class="command_item"><CODE>Group</CODE> <I>[overlay_group_name]</I> 261<DD class="command_desc">Specifies the overlay group to which the current section belongs. The linker assumes that overlays belonging to the same group are located in the same memory region. By specifying mutually exclusive overlay modules as belonging to the same group, you can detect function calls between the overlays as errors during linking. In addition, the overlay group setting for each overlay module is referenced to determine whether the compiler should treat functions with inline declarations as inline code. If calling inline functions causes problems during a debug build, try using the overlay group setting to resolve the problem.<BR><BR> <FONT color="#ff0000">This overlay group specification is supported with versions including and after SDK 3.0 RC 1.</FONT>The group with the same name as the current section name is set if the overlay group specification is omitted to maintain compatibility.<BR><BR> 262<DT class="command_item"><CODE>SearchSymbol</CODE> <I>[Other section name or overlay group name...]</I> 263<DD class="command_desc">Same as the <CODE>SearchSymbol</CODE> parameter in the <CODE>Static</CODE> section.<BR> 264<DT class="command_item"><CODE>Force</CODE> <I>[symbol name, object filename, or library name]</I> 265<DD class="command_desc">Same as the <CODE>Force</CODE> parameter in the <CODE>Static</CODE> section.<BR> 266<DT class="command_item"><CODE>Compress</CODE> <I><CODE>[Smart|Exclusion]</CODE></I> 267<DD class="command_desc">Specifies whether to exclude the target from compression when compressing the resident module using <CODE><a href="compstatic.html">compstatic</a> (<a href="compstaticTWL.html">compstatic.TWL</a>)</CODE>.<BR><BR> The following values can be specified. 268 269 <TABLE class="blockquoted_table"> 270 <TBODY> 271 <TR> 272<TD width="66"><CODE>Smart</CODE></TD> 273<TD>When the <CODE>-c</CODE> option is passed to <CODE>compstatic (compstatic.TWL)</CODE>, the specified compression is applied.<BR><CODE>This operation results even if the <CODE>Compress</CODE> option has not been specified.</TD> 274 </TR> 275 <TR> 276<TD width="66"><CODE>Exclusion</CODE></TD> 277<TD>When the <CODE>-c</CODE> option is passed to <CODE>compstatic (compstatic.TWL)</CODE>, the target is excluded from compression.</TD> 278 </TR> 279 </TBODY> 280 </TABLE> 281</DL> 282</BLOCKQUOTE> 283<H4>Ltdautoload Section (LTD Autoload Module Definitions Section)</H4> 284<FONT color="#ff0000">This section can be used only in the TWL environment.</FONT><BR> <FONT color="#ff0000">When NITRO or TWL shared overlays exist, this section must be placed after those overlays.</FONT><BR> 285<P>LTD Autoload is a system that transfers the module to the LTD region at program startup. The transfer process takes place prior to calling the standard libraries in <CODE>crt0.o</CODE> . <CODE>LTDMAIN</CODE> is reserved as the name of the section to autoload to the LTD region, so specify <CODE>LTDMAIN</CODE>.</P> 286<BLOCKQUOTE> 287<DL class="command_list"> 288<DT class="command_item"><CODE>Address</CODE> <I>[address]</I> 289<DD class="command_desc">See the <CODE>Address</CODE> parameter in the <CODE>Static</CODE> section. 290<DT class="command_item"><CODE>After</CODE> <EM>[other section name...]</EM> 291<DD class="command_desc">See the <CODE>After</CODE> parameter in the <CODE>Autoload</CODE> section. 292<DT class="command_item"><CODE>Object</CODE> <I>[object filename...]</I> 293<DD class="command_desc">Specifies the object files that are included in the LTD Autoload Module.<BR>As a result of compiling the source file specified by the makefile's <CODE>SRCS_LTDAUTOLOAD</CODE> variable, the generated object file is given with a path to <code>makelcf</code> as <CODE>$(OBJS_LTDAUTOLOAD)</CODE>. If it is not necessary to specify successive object files, use the following format. 294<BLOCKQUOTE><CODE>Object $(OBJS_LTDAUTOLOAD)</CODE></BLOCKQUOTE> 295Everything aside from what appears above is the same as the <CODE>Object</CODE> parameter in the <CODE>Static</CODE> section. 296<DT class="command_item"><CODE>Library</CODE> <I>[library filename...]</I> 297<DD class="command_desc">This specifies the library files that are included in the LTD Autoload Module. As a result of compiling library groups specified by the makefile's <CODE>LLIBRARIES_EX</CODE> variable, the compiled group and SDK library groups are given to <CODE>makelcf</CODE> as <CODE>$(LLIBS_EX)</CODE> and <CODE>$(GLIBS_EX)</CODE>, respectively. Use the following format to specify the libraries. 298<BLOCKQUOTE><CODE>Library $(LLIBS_EX) $(GLIBS_EX)</CODE></BLOCKQUOTE> 299The library file described in <CODE>Library</CODE> is passed with the <CODE>-1</CODE> option to the response file. 300<DT class="command_item"><CODE>SearchSymbol</CODE> <I>[Other section name or overlay group name...]</I> 301<DD class="command_desc">Same as the <CODE>SearchSymbol</CODE> parameter in the <CODE>Static</CODE> section.<BR> 302<DT class="command_item"><CODE>Force</CODE> <I>[symbol name, object filename, or library name]</I> 303<DD class="command_desc">Same as the <CODE>Force</CODE> parameter in the <CODE>Static</CODE> section.<BR> 304</DL> 305</BLOCKQUOTE> 306<H4>Ltdoverlay Section (LTD Overlay Module Definitions Section)</H4> 307<FONT color="#ff0000">This section can be used only in the TWL environment.</FONT><BR> 308<BLOCKQUOTE> 309<DL class="command_list"> 310<DT class="command_item"><CODE>Address</CODE> <I>[address]</I> 311<DD class="command_desc">See the <CODE>Address</CODE> parameter in the <CODE>Static</CODE> section. 312<DT class="command_item"><CODE>After</CODE> <EM>[other section name...]</EM> 313<DD class="command_desc">See the <CODE>After</CODE> parameter in the <CODE>Autoload</CODE> section. 314<DT class="command_item"><CODE>Object</CODE> <I>[object filename...]</I> 315<DD class="command_desc"> Specifies the object files that are included in the Overlay Module.<BR><BR> As a result of compiling the source file specified by the makefile's <CODE>SRCS_LTDOVERLAY</CODE> variable, the generated object file is given with a path to <code>makelcf</code> as <CODE>$(OBJS_LTDOVERLAY)</CODE>. If it is not necessary to specify successive object files, use the following format. 316<BLOCKQUOTE><CODE>Object $(OBJS_LTDOVERLAY)</CODE></BLOCKQUOTE> 317Everything other than what appears above is the same as the <CODE>Object</CODE> parameter in the <CODE>Static</CODE> section. 318<DT class="command_item"><CODE>Library</CODE> <I>[library filename...]</I> 319<DD class="command_desc">See the <CODE>Library</CODE> parameter in the <CODE>Static</CODE> section. 320<DT class="command_item"><CODE>Group</CODE> <I>[overlay_group_name]</I> 321<DD class="command_desc">Same as the <CODE>Overlay</CODE> section's <CODE>Group</CODE> parameter. 322<DT class="command_item"><CODE>SearchSymbol</CODE> <I>[Other section name or overlay group name...]</I> 323<DD class="command_desc">Same as the <CODE>SearchSymbol</CODE> parameter in the <CODE>Static</CODE> section.<BR> 324<DT class="command_item"><CODE>Force</CODE> <I>[symbol name, object filename, or library name]</I> 325<DD class="command_desc">Same as the <CODE>Force</CODE> parameter in the <CODE>Static</CODE> section.<BR> 326<DT class="command_item"><CODE>Compress</CODE> <I><CODE>[Smart|Exclusion]</CODE></I> 327<DD class="command_desc">Specifies whether to exclude the target from compression when compressing the resident module using <CODE><a href="compstaticTWL.html">compstatic.TWL</a></CODE>.<BR><BR> The following values can be specified. 328 329 <TABLE class="blockquoted_table"> 330 <TBODY> 331 <TR> 332<TD width="66"><CODE>Smart</CODE></TD> 333<TD>When the <CODE>-C</CODE> option is passed to <CODE>compstatic.TWL</CODE>, the specified compression is applied.<BR><CODE>This operation results even if the <CODE>Compress</CODE> option has not been specified.</TD> 334 </TR> 335 <TR> 336<TD width="66"><CODE>Exclusion</CODE></TD> 337<TD>When the <CODE>-C</CODE> option is passed to <CODE>compstatic.TWL</CODE>, the target is excluded from compression.<BR><CODE></TD> 338 </TR> 339 </TBODY> 340 </TABLE> 341</DL> 342</BLOCKQUOTE> 343<H4>Property Section (Incidental Information Definitions Section)</H4> 344<BLOCKQUOTE> 345<DL class="command_list"> 346<DT class="command_item"><CODE>OverlayDefs</CODE> <em>[Overlay Name Filename (without extension)]</em> 347<DD class="command_desc">Specifies the filename (excluding extension) for the Overlay Name file that gets created at link time. If the filename starts with <CODE>%</CODE>, the <CODE>%</CODE> sign is replaced with the <I>[name of the static module section]</I> specified at the start of the <CODE>Static</CODE> section. It can be omitted, in which case <CODE>"%_defs"</CODE> gets used. 348<DT class="command_item"><CODE>OverlayTable</CODE> <em>[OverlayTable filename]</em> 349<DD class="command_desc">Specifies the filename (excluding an extension) for the Overlay Table file that gets created at the time of linking. If the filename starts with <CODE>%</CODE>, the <CODE>%</CODE> sign is replaced with the <I>[name of the static module section]</I> specified at the start of the <CODE>Static</CODE> section. It can be omitted, in which case <CODE>%_table</CODE> is used. 350<DT class="command_item"><CODE>Suffix</CODE> <em>[File extension for application binary files]</em> 351<DD class="command_desc">Specifies the filename extension for the binary files that get created at the time of linking a NITRO build. It can be omitted, in which case <CODE>.sbin</CODE> is used. 352<DT class="command_item"><CODE>LtdoverlayDefs</CODE> <em>[LTD Overlay Name Filename (without extension)]</em> 353<DD class="command_desc">Specifies the filename (excluding an extension) for the LTD Overlay Name file that is created at the time of linking. If the filename starts with <CODE>%</CODE>, the <CODE>%</CODE> sign is replaced with the <I>[name of the static module section]</I> specified at the start of the <CODE>Static</CODE> section. It can be omitted, in which case <CODE>"%_defs"</CODE> gets used. 354<DT class="command_item"><CODE>LtdoverlayTable</CODE> <em>[LTD OverlayTable filename]</em> 355<DD class="command_desc">Specifies the filename (excluding an extension) for the Overlay Table file that gets created at the time of linking. If the filename starts with <CODE>%</CODE>, the <CODE>%</CODE> sign is replaced with the <I>[name of the static module section]</I> specified at the start of the <CODE>Static</CODE> section. It can be omitted, in which case <CODE>%_table</CODE> is used. 356<DT class="command_item"><CODE>Flxsuffix</CODE><em>[Extension for application binary files]</em> 357<DD class="command_desc">Specifies the filename extension for the binary files in the NITRO/TWL-compatible region that is created at the time of linking a TWL build. It can be omitted, in which case <CODE>.TWL.FLX.sbin</CODE> is used. 358<DT class="command_item"><CODE>Ltdsuffix</CODE><em>[Extension for application binary files]</em> 359<DD class="command_desc">Specifies the filename extension for the binary files in the TWL-exclusive region that get created at the time of linking a TWL build. It can be omitted, in which case <CODE>.TWL.LTD.sbin</CODE> is used. 360</DL> 361</BLOCKQUOTE> 362<H3>Variable References and Modifier Options</H3> 363<P>You can reference the value of a variable that is defined outside of the Linker Spec file by specifying the variable in the format: <CODE>$([<em>variable name</em>])</CODE>. The variable's value can be set with the command line option like this: <CODE>-D</CODE><em>[variable name]</em>=<em>[value]</em>. Alternately, you can set the value using an environment variable. If the same variable is defined with both the <CODE>-D</CODE> option and an environment variable, the <CODE>-D</CODE> option value takes priority. The following is an example of a description for a variable reference.</P> 364<BLOCKQUOTE> 365<PRE class="sample_source">Static $(TARGET_NAME)<BR> 366{ 367 Address $(START_ADDRESS) 368 Object * 369}</CODE></PRE> 370</BLOCKQUOTE> 371<P>If the variable value is in the form of a file path, you can reference the value by attaching a modifier option immediately after the variable name. The following values can be referenced with the modifier options: <CODE>:h</CODE>, <CODE>:t</CODE>, <CODE>:r</CODE>, and <CODE>:e</CODE>.</P> 372<BLOCKQUOTE>For <CODE>$(FILE)=C:/home/Twl/readme.txt</CODE>: 373<TABLE class="blockquoted_table"> 374 <TBODY> 375 <TR> 376<TD><CODE>:h</CODE></TD> 377<TD>The portion of the path before the final path delimiter.</TD> 378<TD><CODE>$(FILE:h)=C:/home/Twl/</CODE></TD> 379 </TR> 380 <TR> 381<TD><CODE>:t</CODE></TD> 382<TD>The portion of the path after the final path delimiter.</TD> 383<TD><CODE>$(FILE:t)=readme.txt</CODE></TD> 384 </TR> 385 <TR> 386<TD><CODE>:r</CODE></TD> 387<TD>The path, excluding the file extension.</TD> 388<TD><CODE>$(FILE:r)=C:/home/Twl/readme</CODE></TD> 389 </TR> 390 <TR> 391<TD><CODE>:e</CODE></TD> 392<TD>The file extension.</TD> 393<TD><CODE>$(FILE:e)=txt</CODE></TD> 394 </TR> 395 </TBODY> 396</TABLE> 397</BLOCKQUOTE> 398<H3>Other Formats</H3> 399<P>Keywords such as <CODE>"Static"</CODE> used in section definitions can be written this way, all in uppercase (<CODE>"STATIC"</CODE>), or all in lowercase (<CODE>"static"</CODE>). Anything than follows the pound sign (<CODE>#</CODE>) is treated as a comment.</P> 400<BLOCKQUOTE> 401<PRE class="sample_source"><CODE># 402# Lines that begin with <CODE>#</CODE> are comments<BR> 403# 404STATIC my_app # Uppercase is also OK 405{ 406 .... 407}</CODE></PRE> 408</BLOCKQUOTE> 409<H2>Location</H2> 410<P><CODE>$TwlSDK/tools/bin/makelcf.exe</CODE><BR> <CODE>$TwlSDK/tools/bin/makelcf.TWL.exe</CODE></P> 411<H2>See Also</H2> 412<P><CODE><A href="makerom.html">makerom</A><BR> <A href="compstatic.html">compstatic</A><BR><A href="compstaticTWL.html">compstatic.TWL</A><BR> <A href="../fs/fs_overlay_id_types.html">FSOverlayID</A></CODE></P> 413<H2>Revision History</H2> 414<P> 4152009/11/11 Added the Force parameter to the Static, Autoload, Overlay, Ltdautoload, and Ltdoverlay sections.<BR>2009/10/20 Added the Compress parameter to the Overlay and Ltdoverlay sections.<BR>2008/12/16 Changed the address in the static-module definition example from <CODE>0x02000400</CODE> to <CODE>0x02004000</CODE>.<BR> 2008/09/12 Added a description of <CODE>makelcf.TWL</CODE>.<BR> 2007/04/11 Changed the description of operations when the <CODE>makelcf</CODE> argument <CODE>LCFILE</CODE> is omitted. Added a description of <CODE>SearchSymbol</CODE> in other than <B>Overlay Section</B>.<BR>2007/01/19 Changed the default IRQ stack size.<BR> 2006/05/09 Made it possible to select overlay groups to find symbols during linking.<BR> 2005/09/02 Made revisions in line with added support for overlay groups.<BR> 2004/07/20 Revisions in line with SDK 2.0 overlay operation changes.<BR> 2004/05/25 Initial version.</P> 416<hr><p>CONFIDENTIAL</p></body> 417</HTML> 418