# compstatic

## Description

The `compstatic` tool is used for compressing the ROM image of the static region to load with the NITRO IPL application. Compressing enables you to save ROM capacity.

## How to Use

### Start Command

    % compstatic [-d] -9 [-c] [-a[FILE]] [-F|-eSUFFIX] STATICMODULE OVERLAYDEFS [OVERLAYTABLE]

or

    % compstatic [-d] -9 [-c] [-a[FILE]] [-F|-eSUFFIX] -f RESPONSE_FILE

Compresses file of ROM static region specified with `STATICMODULE/OVERLAYDEFS` while regarding it as ARM9 code. The uncompress process is integrated with the NITRO-SDK `crt0.o` and the FS library, so the application programmer does not need to add any additional operation.

Rather than designating the file names of the compression process target execution file and the overlay process file (`STATICMODULE OVERLAYDEFS` and `OVERLAYTABLE`) with a command-line argument, the `–f` option allows designation via a file (`RESPONSE_FILE`) where the file name of the process target is registered. The contents of this `RESPONSE_FILE` to which the `-f` option is applied will terminate the actual `STATICMODULE, OVERLAYDEFS, OVERLAYTABLE` file names with a `'\0'` and will be stored in order. The files designated at this time are considered to be designated with a relative path from the directory where `RESPONSE_FILE` is located.

When the `-c` option is specified, also compresses the overlay file specified by `OVERLAYTABLE`.

Control the post-compression file names with the `-e` and `-F` options. If these options are not in place, compression results are output to a file of the original filename but with the extension `_LZ` attached to the end. Use the `-e` option when you want to change this `_LZ` extension. Also, if the the `-F` option is designated, the original file will be overwritten with the compressed file.

The `-a` option enables you to fill the static region with the overlay digest value. Use this to confirm the validity of the overlay module that performs wireless transfer.

The `-d` option is for outputting `compstatic` debugging messages. It outputs debugging messages during execution. There is usually no need to specify this.

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.

When using NITRO-SDK's `make` environment, the ARM9 static region and the overlay compression process are available when some value is defined in the environmental variable `NITRO_COMPRESS`.

## Location

`$NitroSDK/tools/bin/compstatic.exe`

## See Also

`makerom`

## Revision History

05/16/2006 Added a description of the -f option
09/21/2004 Created initial version

CONFIDENTIAL