The hex extractor hex is used to prepare images in a number of formats to burn into EPROM or flash memory. Although the linker is capable of writing all the formats described here, it doesn’t have the capability of splitting files for different bus or device sizes.

When you prepare to download applications to a monitor held in ROM, you usually need the application in a single industry-standard format such as S-records or Intel hex format. What you don’t need to do is split high and low bytes, and you won’t need to split across ROMs. The extractor generates files in this format by default—all you need to provide is the format you need the file in.

##### Example

    hex -Fhex app.hzx

This will generate a single Intel hex, app.hzx.hex, which contains all code and data in the application. The addresses in the output file are the physical addresses of where the code and data are to be loaded.

## Command line option summary

The hex extractor supports the following command-line options:

Option | Description
-F fmt | Select output format fmt
-o file | Write output with file as a prefix
-T name | Extract section name from input file
-V | Display tool version information
-W width | Set bus width to width