User`s guide
HFCOMP 10–1
10
HFCOMP
10.1 Overview
The HFCOMP tool compresses the specified input file using a Huffman encoding
algorithm to produce a compressed, executable image that will automatically
decompress itself to the proper memory location when executed. This tool is
intended to allow for more optimal usage of ROM space by reducing the size of
ROM images.
When you execute the hfcomp command, the compressed files automatically
decompress to the location specified by the -t option. If the compressed files are not
loaded at their proper addresses, the decompressed files will relocate to the proper
address in memory when the compressed image is executed.
To use the hfcomp command, the EB_TOOLBOX environment variable must be
defined to indicate the path to the decompression library files, decmp64.img or
decmp164.img. These library files contain the decompression and relocation code
that will ensure that the compressed image is in the correct location before it is
decompressed.
HFCOMP will automatically append the proper library file to the front of the
compressed image based on the -21xxx option specified on the command line. The
compressed code will then be located at offset 0x4000 from the beginning of the
image. For example, if the Debug Monitor firmware (rom.cmp) is loaded at address
0x300000, then the compressed code begins at 0x304000.
10.2 Command Format
The basic HFCOMP command format is:
>% hfcomp [-
options
] input_file output_file