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=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>SDK Build Switches</TITLE>
8<LINK rel="stylesheet" href="TwlSDKStandard.css" type="text/css">
9</HEAD>
10<BODY>
11<H1>Build Switches</H1>
12<H2 id="h2_content_1_0">Environment Variables Required When Building the SDK<a class="anchor_super" id="ufb8427e"></a></H2>
13Below are the environment variables you must set when building the TWL-SDK tree. The default values are used if a given setting is missing. For more information about the range in which each build switch can be set, see the <A href="#buildswitch_list">Build Switch Usage Table</A>.<BR><BR>
14<TABLE border="1" width="100%" cellspacing="0" cellpadding="2">
15  <COL span="1" width="160">
16  <TBODY>
17    <TR>
18      <TH valign="top" align="left">TWLSDK_ROOT<BR> (NITROSDK_ROOT)<BR> <FONT color="#ff0000">* Important</FONT></TH>
19      <TD valign="top" align="left">
20      Directory where the TWL-SDK is installed (the directory into which <CODE>$TwlSDK</CODE> is extracted).<BR><BR> <strong style="color:#FF6633">Initial value: <CODE>C:/TwlSDK</CODE></strong>
21      </TD>
22    </TR>
23    <TR>
24      <TH valign="top" align="left">TWLSDK_PLATFORM<BR> <FONT color="#ff0000">* Important</FONT></TH>
25      <TD valign="top" align="left">
26      Platform to build for.<BR> By using this environment variable, you can compile for only the desired platform.<BR><BR> For example, if developing only TWL applications with TWL-SDK, set the environment variable to &quot;<CODE>TWLSDK_PLATFORM=TWL</CODE>&quot;. Doing so causes the compiler to generate code only for TWL, without generating any unnecessary NITRO code.<BR> <FONT color="#ff0000">When not specified, the build halts with an error.</FONT><BR>
27      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
28        <COL span="1" width="120">
29        <TBODY>
30          <TR>
31            <TD><B>TWL</B></TD>
32            <TD>Generates code for TWL.</TD>
33          </TR>
34          <TR>
35            <TD><B>NITRO</B></TD>
36            <TD>Generates code for NITRO.</TD>
37          </TR>
38          <TR>
39            <TD><B>ALL</B></TD>
40            <TD rowspan="2">Generates code for both TWL and NITRO.</TD>
41          </TR>
42          <TR>
43            <TD><B>TWL NITRO</B></TD>
44          </TR>
45        </TBODY>
46      </TABLE>
47      <strong style="color:#FF6633">Initial value: Unspecified</strong>
48      </TD>
49    </TR>
50    <TR>
51      <TH valign="top" align="left">CWFOLDER_TWL<BR> (CWFOLDER_NITRO)<BR></TH>
52      <TD valign="top" align="left">Directory where CodeWarrior is installed. <BR> If you install CodeWarrior for NITRO, <CODE>CWFOLDER_NITRO</CODE> is configured automatically.<BR> When making this setting with Cygwin bash, you must enclose the directory in single quotes as follows.<BR> <CODE>% export CWFOLDER_NITRO='D:/Program Files/Freescale/CW for NINTENDO DS V2.0'</CODE> <BR><BR> When making this setting with a Windows environment variable, the specification takes the form given below.<BR> <CODE>D:/Program Files/Freescale/CW for NINTENDO DS V2.0</CODE><BR> Both <CODE>/</CODE> and <CODE>\</CODE> work as path delimiters. <BR><BR> <strong style="color:#FF6633">Initial value: None (usually set when CodeWarrior is installed)</strong></TD>
53    </TR>
54    <TR>
55      <TH valign="top" align="left">LM_LICENSE_FILE</TH>
56      <TD valign="top" align="left">License file path for CodeWarrior. <BR><BR> <strong style="color:#FF6633">Initial value: None (usually set when CodeWarrior is installed)</strong></TD>
57    </TR>
58    <TR>
59      <TH align="left" valign="top">IS_TWL_DEBUGGER_DIR<BR> (IS_NITRO_DIR)</TH>
60      <TD valign="top" align="left">Installation folder for IS-TWL-DEBUGGER-related files. It is automatically set when IS-TWL-DEBUGGER is installed. If this environment variable exists, the IS-TWL-DEBUGGER-related libraries are linked automatically. <BR><BR> <strong style="color:#FF6633">Initial value: None (usually set when IS-TWL-DEBUGGER is installed)</strong></TD>
61    </TR>
62  </TBODY>
63</TABLE>
64
65<H2 id="h2_content_1_0">Build Switches When Building the SDK<a class="anchor_super" id="ufb8427e"></a></H2>
66The build switches that change the build conditions for the TWL-SDK tree are shown below.<BR> Normally, these values are set by specifying them as parameters to the <CODE>make</CODE> command (for example, <CODE>make TWL_DEBUG=TRUE</CODE>) and including them in makefiles, though they can also be set with standard environment variables. The default values are used if a given setting is missing. For more information about the ranges in which each build switch can be set, see the <A href="#buildswitch_list">Build Switch Usage Table</A>.<BR><BR> The values of the TWL environment variables (<CODE>TWL_*</CODE>) are given priority if changes are made to the environment variables below. (If <CODE>TWL_PROC=ARM9</CODE> and <CODE>NITRO_PROC=ARM7</CODE> are both present in a makefile at the same time, <CODE>ARM9</CODE> is set.)<BR>
67<TABLE border="1" width="100%" cellspacing="0" cellpadding="2">
68  <COL span="1" width="160">
69  <TBODY>
70    <TR>
71      <TH valign="top" align="left">TWL_PROC<BR>(NITRO_PROC)<BR> <FONT color="#a0a0a0">* No change necessary</FONT></TH>
72      <TD align="left">Sets which processor to generate code for: the ARM9 (main processor), or the ARM7 (subprocessor).<BR> <FONT color="#ff0000">Use the default value unchanged.</FONT><BR>
73      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
74        <COL span="1" width="120">
75        <TBODY>
76          <TR>
77            <TD><B>ARM9</B></TD>
78            <TD>Generates code for the ARM9 (main processor). <strong style="color:#FF6633">Default Value</strong></TD>
79          </TR>
80          <TR>
81            <TD><B>ARM7</B></TD>
82            <TD>Generates code for the ARM7 (subprocessor).</TD>
83          </TR>
84        </TBODY>
85      </TABLE>
86    </TR>
87    <TR>
88      <TH valign="top" align="left">TWL_ARCHGEN</TH>
89      <TD align="left">For TWL code, sets whether to generate TWL-exclusive code or NITRO/TWL hybrid code.<BR><BR> <FONT color="#ff0000">This build switch may be rewritten in the build system.<BR> Specifically, this sets whether limited or hybrid code is being built.<BR> If you want to reference this build switch in the makefile, do so after <CODE>commondefs</CODE>.</FONT><BR>
90<table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
91        <COL span="1" width="140">
92        <TBODY>
93          <TR>
94            <TD><B>LIMITED</B></TD>
95            <TD>Generates TWL-exclusive code.</TD>
96          </TR>
97          <TR>
98            <TD><B>HYBRID</B></TD>
99            <TD>Generates NITRO/TWL hybrid code. <strong style="color:#FF6633">Default Value</strong></TD>
100          </TR>
101          <TR>
102            <TD><B>ALL</B></TD>
103            <TD rowspan=2>Generates both limited and hybrid code.</TD>
104          </TR>
105          <TR>
106            <TD><B>LIMITED HYBRID</B></TD>
107          </TR>
108        </TBODY>
109      </TABLE>
110    </TR>
111    <TR>
112      <TH valign="top" align="left">TWL_CODEGEN<BR> (NITRO_CODEGEN)</TH>
113      <TD align="left">Sets whether binary code generated by the compiler and assembler should use the ARM or THUMB instruction set.<BR> If this is not set explicitly in the source code, the code is generated according to this setting.<BR><BR> If you want to reference the value set for this build switch in the makefile, do so after <CODE>commondefs</CODE>.<BR>
114      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
115        <COL span="1" width="120">
116        <TBODY>
117          <TR>
118            <TD><B>ARM</B></TD>
119            <TD>Generates ARM code. <strong style="color:#FF6633">Default Value</strong></TD>
120          </TR>
121          <TR>
122            <TD><B>THUMB</B></TD>
123            <TD>Generates THUMB code.</TD>
124          </TR>
125          <TR>
126            <TD><B>ALL</B></TD>
127            <TD rowspan=2>Generates both ARM code and THUMB code.</TD>
128          </TR>
129          <TR>
130            <TD><B>ARM THUMB</B></TD>
131          </TR>
132        </TBODY>
133      </TABLE>
134    </TR>
135    <TR>
136      <TH valign="top" align="left">TWL_DEBUG<BR> (NITRO_DEBUG)<BR>TWL_RELEASE<BR> (NITRO_RELEASE)<BR>TWL_FINALROM<BR> (NITRO_FINALROM)<BR> <FONT color="#ff0000">* Important</FONT></TH>
137      <TD align="left">Select from the following build types: DEBUG, RELEASE, and FINALROM.<BR> When the <CODE>make</CODE> command is executed, the compile options and the linked libraries change according to this setting.<BR> Unlike other variables, this variable is enabled by setting it to one of the three values (such as <CODE>TRUE</CODE>). <BR> See <CODE>$TwlSDK/man/en_US/information/compiletarget.html</CODE> (Description of Compile Targets) for more information about these three options.<BR><BR> <strong style="color:#FF6633">Initial value: When not specified, the RELEASE version is built.</strong>
138    </TR>
139    <TR>
140      <TH valign="top" align="left">TWL_STD_PCHDR<BR> (NITRO_STD_PCHDR)<BR> TWL_NO_STD_PCHDR<BR> (NITRO_NO_STD_PCHDR)</TH>
141      <TD valign="top" align="left">
142      When a value is set for <CODE>TWL_STD_PCHDR</CODE>, the build system precompiles <CODE>$TwlSDK/include/twl.h</CODE> and loads the result during the file build. This should result in a faster build. <BR> To temporarily suppress this compile, set a value in <CODE>TWL_NO_STD_PCHDR</CODE>.<BR><BR> <strong style="color:#FF6633">Initial value: <CODE>TWL_STD_PCHDR</CODE>=True</strong></TD>
143    </TR>
144    <TR>
145      <TH valign="top" align="left">TWLSDK_LANG<BR>(NITROSDK_LANG)</TH>
146      <TD valign="top" align="left">Switches the TWL-SDK compile options between Japanese and English.<BR> For Japanese, the <CODE>-enc SJIS</CODE> option is set. For English, the <CODE>-enc ascii</CODE> option is set.
147      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
148        <COL span="1" width="120">
149        <TBODY>
150          <TR>
151            <TD><B>jp</B></TD>
152            <TD>Japanese<strong style="color:#FF6633"> [Default value]</strong></TD>
153          </TR>
154          <TR>
155            <TD><B>en</B></TD>
156            <TD>English</TD>
157          </TR>
158        </TBODY>
159      </TABLE>
160    </TR>
161    <TR>
162      <TH valign="top" align="left">TWL_ROMSPEED<BR>(NITRO_ROMSPEED)</TH>
163      <TD valign="top" align="left">
164      When you use the default RSF file, this assigns the specified value to the <CODE>RomSpeedType</CODE> parameter in the Property section. Specifically, the value of the <CODE>MAKEROM_ROMSPEED</CODE> symbol passed to the <CODE>makerom.TWL.exe</CODE> tool is used. When you use an original file instead of the default RSF file, this is ignored. For information on the <CODE>RomSpeedType</CODE> parameter, see the documentation for the <CODE>makerom.TWL.exe</CODE> tool. <FONT color="#ff0000">MROM cannot be used with TWL.</FONT>
165      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
166        <COL span="1" width="120">
167        <TBODY>
168          <TR>
169            <TD><B>1TROM</B></TD>
170            <TD>One-time PROM</TD>
171          </TR>
172          <TR>
173            <TD><B>MROM</B></TD>
174            <TD>Mask ROM</TD>
175          </TR>
176          <TR>
177            <TD><B>UNDEFINED</B></TD>
178            <TD>None specified<strong style="color:#FF6633"> [Default value]</strong></TD>
179          </TR>
180        </TBODY>
181      </TABLE>
182      </TD>
183    </TR>
184    <TR>
185      <TH valign="top" align="left">TWL_COMPRESS<BR>(NITRO_COMPRESS)<BR> <FONT color="#ff0000">* Important</FONT></TH>
186      <TD valign="top" align="left">When some value is specified here, the STATIC and OVERLAY segments are compressed after linking.<BR><BR> <strong style="color:#FF6633">Initial value: None (no compression)</strong></TD>
187    </TR>
188    <TR>
189      <TH valign="top" align="left">TWL_DIGEST<BR>(NITRO_DIGEST)</TH>
190      <TD valign="top" align="left">This build switch is enabled only for applications. It is ignored when building the SDK. If some value is set here, the application is built as a DS Download Play child program that uses overlays.<BR><BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
191    </TR>
192    <TR>
193      <TH valign="top" align="left">TWL_PROFILE<BR>(NITRO_PROFILE)</TH>
194      <TD valign="top" align="left">If some value is set here, the <CODE>-profile</CODE> option is added when compiling. This is primarily used with DEBUG builds so that input and output of each function can be traced when the application runs.<BR> For details of use, see the <CODE>OS_DumpCallTrace</CODE> function.<BR><BR> <strong style="color:#FF6633">Initial value: None (<CODE>-profile</CODE> option is disabled)</strong></TD>
195    </TR>
196    <TR>
197      <TH valign="top" align="left">TWL_MEMSIZE<BR>(NITRO_MEMSIZE)<BR> <FONT color="#a0a0a0">* No change necessary</FONT></TH>
198      <TD valign="top" align="left">
199      Specifies the main memory size of TWL compile targets. Specifying this with a build switch is the old method, which was retained for backward compatibility. The current, more convenient method is to use the <CODE>OS_EnableMainExArena</CODE> function instead. We recommend the current method because it does not require you to rebuild the SDK.<BR> <FONT color="#ff0000">Use the default value unchanged.</FONT><BR>
200      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
201        <COL span="1" width="120">
202        <tbody>
203          <tr>
204        <td colspan="2"><B>TWL_MEMSIZE</B></td>
205          </tr>
206          <tr>
207        <td><span class="wikicolor" style="color:Blue"><strong>16M</strong></span></td>
208        <td>16 MB<strong style="color:#FF6633"> [Default value]</strong></td>
209          </tr>
210          <tr>
211        <td><span class="wikicolor" style="color:Blue"><strong>32M</strong></span></td>
212        <td>32 MB</td>
213          </tr>
214        </tbody>
215      </table>
216      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
217        <COL span="1" width="120">
218        <tbody>
219          <tr>
220        <td colspan="2"><B>NITRO_MEMSIZE</B></td>
221          </tr>
222          <tr>
223        <td><span class="wikicolor" style="color:Blue"><B>4M</B></span></td>
224        <td>4 MB<strong style="color:#FF6633"> [Default value]</strong></td>
225          </tr>
226          <tr>
227        <td><span class="wikicolor" style="color:Blue"><B>8M</B></span></td>
228        <td>8 MB</td>
229          </tr>
230        </tbody>
231      </table>
232      </TD>
233    </TR>
234    <TR>
235      <TH valign="top" align="left">TWL_NO_OPT_G<BR>(NITRO_NO_OPT_G)</TH>
236      <TD valign="top" align="left">
237      When some value is set here, the <CODE>-g</CODE> option specified during normal compilation and linking is removed. Programmers can expect a reduction in linking times that become an issue in large projects. <BR><BR> <strong style="color:#FF6633">Initial value: None (<CODE>-g</CODE> option enabled)</strong></TD>
238    </TR>
239    <TR>
240      <TH valign="top" align="left">TWL_SVC_WAITVBLANK_COMPATIBLE<BR>(NITRO_SVC_WAITVBLANK_COMPATIBLE)<BR></TH>
241      <TD valign="top" align="left">
242      Define this when you do not want to automatically replace <CODE>SVC_WaitVBlankIntr</CODE> function calls with <CODE>OS_WaitVBlankIntr</CODE> function calls. However, by specification the <CODE>SVC_WaitVBlankIntr</CODE> function does not release resources to low-priority threads, and that may cause problems depending on how the function is used. If you absolutely must use the old system calls, you should do so only after thorough verification.<BR><BR> <B>Note:</B> This replacement is made using a <CODE>#define</CODE> statement inside a header file, so it is valid only after the TWL-SDK is rebuilt.<BR> If this environment variable is defined during <CODE>make</CODE>, <CODE>SDK_SVC_WAITVBLANK_COMPATIBLE</CODE> is defined, and you can find it in the source through <CODE>#ifdef</CODE>/<CODE>#endif</CODE> statements.<BR><BR> This switch is not defined by default, so <CODE>SVC_WaitVBlankIntr</CODE> function calls are automatically replaced with <CODE>OS_WaitVBlankIntr</CODE> function calls.<BR><BR> <strong style="color:#FF6633">Initial value: None.</strong>
243      </TD>
244    </TR>
245    <TR>
246      <TH valign="top" align="left">CW_LIBFP</TH>
247      <TD align="left">Specify any one of the following floating-point libraries to the CodeWarrior compiler.<BR> If nothing is specified, the default value is used.<BR> For details on the differences in performance between the libraries, see the CodeWarrior reference.
248      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
249        <COL span="1" width="120">
250        <TBODY>
251          <TR>
252            <TD><B>FP_fastI_v5t_LE.a</B></TD>
253            <TD>Fast IEEE<strong style="color:#FF6633"> [Default value]</strong></TD>
254          </TR>
255          <TR>
256            <TD><B>FP_fixedI_v5t_LE.a</B></TD>
257            <TD>Fixed-rounding IEEE</TD>
258          </TR>
259          <TR>
260            <TD><B>FP_fullI_v5t_LE.a</B></TD>
261            <TD>Full IEEE</TD>
262          </TR>
263          <TR>
264            <TD><B>FP_flush0_v5t_LE.a</B></TD>
265            <TD>Flush to zero (not IEEE compatible)</TD>
266          </TR>
267        </TBODY>
268      </TABLE>
269    </TR>
270  </TBODY>
271</TABLE>
272
273<H2 id="h2_content_1_0">Build Switches Set in the SDK Makefiles<a class="anchor_super" id="ufb8427e"></a></H2>
274The following table shows the build switches that configure the build conditions for each directory in the TWL-SDK makefiles.<BR> These settings specify the locations in source code as well as the makefiles to concatenate.<BR> When not configured, the default value is used.
275<TABLE border="1" width="100%" cellspacing="0" cellpadding="2">
276  <COL span="1" width="160">
277  <TBODY>
278    <TR>
279      <TH valign="top" align="left">TARGET_PLATFORM<BR> <FONT color="#ff0000">* Important</FONT></TH>
280      <TD valign="top" align="left">In the makefile, sets whether to actually perform the build based on the build target platform.<BR><BR> For example, to create a demo that you want to build only in TWL mode, include <CODE>TARGET_PLATFORM=TWL</CODE> in the makefile for that demo. This builds the demo only in TWL mode, and prevents it from being built in NITRO mode.<BR><BR> If this setting is not present in a makefile, there are no restrictions on the platforms for which code is generated.<BR>
281      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
282        <COL span="1" width="120">
283        <TBODY>
284          <TR>
285            <TD><B>TWL</B></TD>
286            <TD>Build only when the build target is TWL.</TD>
287          </TR>
288          <TR>
289            <TD><B>NITRO</B></TD>
290            <TD>Build only when the build target is NITRO.</TD>
291          </TR>
292          <TR>
293            <TD><B>ALL</B></TD>
294            <TD rowspan=2>Always build. (Build only when the build target is TWL or NITRO.) <strong style="color:#FF6633">[Default value]</strong></TD>
295          </TR>
296          <TR>
297            <TD><B>TWL NITRO</B></TD>
298          </TR>
299        </TBODY>
300      </TABLE>
301      </TD>
302    </TR>
303    <TR>
304      <TH valign="top" align="left">TWL_BUILD_TYPE<BR> NITRO_BUILD_TYPE<BR> <FONT color="#0000ff">Rewriting Prohibited</FONT><BR></TH>
305      <TD align="left">The target build type is set here as DEBUG, RELEASE, or FINALROM.<BR> If you want to reference the build type in the makefile, reference this variable after <CODE>commondefs</CODE>.<BR>
306    </TR>
307    <TR>
308      <TH valign="top" align="left">DEFAULT_COMP_ARM7<BR> <FONT color="#ff0000">* Important</FONT></TH>
309      <TD valign="top" align="left">Sets in the makefile what ARM7 components to use.<BR> For more information on ARM7 components, see <CODE>$TwlSDK/docs/TechnicalNotes/AboutComponents.pdf</CODE>.
310      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
311        <COL span="1" width="120">
312        <TBODY>
313          <TR>
314            <TD><B>mongoose</B></TD>
315            <TD>Uses the <CODE>mongoose</CODE> component for NITRO ROMs and the <CODE>mongoose.TWL</CODE> component for hybrid ROMs.</TD>
316          </TR>
317          <TR>
318            <TD><B>ichneumon</B></TD>
319            <TD>Uses the <CODE>ichneumon</CODE> component for NITRO ROMs and the <CODE>ichneumon.TWL</CODE> component for hybrid ROMs.</TD>
320          </TR>
321          <TR>
322            <TD><B>racoon</B></TD>
323            <TD>Uses the <CODE>racoon.TWL</CODE> component for limited ROMs.</TD>
324          </TR>
325          <TR>
326            <TD><B>ferret</B></TD>
327            <TD>Uses the <CODE>ferret.TWL</CODE> component for limited ROMs.</TD>
328          </TR>
329        </TBODY>
330      </TABLE>
331      <strong style="color:#FF6633">Initial value: <CODE>mongoose</CODE> for NITRO or hybrid ROMs, <CODE>racoon</CODE> for limited ROMs</strong>
332      </TD>
333    </TR>
334    <TR>
335      <TH align="left" valign="top">SUBDIRS<BR> <FONT color="#ff0000">* Important</FONT></TH>
336      <TD>Enumerates the directories you want the make process to concatenate. <BR><BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
337    </TR>
338    <TR>
339      <TH align="left" valign="top">SUBMAKES</FONT></TH>
340      <TD>Enumerates the makefiles you want the make process to concatenate.<BR><BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
341    </TR>
342    <TR>
343      <TH align="left" valign="top">SRCS<BR> <FONT color="#ff0000">* Important</FONT></TH>
344      <TD>Enumerates the source files you want to compile and assemble.<BR> The <CODE>make</CODE> command tries to generate an object file by the compiler or assembler of the programming language shown in the following table, according to the extension of each file.<BR>
345      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
346        <COL span="1" width="120">
347        <TBODY>
348          <TR>
349            <TD><B>Extension</B></TD>
350            <TD><B>Programming Language</B></TD>
351          </TR>
352          <TR>
353            <TD><CODE>.c</CODE></TD>
354            <TD>C</TD>
355          </TR>
356          <TR>
357            <TD><CODE>.cpp</CODE></TD>
358            <TD>C++</TD>
359          </TR>
360          <TR>
361            <TD><CODE>.s</CODE></TD>
362            <TD>Assembler (assembly language)</TD>
363          </TR>
364        </TBODY>
365      </TABLE>
366      <strong style="color:#FF6633">Initial value: None.</strong>
367      </TD>
368    </TR>
369    <TR>
370      <TH align="left" valign="top">SRCS_OVERLAY<BR> <FONT color="#0000ff">For overlay</FONT></TH>
371      <TD>Enumerates the source files you want to compile and assemble.<BR> The object files generated from the files specified here are registered as belonging to an OVERLAY group.</TD>
372    </TR>
373    <TR>
374      <TH valign="top" align="left">SRCDIR</TH>
375      <TD valign="top" align="left">Specifies the directory for source code files.<BR><BR> <strong style="color:#FF6633">Initial value: <CODE>./src</CODE> (indicates the specified directory using <CODE>src</CODE>, a relative path from the make directory)</strong></TD>
376    </TR>
377    <TR>
378      <TH valign="top" align="left">INCDIR<BR>
379      </TH>
380      <TD valign="top" align="left">Specifies the directory of any private include files (module-specific include files).<BR><BR> <strong style="color:#FF6633">Initial value: <CODE>./include</CODE></strong></TD>
381    </TR>
382    <TR>
383      <TH valign="top" align="left">OBJDIR<BR> BINDIR<BR> LIBDIR<BR> <FONT color="#0000ff">Rewriting Prohibited</FONT></TH>
384      <TD valign="top" align="left">Specifies the directory where the <CODE>make</CODE> command outputs temporary files.<BR> Because this directory may change to accommodate the source tree, avoid overwriting this in the makefiles in individual directories.</TD>
385    </TR>
386    <TR>
387      <TH valign="top" align="left">LCFILE</TH>
388      <TD valign="top" align="left">Specify this to use your own link command file (LCF).<BR><BR> <strong style="color:#FF6633">Initial value: <CODE>$TwlSDK/include/nitro/ARM9.TS.lcf</CODE></strong></TD>
389    </TR>
390    <TR>
391      <TH align="left" valign="top">LCFILE_SPEC</TH>
392      <TD>Specifies the configuration file to use as the base when automatically generating link command files with the <CODE>makelcf</CODE> command.<BR><BR> <strong style="color:#FF6633">Initial value: Unspecified</strong></TD>
393    </TR>
394    <TR>
395      <TH align="left" valign="top">ROM_SPEC</TH>
396      <TD>Specifies the file that describes the contents of the ROM file.<BR> This file is passed to the <CODE>makerom</CODE> command, and the ROM is generated based on the configuration of this file.</TD>
397    </TR>
398    <TR>
399      <TH valign="top" align="left">TARGET_BIN<BR> <FONT color="#ff0000">* Important</FONT></TH>
400      <TD align="left">Specifies a target file in SRL or TEF format.<BR> It compiles or assembles the source files specified by <CODE>SRCS</CODE> and links the resulting object files, making them the target files. A TEF file is created automatically if an SRL file is specified as the target.<BR> <FONT color="#ff0000">The following values cannot be set for this variable.
401      <UL style="margin-top:0;margin-bottom:0" ><LI>Values that include hyphens (&quot;<CODE>-</CODE>&quot;)<LI>Values that begin with an underscore (&quot;<CODE>_</CODE>&quot;)<LI>Values that begin with a number</UL></FONT></TD>
402    </TR>
403    <TR>
404      <TH valign="top" align="left">TARGET_LIB</TH>
405      <TD align="left">Specify this to create a library file.<BR> It compiles or assembles the source files specified by <CODE>SRCS</CODE> and links the resulting object files, making them a library. Normally, <CODE>TARGET_BIN</CODE> and <CODE>TARGET_LIB</CODE> are not configured at the same time.</TD>
406    </TR>
407    <TR>
408      <TH valign="top" align="left">TARGET_OBJ</TH>
409      <TD align="left">Specify this to create an object file as a target.<BR> This is not normally used.<BR> In the library, this is used when <CODE>crt0.c</CODE> is compiled and installed as a library.</TD>
410    </TR>
411    <TR>
412      <TH valign="top" align="left">TARGETS<BR><FONT color="#0000ff">Rewriting Prohibited</FONT></TH>
413      <TD valign="top" align="left">When this is specified, items appended with relative paths are configured automatically in <CODE>TARGET_BIN</CODE> and <CODE>TARGET_LIB</CODE>.<BR> The storage directories for SRL and <CODE>.a</CODE> files change depending on the <CODE>TWL_PLATFORM</CODE> and <CODE>TWL_DEBUG/TWL_RELEASE/TWL_FINALROM</CODE> settings.<BR> This macro was prepared to absorb this change.</TD>
414    </TR>
415    <TR>
416      <TH valign="top" align="left">INSTALL_TARGETS</TH>
417      <TD valign="top" align="left">Enumerates the files you want to install.<BR> The <CODE>TARGETS</CODE> setting described above is valid to specify here.<BR><BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
418    </TR>
419    <TR>
420      <TH valign="top" align="left">INSTALL_DIR</TH>
421      <TD align="left">Sets the installation directory.<BR><BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
422    </TR>
423    <TR>
424      <TH valign="top" align="left">LINCLUDES</TH>
425      <TD valign="top" align="left">Specifies the directory of any other include files.<BR><BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
426    </TR>
427    <TR>
428      <TH valign="top" align="left">LLIBRARY_DIRS<BR> LLIBRARIES</TH>
429      <TD align="left">If there are other library files, this enumerates their directories with <CODE>LLIBRARY_DIRS</CODE> and the library files with <CODE>LLIBRARIES</CODE>.</TD>
430    </TR>
431    <TR>
432      <TH align="left" valign="top">LDIRT_CLEAN<BR> LDIRT_CLOBBER</TH>
433      <TD>Specifies the file(s) to delete along with object files when executing the <CODE>make clean</CODE> or <CODE>make clobber</CODE> command.<BR> With <CODE>make clean</CODE>, all files specified with <CODE>LDIRT_CLEAN</CODE> are deleted. With <CODE>make clobber</CODE>, all files specified with <CODE>LDIRT_CLEAN</CODE> and <CODE>LDIRT_CLOBBER</CODE> are deleted.</TD>
434    </TR>
435    <TR>
436      <TH align="left" valign="top">MAKELCF_FLAGS</TH>
437      <TD>Define this build variable when you want to give your own additional run options to <CODE>makelcf</CODE>. <BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
438    </TR>
439    <TR>
440      <TH align="left" valign="top">MAKEROM_FLAGS</TH>
441      <TD>Define this build variable when you want to give your own additional run options to <CODE>makerom</CODE>. <BR> <strong style="color:#FF6633">Initial value: None.</strong></TD>
442    </TR>
443    <TR>
444      <TH valign="top" align="left">FORCE_DISABLE_IS_NITRO_DEBUGGER</TH>
445      <TD valign="top" align="left">
446      Although this option disables the IS-NITRO-DEBUGGER and IS-NITRO-EMULATOR debugging features, it conserves the amount of memory used. Define this when you will debug only with IS-TWL-DEBUGGER (software/hardware). This is not defined by default, so by default all debugging features of all debuggers installed on the build PC are available. <BR> <strong style="color:#FF6633">Initial value: None.</strong>
447      </TD>
448    </TR>
449  </TBODY>
450</TABLE>
451
452<h2 id="h2_content_1_2">Build Switch Usage Table <a class="anchor_super" name="buildswitch_list" id="x542d3cc"></a></h2>
453This table indicates the ranges in which the SDK build switches can be set.<BR> It includes only the <CODE>TWL_*</CODE> build switches, but the same information applies to the <CODE>NITRO_*</CODE> switches as well.
454<h4>Environment Variables Required When Building the SDK</h4>
455<table class="style_table" cellspacing="1" border="1" bgcolor="#e8f4f4">
456<tbody><tr bgcolor="#CCFFCC">
457    <td class="style_td"><p>Build Switch</p></td>
458    <td class="style_td"><p>Command Line</p></td>
459    <td class="style_td"><p>Makefile<BR>(Before <CODE>commondefs</CODE>)</p></td>
460    <td class="style_td"><p>Makefile<BR>(After <CODE>commondefs</CODE>)</p></td>
461    <td class="style_td"><p>Environmental Variables</p></td>
462    <td class="style_td"><p>Initial Value</p></td></tr><tr>
463    <td class="style_td"><B>TWLSDK_ROOT</B></td>
464    <td class="style_td"><p style="color:#4169E1">W</p></td>
465    <td class="style_td"><p style="color:#4169E1">W</p></td>
466    <td class="style_td"><p style="color:Green">R</p></td>
467    <td class="style_td"><p style="color:#4169E1">W</p></td>
468    <td class="style_td"><center><CODE>C:/TwlSDK</CODE></center></tr><tr>
469    <td class="style_td"><B>TWLSDK_PLATFORM</B></td>
470    <td class="style_td"><p style="color:#4169E1">W</p></td>
471    <td class="style_td"><p style="color:#4169E1">W</p></td>
472    <td class="style_td"><p style="color:Green">R</p></td>
473    <td class="style_td"><p style="color:#4169E1">W</p></td>
474    <td class="style_td"><center>-</center></tr><tr>
475    <td class="style_td"><B>CWFOLDER_TWL</B></td>
476    <td class="style_td"><p style="color:#4169E1">W</p></td>
477    <td class="style_td"><p style="color:#4169E1">W</p></td>
478    <td class="style_td"><p style="color:Green">R</p></td>
479    <td class="style_td"><p style="color:#4169E1">W</p></td>
480    <td class="style_td"><center>-</center></tr><tr>
481    <td class="style_td"><B>LM_LICENSE_FILE</B></td>
482    <td class="style_td"><p style="color:#4169E1">W</p></td>
483    <td class="style_td"><p style="color:#4169E1">W</p></td>
484    <td class="style_td"><p style="color:Green">R</p></td>
485    <td class="style_td"><p style="color:#4169E1">W</p></td>
486    <td class="style_td"><center>-</center></tr><tr>
487    <td class="style_td"><B>IS_TWL_DEBUGGER_DIR</B></td>
488    <td class="style_td"><p style="color:#4169E1">W</p></td>
489    <td class="style_td"><p style="color:#4169E1">W</p></td>
490    <td class="style_td"><p style="color:Green">R</p></td>
491    <td class="style_td"><p style="color:#4169E1">W</p></td>
492    <td class="style_td"><center>-</center></tr><tr>
493        &quot;WR&quot; = Can be changed and referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;W&quot; = Can be changed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;R&quot; = Can be referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;-&quot; = Cannot be used<tr>
494</tbody></table>
495
496<table class="style_table" cellspacing="1" border="1" bgcolor="#e8f4f4">
497<h4>Build Switches When Building the SDK</h4>
498<tbody><tr bgcolor="#CCFFCC">
499    <td class="style_td"><p>Build Switch</p></td>
500    <td class="style_td"><p>Command Line</p></td>
501    <td class="style_td"><p>Makefile<BR>(Before <CODE>commondefs</CODE>)</p></td>
502    <td class="style_td"><p>Makefile<BR>(After <CODE>commondefs</CODE>)</p></td>
503    <td class="style_td"><p>Environmental Variables</p></td>
504    <td class="style_td"><p>Initial Value</p></td></tr><tr>
505    <td class="style_td"><B>TWL_PROC</B></td>
506    <td class="style_td"><p style="color:#4169E1">W</p></td>
507    <td class="style_td"><p style="color:#4169E1">W</p></td>
508    <td class="style_td"><p style="color:Red">-</p></td>
509    <td class="style_td"><p style="color:#4169E1">W</p></td>
510    <td class="style_td"><center>ARM9</center></tr><tr>
511    <td class="style_td"><B>TWL_ARCHGEN (TWL-exclusive)</B></td>
512    <td class="style_td"><p style="color:#4169E1">W</p></td>
513    <td class="style_td"><p style="color:#4169E1">W</p></td>
514    <td class="style_td"><p style="color:Purple">WR</p></td>
515    <td class="style_td"><p style="color:#4169E1">W</p></td>
516    <td class="style_td"><center>HYBRID</center></tr><tr>
517    <td class="style_td"><B>TWL_CODEGEN</B></td>
518    <td class="style_td"><p style="color:#4169E1">W</p></td>
519    <td class="style_td"><p style="color:#4169E1">W</p></td>
520    <td class="style_td"><p style="color:Purple">WR</p></td>
521    <td class="style_td"><p style="color:#4169E1">W</p></td>
522    <td class="style_td"><center>ARM</center></tr><tr>
523    <td class="style_td"><B>TWL_DEBUG</B></td>
524    <td class="style_td"><p style="color:#4169E1">W</p></td>
525    <td class="style_td"><p style="color:#4169E1">W</p></td>
526    <td class="style_td"><p style="color:Red">-</p></td>
527    <td class="style_td"><p style="color:#4169E1">W</p></td>
528    <td class="style_td"><center>-</center></tr><tr>
529    <td class="style_td"><B>TWL_RELEASE</B></td>
530    <td class="style_td"><p style="color:#4169E1">W</p></td>
531    <td class="style_td"><p style="color:#4169E1">W</p></td>
532    <td class="style_td"><p style="color:Red">-</p></td>
533    <td class="style_td"><p style="color:#4169E1">W</p></td>
534    <td class="style_td"><center>TRUE</center></tr><tr>
535    <td class="style_td"><B>TWL_FINALROM</B></td>
536    <td class="style_td"><p style="color:#4169E1">W</p></td>
537    <td class="style_td"><p style="color:#4169E1">W</p></td>
538    <td class="style_td"><p style="color:Red">-</p></td>
539    <td class="style_td"><p style="color:#4169E1">W</p></td>
540    <td class="style_td"><center>-</center></tr><tr>
541    <td class="style_td"><B>TWL_STD_PCHDR</B></td>
542    <td class="style_td"><p style="color:#4169E1">W</p></td>
543    <td class="style_td"><p style="color:#4169E1">W</p></td>
544    <td class="style_td"><p style="color:Red">-</p></td>
545    <td class="style_td"><p style="color:#4169E1">W</p></td>
546    <td class="style_td"><center>True</center></tr><tr>
547    <td class="style_td"><B>TWL_NO_STD_PCHDR</B></td>
548    <td class="style_td"><p style="color:#4169E1">W</p></td>
549    <td class="style_td"><p style="color:#4169E1">W</p></td>
550    <td class="style_td"><p style="color:Red">-</p></td>
551    <td class="style_td"><p style="color:#4169E1">W</p></td>
552    <td class="style_td"><center>-</center></tr><tr>
553    <td class="style_td"><B>TWLSDK_LANG</B></td>
554    <td class="style_td"><p style="color:#4169E1">W</p></td>
555    <td class="style_td"><p style="color:#4169E1">W</p></td>
556    <td class="style_td"><p style="color:#4169E1">W</p></td>
557    <td class="style_td"><p style="color:#4169E1">W</p></td>
558    <td class="style_td"><center>jp</center></tr><tr>
559    <td class="style_td"><B>TWL_ROMSPEED</B></td>
560    <td class="style_td"><p style="color:#4169E1">W</p></td>
561    <td class="style_td"><p style="color:#4169E1">W</p></td>
562    <td class="style_td"><p style="color:#4169E1">W</p></td>
563    <td class="style_td"><p style="color:#4169E1">W</p></td>
564    <td class="style_td"><center>UNDEFINED</center></tr><tr>
565    <td class="style_td"><B>TWL_COMPRESS</B></td>
566    <td class="style_td"><p style="color:#4169E1">W</p></td>
567    <td class="style_td"><p style="color:#4169E1">W</p></td>
568    <td class="style_td"><p style="color:#4169E1">W</p></td>
569    <td class="style_td"><p style="color:#4169E1">W</p></td>
570    <td class="style_td"><center>-</center></tr><tr>
571    <td class="style_td"><B>TWL_DIGEST</B></td>
572    <td class="style_td"><p style="color:#4169E1">W</p></td>
573    <td class="style_td"><p style="color:#4169E1">W</p></td>
574    <td class="style_td"><p style="color:#4169E1">W</p></td>
575    <td class="style_td"><p style="color:#4169E1">W</p></td>
576    <td class="style_td"><center>-</center></tr><tr>
577    <td class="style_td"><B>TWL_PROFILE</B></td>
578    <td class="style_td"><p style="color:#4169E1">W</p></td>
579    <td class="style_td"><p style="color:#4169E1">W</p></td>
580    <td class="style_td"><p style="color:#4169E1">W</p></td>
581    <td class="style_td"><p style="color:#4169E1">W</p></td>
582    <td class="style_td"><center>-</center></tr><tr>
583    <td class="style_td"><B>TWL_PROFILE_TYPE</B></td>
584    <td class="style_td"><p style="color:#4169E1">W</p></td>
585    <td class="style_td"><p style="color:#4169E1">W</p></td>
586    <td class="style_td"><p style="color:#4169E1">W</p></td>
587    <td class="style_td"><p style="color:#4169E1">W</p></td>
588    <td class="style_td"><center>-</center></tr><tr>
589    <td class="style_td"><B>TWL_MEMSIZE</B></td>
590    <td class="style_td"><p style="color:#4169E1">W</p></td>
591    <td class="style_td"><p style="color:#4169E1">W</p></td>
592    <td class="style_td"><p style="color:Red">-</p></td>
593    <td class="style_td"><p style="color:#4169E1">W</p></td>
594    <td class="style_td"><center>16M</center></tr><tr>
595    <td class="style_td"><B>TWL_NO_OPT_G</B></td>
596    <td class="style_td"><p style="color:#4169E1">W</p></td>
597    <td class="style_td"><p style="color:#4169E1">W</p></td>
598    <td class="style_td"><p style="color:#4169E1">W</p></td>
599    <td class="style_td"><p style="color:#4169E1">W</p></td>
600    <td class="style_td"><center>-</center></tr><tr>
601    <td class="style_td"><B>TWL_SVC_WAITVBLANK_COMPATIBLE</B></td>
602    <td class="style_td"><p style="color:#4169E1">W</p></td>
603    <td class="style_td"><p style="color:#4169E1">W</p></td>
604    <td class="style_td"><p style="color:#4169E1">W</p></td>
605    <td class="style_td"><p style="color:#4169E1">W</p></td>
606    <td class="style_td"><center>-</center></tr><tr>
607    <td class="style_td"><B>CW_LIBFP</B></td>
608    <td class="style_td"><p style="color:#4169E1">W</p></td>
609    <td class="style_td"><p style="color:#4169E1">W</p></td>
610    <td class="style_td"><p style="color:Green">R</p></td>
611    <td class="style_td"><p style="color:#4169E1">W</p></td>
612    <td class="style_td"><center>FP_fastI_v5t_LE.a</center></tr>
613        &quot;WR&quot; = Can be changed and referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;W&quot; = Can be changed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;R&quot; = Can be referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;-&quot; = Cannot be used<tr>
614</tbody></table>
615
616<h4>Build Switches Set in the SDK Makefiles</h4>
617<table class="style_table" cellspacing="1" border="1" bgcolor="#e8f4f4">
618<tbody><tr bgcolor="#CCFFCC">
619    <td class="style_td"><p>Build Switch</p></td>
620    <td class="style_td"><p>Command Line</p></td>
621    <td class="style_td"><p>Makefile<BR>(Before <CODE>commondefs</CODE>)</p></td>
622    <td class="style_td"><p>Makefile<BR>(After <CODE>commondefs</CODE>)</p></td>
623    <td class="style_td"><p>Environmental Variables</p></td>
624    <td class="style_td"><p>Initial Value</p></td></tr><tr>
625    <td class="style_td"><B>TARGET_PLATFORM</B></td>
626    <td class="style_td"><p style="color:Red">-</p></td>
627    <td class="style_td"><p style="color:#4169E1">W</p></td>
628    <td class="style_td"><p style="color:Green">R</p></td>
629    <td class="style_td"><p style="color:Red">-</p></td>
630    <td class="style_td"><center>ALL</center></tr><tr>
631    <td class="style_td"><B>TWL_BUILD_TYPE</B></td>
632    <td class="style_td"><p style="color:Red">-</p></td>
633    <td class="style_td"><p style="color:Red">-</p></td>
634    <td class="style_td"><p style="color:Green">R</p></td>
635    <td class="style_td"><p style="color:Red">-</p></td>
636    <td class="style_td"><center>-</center></tr><tr>
637    <td class="style_td"><B>DEFAULT_COMP_ARM7</B></td>
638    <td class="style_td"><p style="color:Red">-</p></td>
639    <td class="style_td"><p style="color:#4169E1">W</p></td>
640    <td class="style_td"><p style="color:Green">R</p></td>
641    <td class="style_td"><p style="color:Red">-</p></td>
642    <td class="style_td"><center><CODE>mongoose</CODE> for NITRO or hybrid ROMs, <BR><CODE>racoon</CODE> for limited ROMs</center></tr><tr>
643    <td class="style_td"><B>FORCE_DISABLE_IS_NITRO_DEBUGGER</strong></td>
644    <td class="style_td"><p style="color:Red">-</p></td>
645    <td class="style_td"><p style="color:#4169E1">W</p></td>
646    <td class="style_td"><p style="color:Green">R</p></td>
647    <td class="style_td"><p style="color:Red">-</p></td>
648    <td class="style_td"><center>-</center></tr><tr>
649        &quot;WR&quot; = Can be changed and referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;W&quot; = Can be changed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;R&quot; = Can be referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;-&quot; = Cannot be used<tr>
650</tbody></table>
651
652
653<hr><p>TWL-06-0010-001-E<br>CONFIDENTIAL</p></body>
654</HTML>
655