ROM Compression of Executable Files

Both EKA1 and EKA2 both allow compression of files in non-XIP ROM images. EKA2 can also compress executables in XIP ROM images.

When an executable file is built into the release directory, it is either in a compressed or an uncompressed state, depending on whether the compresstarget or uncompresstarget keyword is specified in the .mmp file that describes how the executable is built. This does not change in EKA2.

Non-XIP ROM image

The general rule for an executable file in a non-XIP ROM image is the same in both EKA1 and EKA2, i.e. the file is in the same state as in the release directory, unless it is overridden by specifying the compress option on the ROM_IMAGE keyword in the .oby file that you pass to BUILDROM. (Note that this gets translated to the command line option ‑compress, and passed to the appropriate tool: rombuild or rofs build .

XIP ROM image

EKA1

In EKA1, an executable file is always uncompressed in a XIP ROM image. The uncompressed file has had all of its symbols resolved, and can only be executed in its location within the XIP ROM. Files are specified by using the file keyword in the .oby file. The following diagram summarises the situation for EKA1.

EKA2

In EKA2, executables can be placed in the ROM in:

  • uncompressed form with all of its symbols resolved, and able to be executed in its location within the XIP ROM. The executable is usually specified by using the file keyword in the .oby file.

  • in uncompressed form, but with all of its relocatable information still present; this is specified by using the new fileuncompress keyword in the .oby file.

  • in compressed form, but with all of its relocatable information still present; this is specified by using the filecompress keyword in the .oby file.