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>compstatic.TWL</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9<STYLE type="text/css"> 10<!-- 11.sample_source{ 12 background-color : #e8e8e8; 13} 14H3{ 15 color : teal; 16} 17.command_list{ 18 margin-bottom : 16pt; 19} 20.command_desc{ 21 } 22.command_item{ 23 margin-top : 16pt; 24 background-color : #e8e8e8; 25} 26.blockquoted_table { 27 border : 1px; 28 width : 80%; 29} 30TD,TH{ 31 border-color : #c0d8d8; 32 padding : 1pt 4pt 1pt 4pt; 33 border-width : 1px; 34 border-style : solid; 35} 36--> 37</STYLE> 38</HEAD> 39<BODY> 40<H1 align="left">compstatic.TWL <IMG src="../image/TWL.gif" align="middle"></H1> 41 42<H2>Description</H2> 43<P><FONT color=#ff0000>This command is for TWL ROMs. See <A href="compstatic.html"><CODE>compstatic</CODE></A> for details on NITRO ROMs.</FONT></P> 44<P> 45The <CODE>compstatic.TWL</CODE> tool compresses resident memory or extended resident memory and overlay or extended overlay ROM images. In most cases, ROM capacity can be conserved through compression. However, because ROM images must be expanded in memory, the time required for loading is greater in most cases compared to using uncompressed images. 46</P> 47<P> 48Due to limitations of the launcher, applications whose ROM image exceeds 2.5 MB whether stored in resident memory or extended resident memory cannot be created for TWL. However, it is possible to create an application with resident memory or extended resident memory that exceeds 2.5 MB by using <CODE>compstatic.TWL</CODE>. 49</P> 50<P> 51The <CODE>compstatic.TWL</CODE> tool also has a feature for embedding the ROM image digest values of various overlays into the static region's ROM image. This feature helps to prevent tampering with the overlay and extended overlay. 52</P> 53<P> 54When using TWL-SDK's <CODE>make</CODE> environment, compression of the ARM9 static region, extended static region, overlay, and extended overlay is enabled when some value is defined in the environmental variable <CODE>TWL_COMPRESS</CODE>. The feature to embed overlay digest values is enabled automatically regardless of the environmental variable. 55</P> 56 57<H2>Using the Tool</H2> 58<H3>Start Command</H3> 59<PRE><CODE>% compstatic.TWL -a [-d] [-9] [-SHSIZE] [-c] [-C] [-F|-eSUFFIX] STATICMODULE OVERLAYDEFS [OVERLAYTABLE] LTDSTATICMODULE LTDOVERLAYDEFS [LTDOVERLAYTABLE]</CODE></PRE> 60<P>or</P> 61<PRE><CODE>% compstatic.TWL -a [-d] [-9] [-SHSIZE] [-c] [-C] [-F|-eSUFFIX] -f RESPONSE_FILE</CODE></PRE> 62<P>The <CODE><B>-a</B></CODE> option embeds in the static region the digest value of the overlay or extended overlay specified in <CODE>OVERLAYDEFS/LTDOVERLAYDEFS</CODE>. This digest value is used to confirm the validity of the overlay module at load time. Memory for embedding digest values must be allocated ahead of time. However, as long as the default LCF template file is used, a link script for automatically allocating the required memory is generated by the <A href="makelcf.html"><CODE>makelcf.TWL</CODE></A> tool.</P> 63<P>The <CODE><B>-d</B></CODE> option is for outputting <CODE>compstatic.TWL</CODE> debugging messages. Normally there is no need to specify this.</P> 64<P>The <CODE><B>-9</B></CODE> option is for compressing the static region files specified in <CODE>STATICMODULE</CODE> as ARM9 code. The decompression process is integrated with TWL-SDK's <CODE>crt0.FLX.TWL.o</CODE>, so the application programmer does not need to add any additional operation.</P> 65<P>The <CODE><B>-S</B></CODE> option is for compressing the extended static region files specified in <CODE>LTDSTATICMODULE</CODE>. If these files include a header portion to leave uncompressed, specify the size of this portion in <CODE>HSIZE</CODE>; however, usually <CODE>0</CODE> is specified here in order to compress everything within the region. The decompression process is integrated with TWL-SDK's <CODE>crt0.FLX.TWL.o</CODE>, so the application programmer does not need to add any additional operation.</P> 66<P>The <CODE><B>-c</B></CODE> option is for compressing the various overlay files specified in <CODE>OVERLAYDEFS</CODE>. The decompression process is integrated with TWL-SDK's FS library, so the application programmer does not need to add any additional operation.</P> 67<P>The <CODE><B>-C</B></CODE> option is for compressing the various extended overlay files specified in <CODE>LTDOVERLAYDEFS</CODE>. The decompression process is integrated with TWL-SDK's FS library, so the application programmer does not need to add any additional operation.</P> 68<P>The <CODE><B>-e</B></CODE> and <CODE><B>-F</B></CODE> options control the post-compression file names. If these options are not specified, compression results are output to files of the original filename but with the extension <code>_LZ</code> appended. To change this <CODE>_LZ</CODE> extension, use the <CODE><B>-e</B></CODE> option and specify a new extension in <CODE>SUFFIX</CODE>. Specify the <CODE><B>-F</B></CODE> option to overwrite the original files with the processed files.</P> 69<P>The <CODE><B>-f</B></CODE> option allows you to specify the files to process with a file containing their filenames, as opposed to using command line arguments to specify their filenames. Specify the file in which filenames are recorded in <CODE>RESPONSE_FILE</CODE>. <CODE>RESPONSE_FILE</CODE> contains the filenames in <CODE>STATICMODULE/OVERLAYDEFS/OVERLAYTABLE/LTDSTATICMODULE/LTDOVERLAYDEFS/LTDOVERLAYTABLE</CODE>. Each filename is terminated with <CODE>\0</CODE> and stored in order. Files designated in this way are considered to be designated with a relative path from the directory where <CODE>RESPONSE_FILE</CODE> is located.</P> 70<P>It is currently not possible to compress the ARM7's static region, because the ARM7 component does not support automatic decompression.</P> 71 72<H2>Location</H2> 73<P><CODE>$TwlSDK/tools/bin/compstatic.TWL.exe</CODE></P> 74 75<H2>See Also</H2> 76<P><A href="makerom.html"><CODE>makerom.TWL</CODE></A></P> 77 78<H2>Revision History</H2> 79<P> 802008/11/07 Added the fact that overlays can also be compressed.<BR> 2008/10/28 Made additional revisions to the description of the <CODE>-a</CODE> option.<BR> 2008/09/12 Added details.<BR> 2008/07/09 Preliminary version. 81</P> 82<hr><p>CONFIDENTIAL</p></body> 83</HTML> 84