Share via


COMPRESSION (Compact 2013)

3/26/2014

This configuration option specifies whether Romimage.exe compresses the writable sections in the run-time image. If the writable sections, made up of data and files, are compressed, the kernel decompresses them as it loads them into RAM. By default, code is not compressed.

Syntax

COMPRESSION = OFF | ON 

Parameters

  • OFF
    The writable sections are not compressed.
  • ON
    By default, the writable sections in the MODULES section, and all files in the FILES section, are compressed.

Remarks

Compression usage is a tradeoff: when you use compression, ROM size is smaller, but load time is slightly longer because of the decompression process.

By default, Romimage.exe compresses all writable sections to reduce the run-time image size. When the module is loaded from ROM or flash memory, the writable sections are decompressed into RAM. If COMPRESSION is set to OFF, compression is turned off for the whole binary image builder (BIB) file.

For modules containing the C attribute, which means compress everything, this configuration option is ignored, because the entire module is already compressed. For more information about compression of individual modules, see MODULES Section.

The writable sections are always copied into RAM, even if they are not compressed.

The Config.bib file for any BSP should use the COMPRESSION option as illustrated in the following code sample:

; @CESYSGEN IF !NK_NKNOCOMP
    COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP
; @CESYSGEN IF NK_NKNOCOMP
    COMPRESSION=OFF
; @CESYSGEN ENDIF NK_NKNOCOMP

See Also

Reference

CONFIG Section
MODULES Section
Binary Image Builder (.bib) File