The ghexfile Utility Program

The ghexfile Utility Program converts an ELF or COFF executable file to an extended Tektronix hexadecimal (TEXHEX) output file.

Usage

To use ghexfile, enter:

ghexfile [options] input_file

where

options ghexfile options, listed below.

input_file Name of ELF or COFF executable file to be converted.

The ghexfile options include:

-help Display information about all options.

-cmd file

When -cmd is specified, the converter takes the command input from the given filename. -cmd options may be nested up to 4 levels deep. More than one -cmd option may appear on the command line. Command files are processed in the order in which they are encountered. C-style comments are accepted in the command input. Comments begin with "/*" and are terminated with "*/".

-length n

The -length option sets the maximum length of a TEKHEX block. The argument n must be a minimum of 40 and a maximum of 252. Any values outside of this range will cause an error message to be displayed. The default maximum size of a TEKHEX block is 80 bytes.

There is a certain number of bytes of overhead for each TEKHEX block. Larger block sizes require less blocks in the TEKHEX file, thus reduces the overhead and speeds up the time it takes to download the file.

-nodata

The option -nodata causes ghexfile to not output data blocks. The symbol formatter was used in the past to produce a TEKHEX file containing symbols only. The option -nodata exists for backwards compatibility with the symbol formatter.

-nolocals

Do not emit local symbols to the TEKHEX output file. Local symbols are useful when debugging but extend download time. This has the same function as the linker map file switch -l.

-o filename

The -o option sets the name of the TEKHEX output file. If -o is not specified on the command line, the output filename is formed by removing the path and the extension of the ELF or COFF input file and adding the extension .tek. For example:

ghexfile /tmp/file.cfe

produces the TEKHEX output file named file.tek

-old

Produce output similar to what is produced by the linker with the -k option. Limit TEKHEX data blocks to 42 bytes per block. Limit TEKHEX symbol blocks to contain one symbol per block.

-skip name

The -skip option with a section name, will not translate data in the specified section. If the section that you specify is not in the ELF or COFF input file, the switch has no effect. If you want to skip more than one section, you must enter the command once for each section. For example: -skip .text -skip .data2

-y

The -y option suppresses printing the ghexfile banner.

To produce COFF, run the linker with the -z option. The TEKHEX support which exists in the linker with the -k option is still available, but cannot be used with linker directives nor COFF input files.

Features of ghexfile

The functionality of ghexfile is similar to the support in the linker and the symbol formatter, but not identical. Several new features have been added to make this utility more useful. Major features include:

For example:

a30 file-g-O:DLOCAL=file.asm

Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.