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.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>compstatic</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 margin-left: 12pt; 25 background-color : #e8e8e8; 26} 27.blockquoted_table { 28 border : 1px; 29 width : 80%; 30} 31TD,TH{ 32 border-color : #c0d8d8; 33 padding : 1pt 4pt 1pt 4pt; 34 border-width : 1px; 35 border-style : solid; 36} 37--> 38</STYLE> 39</HEAD> 40<BODY> 41<H1 align="left">compstatic <IMG src="../image/NTR.gif" align="middle"></H1> 42<H2>Description</H2> 43<P><FONT color="#ff0000">This command is for NITRO ROMs. See <CODE><A href="compstaticTWL.html">compstatic.TWL</A></CODE> for details on TWL ROMs.</FONT></P> 44<P> The <CODE>compstatic</CODE> tool compresses ROM image overlays and static regions loaded by a NITRO application's IPL. Compressing enables you to save ROM capacity.</P> 45<H2>Using the Tool</H2> 46<H3>Start Command</H3> 47<PRE><CODE>% compstatic [-d] [-9] [-c] [-a[FILE]] [-F|-eSUFFIX] [-lFILE] STATICMODULE OVERLAYDEFS [OVERLAYTABLE]</CODE></PRE> 48<P>or</P> 49<PRE><CODE>% compstatic [-d] [-9] [-c] [-a[FILE]] [-F|-eSUFFIX] [-lFILE] -f RESPONSE_FILE</CODE></PRE> 50<P>The <B><CODE>-9</CODE></B> option is used to compress the ROM static region files, specified in <CODE>STATICMODULE</CODE>, as ARM9 code. The decompression process is integrated with <CODE>crt0.o</CODE> and the FS library of TWL-SDK, so the application programmer does not need to add any additional operation.</P> 51<P>The <CODE><B>–f</B></CODE> option allows the executable and overlay process files targeted for compression to be designated with a file (<CODE>RESPONSE_FILE</CODE>). Use the file containing recorded target filenames instead of specifying <CODE>STATICMODULE OVERLAYDEFS</CODE> and <CODE>OVERLAYTABLE</CODE> with command-line arguments. This <CODE>RESPONSE_FILE</CODE> used with the <CODE>-f</CODE> option stores the actual <CODE>STATICMODULE</CODE>, <CODE>OVERLAYDEFS</CODE>, and <CODE>OVERLAYTABLE</CODE> filenames in order and terminates each filename with a <CODE>'\0'</CODE>. The files designated at this time are considered to be designated with a relative path from the directory where <CODE>RESPONSE_FILE</CODE> is located.</P> 52<P>When the <B><CODE>-c</CODE></B> option is specified, the overlay file specified by <CODE>OVERLAYDEFS</CODE> is also compressed.</P> 53<P>Control the post-compression filenames with the <B><CODE>-e</CODE></B> and <B><CODE>-F</CODE></B> options. If these options are not in place, compression results are output to a file of the original filename but with the extension <code>_LZ</code> attached to the end. Use the <CODE>-e</CODE> option when you want to change this <CODE>_LZ</CODE> extension. Also, if the the <CODE>-F</CODE> option is designated, the original file is overwritten with the compressed file.</P> 54<P>Specify the <B><CODE>-l</CODE></B> option together with the <B><CODE>-c</CODE></B> option. With these options, you can specify overlay modules to exclude from compression in the list file <a href="#list_format">described later</a>, and pass the list file as a parameter.</P> 55<P>The <B><CODE>-a</CODE></B> option enables you to embed the overlay digest value in the static region. Use this to confirm the validity of the overlay module that performs wireless transfer. It is necessary to allocate a region to embed the digest value in advance. When you use the <CODE>ARM9-TS-C.lcf.template</CODE> to create an LCF file, a linker script is generated that allocates the necessary region. See the description of <A href="makelcf.html"><CODE>makelcf</CODE></A> for more information on creating an LCF file.</P> 56<P>Use the <B><CODE>-d</CODE></B> option to output <CODE>compstatic</CODE> debugging messages. It outputs debugging messages during execution. Normally there is no need to specify this.</P> 57<P> The library on the uncompressed side is currently not supported and thus cannot be used for the compression process of the ARM7's static region.</P> 58<P> When using TWL-SDK's <CODE>make</CODE> environment, the ARM9 static region and the overlay compression process are available when some value is defined in the environmental variable <CODE>TWL_COMPRESS</CODE>.</P> 59 60<A name="list_format"></A> 61<H2>Compression Specification List Format</H2> 62<P>All overlay modules are compressed when the <CODE>-c</CODE> option is specified. A specific file can be excluded from compression by using the format described below.<BR></P> 63<P>This list uses the notation shown below, with the <I>overlay module filename</I> and <I>compression specifier</I> written on a single line and separated by a comma. 64<PRE class="command_item"> 65main_overlay_1.sbin, E 66main_overlay_2.sbin, E 67main_overlay_3.sbin, S 68</PRE> 69</P> 70<P>For the <I>overlay module filename</I>, enter the filename actually output to <CODE>$(BINDIR)</CODE> before the file is compressed.</P> 71<P>The <I>compression specifier</I> has the following meanings. 72<TABLE> 73<TBODY class="blockquoted_table"> 74<TR> 75<TH width="96"><CODE>Compression Specifier</CODE></TH> 76<TH>Description</TH> 77</TR> 78<TR> 79<TD><CODE>S</CODE></TD> 80<TD><CODE>SMART</CODE>: It applies compression according to the <B><CODE>-c</CODE></B> option. This is the default behavior.</TD> 81</TR> 82<TR> 83<TD><CODE>E</CODE></TD> 84<TD><CODE>EXCLUSION</CODE>: It excludes the file from compression.</TD> 85</TR> 86</TBODY> 87</TABLE> 88</P> 89<P> 90 When the TWL-SDK make environment is used, define both the <CODE>COMPSTATIC_SPEC_FILE</CODE> and <CODE>TWL_COMPRESS</CODE> environment variables. 91<PRE class="command_item"> 92TWL_COMPRESS = TRUE 93COMPSTATIC_SPEC_FILE = <I>FilePath</I> 94</PRE> 95</P> 96<P> 97Beginning with TWL-SDK 5.4, a compression specification list file is automatically generated based on parameter information in the LSF file. (See <A href="makelcf.html">makelcf</A></CODE>)<BR> If <CODE>COMPSTATIC_SPEC_FILE</CODE> is not specified, the automatically generated file is used.<BR> 98</P> 99 100 101<H2>Location</H2> 102<P><CODE>$TwlSDK/tools/bin/compstatic.exe</CODE></P> 103<H2>See Also</H2> 104<P><CODE><A href="makerom.html">makerom</A><BR><A href="makelcf.html">makelcf</A></CODE></P> 105<H2>Revision History</H2> 106<P> 1072009/05/14 Added a description of the <B><CODE>-l</CODE></B> option. In conjunction with that, added a section entitled "Compression Specification List Format"<BR>2008/10/28 Corrected and revised the description of the <CODE>-a</CODE> option.<BR> 2006/05/16 Added a description of the <CODE>-f</CODE> option.<BR> 2004/09/21 Initial version.</P> 108<hr><p>CONFIDENTIAL</p></body> 109</HTML>