RTEMS Development Environment Guide
packhex <source >destination
packhex accepts Intel Hexadecimal or Motorola Srecord on its standard input and attempts to pack as many contiguous bytes as possible into a single hexadecimal record. Many programs output hexadecimal records which are less than 80 bytes long (for human viewing). The overhead required by each unnecessary record is significant and packhex can often reduce the size of the download image by 20%. packhex attempts to output records which are as long as the hexadecimal format allows.
This command has no options.
Assume the current directory contains the Motorola Srecord file download.sr. Then executing the command:
packhex <download.sr >packed.sr
will generate the file packed.sr which is usually smaller than download.sr.
The source for packhex first appeared in the May 1993 issue of Embedded Systems magazine. The code was downloaded from their BBS. Unfortunately, the author's name was not provided in the listing.
RTEMS Development Environment Guide
Copyright © 1988-2007OAR Corporation