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>
13The environment variables in the following table must be set before building the TWL-SDK tree. The default value is used if a variable is undefined. For more information about setting each build switch, see the <A href="#buildswitch_list">Build Switch Usage Table</A>.<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      Specifies the directory where the TWL-SDK is installed (the directory into which <CODE>$TwlSDK</CODE> is extracted).<BR><BR> <strong style="color:#FF6633">Default 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      Specifies the build platform.<BR> Use this environment variable to compile only the code you need.<BR><BR> For example, if you are using TWL-SDK to develop applications exclusively for TWL, set the environment variable <CODE>TWLSDK_PLATFORM</CODE> to <CODE>TWL</CODE> (<B>TWLSDK_PLATFORM=TWL</B>). The compiler will then generate TWL code only, not unneeded NITRO code.<BR> <FONT color="#ff0000">When not specified, the build will halt 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><strong>TWL</strong></TD>
32            <TD>Generates code for TWL.</TD>
33          </TR>
34          <TR>
35            <TD><strong>NITRO</strong></TD>
36            <TD>Generates code for NITRO.</TD>
37          </TR>
38          <TR>
39            <TD><strong>ALL</strong></TD>
40            <TD rowspan="2">Generates code for both TWL and NITRO.</TD>
41          </TR>
42          <TR>
43            <TD><strong>TWL NITRO</strong></TD>
44          </TR>
45        </TBODY>
46      </TABLE>
47      <strong style="color:#FF6633">Default 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">Specifies the CodeWarrior installation directory. <BR> <CODE>CWFOLDER_NITRO</CODE> will be configured automatically if CodeWarrior for NITRO is installed.<BR> When making this setting using cygwin bash, the directory must be enclosed 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 using a Windows environment variable, the specification takes the following form.<BR> <CODE>D:/Program Files/Freescale/CW for NINTENDO DS V2.0</CODE><BR> Both <CODE>/</CODE> and <CODE>\</CODE> are accepted as path delimiters. <BR><BR> <strong style="color:#FF6633">Default 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">Specifies the license file path for CodeWarrior. <BR><BR> <strong style="color:#FF6633">Default 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">This is the IS-TWL-DEBUGGER installation folder.<BR> It is automatically set when IS-TWL-DEBUGGER is installed.<BR> If this environment variable exists, the IS-TWL-DEBUGGER-related libraries will be linked automatically. <BR><BR> <strong style="color:#FF6633">Default 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 used to change the build conditions for the <CODE>TwlSDK</CODE> tree are shown below. Normally, these values are set by specifying them as parameters to the make command (for example, <CODE>make TWL_DEBUG=TRUE</CODE>) and including them within makefiles. However, they can also be set as individual environment variables. The default value is used if a variable is undefined. For more information about where 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>) will be given priority if changes are made to the following environment variables. (If <CODE>TWL_PROC=ARM9</CODE> and <CODE>NITRO_PROC=ARM7</CODE> are both present within a makefile, <CODE>TWL_PROC</CODE> is set to <CODE>ARM9</CODE>.)<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 code should be generated for the ARM9 (main processor) and the ARM7 (subprocessor).<BR> <FONT color="#ff0000">Use the default value.</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><strong>ARM9</strong></TD>
78            <TD>Generates code for the ARM9 (main processor). <strong style="color:#FF6633">Default Value</strong></TD>
79          </TR>
80          <TR>
81            <TD><strong>ARM7</strong></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 can be set with the build system.<BR> Specifically, set whether LIMITED or HYBRID code should be built.<BR> Reference this build switch in the makefile 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><strong>LIMITED</strong></TD>
95            <TD>Generates TWL-exclusive code.</TD>
96          </TR>
97          <TR>
98            <TD><strong>HYBRID</strong></TD>
99            <TD>Generates NITRO/TWL hybrid code. <strong style="color:#FF6633">Default Value</strong></TD>
100          </TR>
101          <TR>
102            <TD><strong>ALL</strong></TD>
103            <TD rowspan=2>Generates both LIMITED and HYBRID code.</TD>
104          </TR>
105          <TR>
106            <TD><strong>LIMITED HYBRID</strong></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 there is no explicit setting in the source, the compiler and assembler generate the code according to these values.<BR><BR> Reference this build switch value in the makefile 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><strong>ARM</strong></TD>
119            <TD>Generates ARM code. <strong style="color:#FF6633">Default Value</strong></TD>
120          </TR>
121          <TR>
122            <TD><strong>THUMB</strong></TD>
123            <TD>Generates Thumb code.</TD>
124          </TR>
125          <TR>
126            <TD><strong>ALL</strong></TD>
127            <TD rowspan=2>Generates both ARM code and Thumb code.</TD>
128          </TR>
129          <TR>
130            <TD><strong>ARM THUMB</strong></TD>
131          </TR>
132        </TBODY>
133      </TABLE>
134    </TR>
135    <TR>
136      <TH valign="top" align="left">TWL_DEBUG<BR> TWL_RELEASE<BR> TWL_FINALROM<BR> NITRO_DEBUG<BR> NITRO_RELEASE<BR> NITRO_FINALROM<BR> <FONT color="#ff0000">* Important</FONT></TH>
137      <TD align="left">Select from the following build types: <CODE>DEBUG</CODE>, <CODE>RELEASE</CODE>, and <CODE>FINALROM</CODE>.<BR> When the <CODE>make</CODE> command is executed, the compile options and the linked libraries will change according to this setting.<BR> Unlike other variables, this variable is specified by setting one of the build types to <CODE>TRUE</CODE>. <BR> See <CODE>$TwlSDK/man/en_US/information/compiletarget.html</CODE> (compile target explanation) for more information about these three types.<BR><BR> <strong style="color:#FF6633">Default value: When not specified, the RELEASE version will be built.
138    </TR>
139    <TR>
140      <TH valign="top" align="left">TWL_STD_PCHDR<BR> TWL_NO_STD_PCHDR<BR> NITRO_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 build. This should result in a faster build. <BR> To temporarily suppress this compile, set a value for <CODE>TWL_NO_STD_PCHDR</CODE>.<BR><BR> <strong style="color:#FF6633">Default value: TWL_STD_PCHDR=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">You can switch the <CODE>TwlSDK</CODE> compile options between Japanese and English.<BR> For Japanese, the <CODE>-enc SJIS</CODE> option will be set. For English, the <CODE>-enc ascii</CODE> option will be set.
147      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
148        <COL span="1" width="120">
149        <TBODY>
150          <TR>
151            <TD><strong>jp</strong></TD>
152            <TD>Japanese<strong style="color:#FF6633"> [Default value]</strong></TD>
153          </TR>
154          <TR>
155            <TD><strong>en</strong></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 the default RSF file is used, the <CODE>RomSpeedType</CODE> parameter in the Property section is assigned a value. The value of the <CODE>MAKEROM_ROMSPEED</CODE> symbol passed to the <CODE>makerom.TWL.exe</CODE> tool is used. When an original file is used instead of the default RSF file, it 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><strong>1TROM</strong></TD>
170            <TD>One-time PROM</TD>
171          </TR>
172          <TR>
173            <TD><strong>MROM</strong></TD>
174            <TD>Mask ROM</TD>
175          </TR>
176          <TR>
177            <TD><strong>UNDEFINED</strong></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 a value is specified, the STATIC/OVERLAY segment is compressed after the link is completed. <BR><BR> <strong style="color:#FF6633">Default value: None (no compression)</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 disabled when building the SDK.<BR> If a value is set, code for a DS Single-Card Play child program that uses overlays will be built. <strong style="color:#FF6633">Default value: None</TD>
191    </TR>
192    <TR>
193      <TH valign="top" align="left">TWL_PROFILE<BR>NITRO_PROFILE</TH>
194      <TD valign="top" align="left">If a value is set, the <CODE>-profile</CODE> option is added when compiling. This is primarily used during debugging so that input and output of each function can be traced during execution.<BR> For additional details, see the <CODE>OS_DumpCallTrace</CODE> function.<BR><BR> <strong style="color:#FF6633">Default value: None (<CODE>-profile</CODE> option is disabled)</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.<BR> This build switch specification method was retained for backward compatibility.<BR> Because it does not require you to rebuild the SDK, we recommend using <CODE>OS_EnableMainExArena</CODE> instead.  <FONT color="#ff0000">Use the default value.</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"><strong>TWL_MEMSIZE</strong></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"><strong>NITRO_MEMSIZE</strong></td>
221          </tr>
222          <tr>
223        <td><span class="wikicolor" style="color:Blue"><strong>4M</strong></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"><strong>8M</strong></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 a value is set, the <CODE>-g</CODE> option used to specify normal compilation and linking is removed.<BR> Expect a reduction in linking times, which can be an issue in large projects. <BR><BR> <strong style="color:#FF6633">Default value: None (-g option enabled)</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 to NOT automatically replace the <CODE>SVC_WaitVBlankIntr</CODE> function call with the <CODE>OS_WaitVBlankIntr</CODE> function call. Note that the <CODE>SVC_WaitVBlankIntr</CODE> function will not release the resource to a low-priority thread. Depending on how this is used, some problems may occur. If a system call must be used as it was previously, it should only be used after thorough verification.<BR><BR> <B>Note:</B> This replacement is made using a <CODE>#define</CODE> statement inside a header file, so it will be valid only after the TWL-SDK is rebuilt. If these environment variables are defined with <CODE>make</CODE>, <CODE>SDK_SVC_WAITVBLANK_COMPATIBLE</CODE> will be defined, and you can find it in the source through <CODE>#ifdef</CODE>/<CODE>#endif</CODE> statements.<BR><BR> This is not defined by default, so the <CODE>SVC_WaitVBlankIntr</CODE> function call is automatically replaced with the <CODE>OS_WaitVBlankIntr</CODE> function call. <strong style="color:#FF6633">Default value: None
243      </TD>
244    </TR>
245    <TR>
246      <TH valign="top" align="left">CW_LIBFP</TH>
247      <TD align="left">Specify one of the following floating-point libraries to the CodeWarrior compiler.<BR> If nothing is specified, the first value shown in the following list is used. 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><strong>FP_fastI_v5t_LE.a</strong></TD>
253            <TD>fast IEEE<strong style="color:#FF6633"> [Default value]</strong></TD>
254          </TR>
255          <TR>
256            <TD><strong>FP_fixedI_v5t_LE.a</strong></TD>
257            <TD>fixed-rounding IEEE</TD>
258          </TR>
259          <TR>
260            <TD><strong>FP_fullI_v5t_LE.a</strong></TD>
261            <TD>full IEEE</TD>
262          </TR>
263          <TR>
264            <TD><strong>FP_flush0_v5t_LE.a</strong></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 Makefile<a class="anchor_super" id="ufb8427e"></a></H2>
274The following table shows the build switches used to configure the build conditions for each directory in the TWL-SDK makefile.<BR> It also specifies the source locations and makefiles to concatenate.<BR> When switches are not configured, default values are 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">Sets whether to include the makefile for the build platform.<BR><BR> For example, to build a demo only for TWL, include <CODE>TARGET_PLATFORM=TWL</CODE> in the makefile. This will cause the demo to be built only in TWL mode, and will prevent it from being built in NITRO mode.<BR> If this setting is not present in a makefile, code is generated for every build.<BR>
281      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
282        <COL span="1" width="120">
283        <TBODY>
284          <TR>
285            <TD><strong>TWL</strong></TD>
286            <TD>Only build when the build target is TWL.</TD>
287          </TR>
288          <TR>
289            <TD><strong>NITRO</strong></TD>
290            <TD>Only build when the build target is NITRO.</TD>
291          </TR>
292          <TR>
293            <TD><strong>ALL</strong></TD>
294            <TD rowspan=2>Always build. (Build when the build target is TWL or NITRO.) <strong style="color:#FF6633">[Default value]</strong></TD>
295          </TR>
296          <TR>
297            <TD><strong>TWL NITRO</strong></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">Overwriting prohibited</FONT><BR></TH>
305      <TD align="left"><CODE>Debug</CODE>, <CODE>Release</CODE>, or <CODE>Rom</CODE> is set as the target build type.<BR> To reference the build type set 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">The ARM7 component to be used is configured within the makefile.<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><strong>mongoose</strong></TD>
315            <TD>Uses the mongoose component for NITRO ROMs, and the mongoose.TWL component for HYBRID ROMs.</TD>
316          </TR>
317          <TR>
318            <TD><strong>racoon</strong></TD>
319            <TD>Uses the racoon.TWL component for LIMITED ROMs.</TD>
320          </TR>
321          <TR>
322            <TD><strong>ferret</strong></TD>
323            <TD>Uses the ferret.TWL component for LIMITED ROMs.</TD>
324          </TR>
325        </TBODY>
326      </TABLE>
327      <strong style="color:#FF6633">Default value: mongoose for NITRO or HYBRID ROMs, racoon for LIMITED ROMs
328      </TD>
329    </TR>
330    <TR>
331      <TH align="left" valign="top">SUBDIRS<BR> <FONT color="#ff0000">* Important</FONT></TH>
332      <TD>Enumerates the directories you want the make process to concatenate. <BR><BR> <strong style="color:#FF6633">Default value: None</TD>
333    </TR>
334    <TR>
335      <TH align="left" valign="top">SUBMAKES</TH>
336      <TD>Enumerates the makefiles you want the make process to concatenate.<BR><BR> <strong style="color:#FF6633">Default value: None</TD>
337    </TR>
338    <TR>
339      <TH align="left" valign="top">SRCS<BR> <FONT color="#ff0000">* Important</FONT></TH>
340      <TD>Enumerates the source files you want to compile and assemble.<BR> The <CODE>make</CODE> command tries to generate an object file with the compiler or assembler of the programming language shown in the following table, according to the extension of each file.<BR>
341      <table class="style_table" cellspacing="1" border="1" bgcolor="#CCFFCC">
342        <COL span="1" width="120">
343        <TBODY>
344          <TR>
345            <TD><strong>Extension</strong></TD>
346            <TD><strong>Programming Language</strong></TD>
347          </TR>
348          <TR>
349            <TD><strong>.c</strong></TD>
350            <TD>C</TD>
351          </TR>
352          <TR>
353            <TD><strong>.cpp</strong></TD>
354            <TD>C++</TD>
355          </TR>
356          <TR>
357            <TD><strong>.s</strong></TD>
358            <TD>Assembler</TD>
359          </TR>
360        </TBODY>
361      </TABLE>
362      <strong style="color:#FF6633">Default value: None
363      </TD>
364    </TR>
365    <TR>
366      <TH align="left" valign="top">SRCS_OVERLAY<BR> <FONT color="#0000ff">For overlay</FONT></TH>
367      <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>
368    </TR>
369    <TR>
370      <TH valign="top" align="left">SRCDIR</TH>
371      <TD valign="top" align="left">Specifies the source-file directory.<BR><BR> <strong style="color:#FF6633">Default value: ./src (Indicates a relative path to src from the make directory)</strong></TD>
372    </TR>
373    <TR>
374      <TH valign="top" align="left">INCDIR<BR>
375      </TH>
376      <TD valign="top" align="left">Specifies the directory if there are private include files (module-specific include files).<BR> <strong style="color:#FF6633">Default value: ./include</strong></TD>
377    </TR>
378    <TR>
379      <TH valign="top" align="left">OBJDIR<BR> BINDIR<BR> LIBDIR<BR> <FONT color="#0000ff">Rewrite prohibited</FONT></TH>
380      <TD valign="top" align="left">Specifies the directory where the <CODE>make</CODE> command outputs temporary files.<BR> This specification is used often in a source tree, so be careful changing the assignment in individual directories.</TD>
381    </TR>
382    <TR>
383      <TH valign="top" align="left">LCFILE</TH>
384      <TD valign="top" align="left">Specifies your own link command file (<CODE>.lcf</CODE>).<BR><BR> <strong style="color:#FF6633">Default value: $TwlSDK/include/nitro/ARM9.TS.lcf</strong></TD>
385    </TR>
386    <TR>
387      <TH align="left" valign="top">LCFILE_SPEC</TH>
388      <TD>Specify the configuration file to use as the base to automatically generate a link command file with the <CODE>makelcf</CODE> command.<BR><BR> <strong style="color:#FF6633">Default value: Unspecified </strong></TD>
389    </TR>
390    <TR>
391      <TH align="left" valign="top">ROM_SPEC</TH>
392      <TD>Specifies the file that describes the contents of the ROM file.<BR> This file will be passed to the <CODE>makerom</CODE> command, and the ROM will be generated based on the configuration of this file.</TD>
393    </TR>
394    <TR>
395      <TH valign="top" align="left">TARGET_BIN<BR> <FONT color="#ff0000">* Important</FONT></TH>
396      <TD align="left">Specifies a target file in SRL or TEF format.<BR> It compiles or assembles the source files specified by SRCS and links the resulting object files, making them the target files. A TEF file will be created automatically if an SRL file is specified as the target.<BR> <FONT color="#ff0000">The following values cannot be set for this variable.
397      <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>
398    </TR>
399    <TR>
400      <TH valign="top" align="left">TARGET_LIB</TH>
401      <TD align="left">Specify this to create a library file.<BR> It compiles or assembles the source files specified by SRCS 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>
402    </TR>
403    <TR>
404      <TH valign="top" align="left">TARGET_OBJ</TH>
405      <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>
406    </TR>
407    <TR>
408      <TH valign="top" align="left">TARGETS<BR><FONT color="#0000ff">Rewrite prohibited</FONT></TH>
409      <TD valign="top" align="left">Targets to which the relative path was added to <CODE>TARGET_BIN</CODE> and <CODE>TARGET_LIB</CODE> are set up automatically.<BR> The storage directories for <CODE>.srl</CODE> 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>
410    </TR>
411    <TR>
412      <TH valign="top" align="left">INSTALL_TARGETS</TH>
413      <TD valign="top" align="left">Enumerates the files you want to install.<BR> The TARGETS described above will function in this setting.<BR><BR> <strong style="color:#FF6633">Default value: None</TD>
414    </TR>
415    <TR>
416      <TH valign="top" align="left">INSTALL_DIR</TH>
417      <TD align="left">Specifies the installation directory.<BR><BR> <strong style="color:#FF6633">Default value: None</TD>
418    </TR>
419    <TR>
420      <TH valign="top" align="left">LINCLUDES</TH>
421      <TD valign="top" align="left">Specifies the directory if there are other include files.<BR> <strong style="color:#FF6633">Default value: None</TD>
422    </TR>
423    <TR>
424      <TH valign="top" align="left">LLIBRARY_DIRS<BR> LLIBRARIES</TH>
425      <TD align="left">If there are other library files, this enumerates their directory with <CODE>LLIBRARY_DIRS</CODE> and the library files with <CODE>LLIBRARIES</CODE>.</TD>
426    </TR>
427    <TR>
428      <TH align="left" valign="top">LDIRT_CLEAN<BR> LDIRT_CLOBBER</TH>
429      <TD>Specifies the files 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>
430    </TR>
431    <TR>
432      <TH align="left" valign="top">MAKELCF_FLAGS</TH>
433      <TD>Define this build variable when you want to give your own additional run options to <CODE>makelcf</CODE>. <BR> <strong style="color:#FF6633">Default value: None</TD>
434    </TR>
435    <TR>
436      <TH align="left" valign="top">MAKEROM_FLAGS</TH>
437      <TD>Define this build variable when you want to give your own additional run options to <CODE>makerom</CODE>. <BR> <strong style="color:#FF6633">Default value: None</TD>
438    </TR>
439    <TR>
440      <TH valign="top" align="left">FORCE_DISABLE_IS_NITRO_DEBUGGER</TH>
441      <TD valign="top" align="left">
442      Although debugging features are not available when using IS-NITRO-DEBUGGER or IS-NITRO-EMULATOR, this option conserves the amount of memory used.<BR> Define only when debugging with IS-TWL-DEBUGGER (software/hardware).<BR> No default value is defined. This allows for all debugging features installed on the build PC to be used. <BR> <strong style="color:#FF6633">Default value: None
443      </TD>
444    </TR>
445  </TBODY>
446</TABLE>
447
448<h2 id="h2_content_1_2">Build Switch Usage Table <a class="anchor_super" name="buildswitch_list" id="x542d3cc"></a></h2>
449This table indicates where 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.
450<h4>Environment Variables Required When Building the SDK</h4>
451<table class="style_table" cellspacing="1" border="1" bgcolor="#e8f4f4">
452<tbody><tr bgcolor="#CCFFCC">
453    <td class="style_td"><p>Build Switches</p></td>
454    <td class="style_td"><p>Command Line</p></td>
455    <td class="style_td"><p>makefile<BR>(before <CODE>commondefs</CODE>)</p></td>
456    <td class="style_td"><p>makefile<BR>(after <CODE>commondefs</CODE>)</p></td>
457    <td class="style_td"><p>Environment Variables</p></td>
458    <td class="style_td"><p>Initial Value</p></td></tr><tr>
459    <td class="style_td"><strong>TWLSDK_ROOT</strong></td>
460    <td class="style_td"><p style="color:#4169E1">W</p></td>
461    <td class="style_td"><p style="color:#4169E1">W</p></td>
462    <td class="style_td"><p style="color:Green">R</p></td>
463    <td class="style_td"><p style="color:#4169E1">W</p></td>
464    <td class="style_td"><center>C:/TwlSDK</center></tr><tr>
465    <td class="style_td"><strong>TWLSDK_PLATFORM</strong></td>
466    <td class="style_td"><p style="color:#4169E1">W</p></td>
467    <td class="style_td"><p style="color:#4169E1">W</p></td>
468    <td class="style_td"><p style="color:Green">R</p></td>
469    <td class="style_td"><p style="color:#4169E1">W</p></td>
470    <td class="style_td"><center>-</center></tr><tr>
471    <td class="style_td"><strong>CWFOLDER_TWL</strong></td>
472    <td class="style_td"><p style="color:#4169E1">W</p></td>
473    <td class="style_td"><p style="color:#4169E1">W</p></td>
474    <td class="style_td"><p style="color:Green">R</p></td>
475    <td class="style_td"><p style="color:#4169E1">W</p></td>
476    <td class="style_td"><center>-</center></tr><tr>
477    <td class="style_td"><strong>LM_LICENSE_FILE</strong></td>
478    <td class="style_td"><p style="color:#4169E1">W</p></td>
479    <td class="style_td"><p style="color:#4169E1">W</p></td>
480    <td class="style_td"><p style="color:Green">R</p></td>
481    <td class="style_td"><p style="color:#4169E1">W</p></td>
482    <td class="style_td"><center>-</center></tr><tr>
483    <td class="style_td"><strong>IS_TWL_DEBUGGER_DIR</strong></td>
484    <td class="style_td"><p style="color:#4169E1">W</p></td>
485    <td class="style_td"><p style="color:#4169E1">W</p></td>
486    <td class="style_td"><p style="color:Green">R</p></td>
487    <td class="style_td"><p style="color:#4169E1">W</p></td>
488    <td class="style_td"><center>-</center></tr><tr>
489        WR = Can be changed and referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;W = Can be changed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R = Can be referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; = Cannot be used<tr>
490</tbody></table>
491
492<table class="style_table" cellspacing="1" border="1" bgcolor="#e8f4f4">
493<h4>Build Switches When Building the SDK</h4>
494<tbody><tr bgcolor="#CCFFCC">
495    <td class="style_td"><p>Build Switches</p></td>
496    <td class="style_td"><p>Command Line</p></td>
497    <td class="style_td"><p>makefile<BR>(before <CODE>commondefs</CODE>)</p></td>
498    <td class="style_td"><p>makefile<BR>(after <CODE>commondefs</CODE>)</p></td>
499    <td class="style_td"><p>Environment Variables</p></td>
500    <td class="style_td"><p>Initial Value</p></td></tr><tr>
501    <td class="style_td"><strong>TWL_PROC</strong></td>
502    <td class="style_td"><p style="color:#4169E1">W</p></td>
503    <td class="style_td"><p style="color:#4169E1">W</p></td>
504    <td class="style_td"><p style="color:Red">-</p></td>
505    <td class="style_td"><p style="color:#4169E1">W</p></td>
506    <td class="style_td"><center>ARM9</center></tr><tr>
507    <td class="style_td"><strong>TWL_ARCHGEN (TWL-exclusive)</strong></td>
508    <td class="style_td"><p style="color:#4169E1">W</p></td>
509    <td class="style_td"><p style="color:#4169E1">W</p></td>
510    <td class="style_td"><p style="color:Purple">WR</p></td>
511    <td class="style_td"><p style="color:#4169E1">W</p></td>
512    <td class="style_td"><center>HYBRID</center></tr><tr>
513    <td class="style_td"><strong>TWL_CODEGEN</strong></td>
514    <td class="style_td"><p style="color:#4169E1">W</p></td>
515    <td class="style_td"><p style="color:#4169E1">W</p></td>
516    <td class="style_td"><p style="color:Purple">WR</p></td>
517    <td class="style_td"><p style="color:#4169E1">W</p></td>
518    <td class="style_td"><center>ARM</center></tr><tr>
519    <td class="style_td"><strong>TWL_DEBUG</strong></td>
520    <td class="style_td"><p style="color:#4169E1">W</p></td>
521    <td class="style_td"><p style="color:#4169E1">W</p></td>
522    <td class="style_td"><p style="color:Red">-</p></td>
523    <td class="style_td"><p style="color:#4169E1">W</p></td>
524    <td class="style_td"><center>-</center></tr><tr>
525    <td class="style_td"><strong>TWL_RELEASE</strong></td>
526    <td class="style_td"><p style="color:#4169E1">W</p></td>
527    <td class="style_td"><p style="color:#4169E1">W</p></td>
528    <td class="style_td"><p style="color:Red">-</p></td>
529    <td class="style_td"><p style="color:#4169E1">W</p></td>
530    <td class="style_td"><center>TRUE</center></tr><tr>
531    <td class="style_td"><strong>TWL_FINALROM</strong></td>
532    <td class="style_td"><p style="color:#4169E1">W</p></td>
533    <td class="style_td"><p style="color:#4169E1">W</p></td>
534    <td class="style_td"><p style="color:Red">-</p></td>
535    <td class="style_td"><p style="color:#4169E1">W</p></td>
536    <td class="style_td"><center>-</center></tr><tr>
537    <td class="style_td"><strong>TWL_STD_PCHDR</strong></td>
538    <td class="style_td"><p style="color:#4169E1">W</p></td>
539    <td class="style_td"><p style="color:#4169E1">W</p></td>
540    <td class="style_td"><p style="color:Red">-</p></td>
541    <td class="style_td"><p style="color:#4169E1">W</p></td>
542    <td class="style_td"><center>True</center></tr><tr>
543    <td class="style_td"><strong>TWL_NO_STD_PCHDR</strong></td>
544    <td class="style_td"><p style="color:#4169E1">W</p></td>
545    <td class="style_td"><p style="color:#4169E1">W</p></td>
546    <td class="style_td"><p style="color:Red">-</p></td>
547    <td class="style_td"><p style="color:#4169E1">W</p></td>
548    <td class="style_td"><center>-</center></tr><tr>
549    <td class="style_td"><strong>TWLSDK_LANG</strong></td>
550    <td class="style_td"><p style="color:#4169E1">W</p></td>
551    <td class="style_td"><p style="color:#4169E1">W</p></td>
552    <td class="style_td"><p style="color:#4169E1">W</p></td>
553    <td class="style_td"><p style="color:#4169E1">W</p></td>
554    <td class="style_td"><center>jp</center></tr><tr>
555    <td class="style_td"><strong>TWL_ROMSPEED</strong></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"><p style="color:#4169E1">W</p></td>
559    <td class="style_td"><p style="color:#4169E1">W</p></td>
560    <td class="style_td"><center>UNDEFINED</center></tr><tr>
561    <td class="style_td"><strong>TWL_COMPRESS</strong></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"><p style="color:#4169E1">W</p></td>
565    <td class="style_td"><p style="color:#4169E1">W</p></td>
566    <td class="style_td"><center>-</center></tr><tr>
567    <td class="style_td"><strong>TWL_DIGEST</strong></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"><p style="color:#4169E1">W</p></td>
571    <td class="style_td"><p style="color:#4169E1">W</p></td>
572    <td class="style_td"><center>-</center></tr><tr>
573    <td class="style_td"><strong>TWL_PROFILE</strong></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"><p style="color:#4169E1">W</p></td>
577    <td class="style_td"><p style="color:#4169E1">W</p></td>
578    <td class="style_td"><center>-</center></tr><tr>
579    <td class="style_td"><strong>TWL_PROFILE_TYPE</strong></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"><p style="color:#4169E1">W</p></td>
583    <td class="style_td"><p style="color:#4169E1">W</p></td>
584    <td class="style_td"><center>-</center></tr><tr>
585    <td class="style_td"><strong>TWL_MEMSIZE</strong></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"><p style="color:Red">-</p></td>
589    <td class="style_td"><p style="color:#4169E1">W</p></td>
590    <td class="style_td"><center>16M</center></tr><tr>
591    <td class="style_td"><strong>TWL_NO_OPT_G</strong></td>
592    <td class="style_td"><p style="color:#4169E1">W</p></td>
593    <td class="style_td"><p style="color:#4169E1">W</p></td>
594    <td class="style_td"><p style="color:#4169E1">W</p></td>
595    <td class="style_td"><p style="color:#4169E1">W</p></td>
596    <td class="style_td"><center>-</center></tr><tr>
597    <td class="style_td"><strong>TWL_SVC_WAITVBLANK_COMPATIBLE</strong></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"><p style="color:#4169E1">W</p></td>
601    <td class="style_td"><p style="color:#4169E1">W</p></td>
602    <td class="style_td"><center>-</center></tr><tr>
603    <td class="style_td"><strong>CW_LIBFP</strong></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"><p style="color:Green">R</p></td>
607    <td class="style_td"><p style="color:#4169E1">W</p></td>
608    <td class="style_td"><center>FP_fastI_v5t_LE.a</center></tr>
609        WR = Can be changed and referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;W = Can be changed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R = Can be referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; = Cannot be used<tr>
610</tbody></table>
611
612<h4>Build Switches Set in the SDK Makefile</h4>
613<table class="style_table" cellspacing="1" border="1" bgcolor="#e8f4f4">
614<tbody><tr bgcolor="#CCFFCC">
615    <td class="style_td"><p>Build Switches</p></td>
616    <td class="style_td"><p>Command Line</p></td>
617    <td class="style_td"><p>makefile<BR>(before <CODE>commondefs</CODE>)</p></td>
618    <td class="style_td"><p>makefile<BR>(after <CODE>commondefs</CODE>)</p></td>
619    <td class="style_td"><p>Environment Variables</p></td>
620    <td class="style_td"><p>Initial Value</p></td></tr><tr>
621    <td class="style_td"><strong>TARGET_PLATFORM</strong></td>
622    <td class="style_td"><p style="color:Red">-</p></td>
623    <td class="style_td"><p style="color:#4169E1">W</p></td>
624    <td class="style_td"><p style="color:Green">R</p></td>
625    <td class="style_td"><p style="color:Red">-</p></td>
626    <td class="style_td"><center>ALL</center></tr><tr>
627    <td class="style_td"><strong>TWL_BUILD_TYPE</strong></td>
628    <td class="style_td"><p style="color:Red">-</p></td>
629    <td class="style_td"><p style="color:Red">-</p></td>
630    <td class="style_td"><p style="color:Green">R</p></td>
631    <td class="style_td"><p style="color:Red">-</p></td>
632    <td class="style_td"><center>-</center></tr><tr>
633    <td class="style_td"><strong>DEFAULT_COMP_ARM7</strong></td>
634    <td class="style_td"><p style="color:Red">-</p></td>
635    <td class="style_td"><p style="color:#4169E1">W</p></td>
636    <td class="style_td"><p style="color:Green">R</p></td>
637    <td class="style_td"><p style="color:Red">-</p></td>
638    <td class="style_td"><center>mongoose for NITRO or HYBRID ROMs, racoon for LIMITED ROMs.</center></tr><tr>
639    <td class="style_td"><strong>FORCE_DISABLE_IS_NITRO_DEBUGGER</strong></td>
640    <td class="style_td"><p style="color:Red">-</p></td>
641    <td class="style_td"><p style="color:#4169E1">W</p></td>
642    <td class="style_td"><p style="color:Green">R</p></td>
643    <td class="style_td"><p style="color:Red">-</p></td>
644    <td class="style_td"><center>-</center></tr><tr>
645        WR = Can be changed and referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;W = Can be changed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R = Can be referenced&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&mdash; = Cannot be used<tr>
646</tbody></table>
647
648
649<hr><p>TWL-06-0010-001-C<br>CONFIDENTIAL</p></body>
650</HTML>