8.2.3.25 Strpack Hexmate Option

The -strpack=spec option performs the same function as -string, but with two important differences, described below.

Whereas the -string option stores the full byte corresponding to each character, the -strpack option stores only the lower seven bits from each character. Pairs of 7-bit characters are then concatenated and stored as a 14-bit word rather than in separate bytes. This is known as string packing. This is often useful for Mid-range PIC devices, where the program memory is addressed as 14-bit words. If you intend to use this option, you must ensure that the encoded characters are fully readable and correctly interpreted at runtime.

The second difference between these two options is that the t specifier usable with -string is not applicable with the -strpack option.

Note that this option inserts data into the output HEX file, thus, to prevent a conflict, you must ensure that the locations where this data is to be placed are not already populated by other data from a HEX file or from another option.