Keil™, An ARM® Company

Technical Support

GENERAL: MAKING HEX FILES FROM BINARY FILES

QUESTION

I need to create a HEX file from a BINARY file. Where can I find a utility that does that?

ANSWER

There is such a utility program available on the Keil web site called BIN2HEX.ZIP. This program converts BINARY files into Intel HEX, HEX-286, and HEX-386 files. Run this program from the DOS prompt to see the list of directives:

Syntax: BIN2HEX [/option] binfile [hexfile]

BINFILE   is the binary input file
HEXFILE   is the Intel HEX file to create

OPTION    may be any of the following

  /Ln     Bytes to read from binary file
  /In     Binary file starting offset
  /On     Output file address offset (where HEX data starts)
  /M      Merge data into existing HEX file
  /2      Generate HEX file using ext. segment address records (HEX86)
  /4      Generate HEX file using ext. linear address records (HEX386)
  /Q      Quiet mode (no statistics are displayed)
  /T      Exclude EOF record
  /A      Append to end of existing HEX file

  /?      This help text

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, March 27, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure