Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
Utilities
 2012 Microchip Technology Inc.
DS52053B-page 295
8.3
OBJTOHEX
The linker is capable of producing object files as output. Any other format required must 
be produced by running the utility program OBJTOHEX. This allows conversion of object 
files as produced by the linker into a variety of different formats, including various HEX 
formats. The program is invoked thus:
OBJTOHEX [options]  inputfile  outputfile
All of the arguments are optional. The options for OBJTOHEX are listed in Table 8-3.
If outputfile is omitted it defaults to l.HEX or l.bin depending on whether the -b 
option is used. The inputfile defaults to l.obj.
Except where noted, any address will be interpreted as a decimal value. To force inter-
pretation as a HEX number, a trailing H, or h, should be added, e.g., 765FH will be 
treated as a HEX number.
TABLE 8-3:
OBJTOHEX COMMAND-LINE OPTIONS
Option
 Meaning
-8
Produce a CP/M-86 output file
-A
Produce an ATDOS .atx output file
-B
base
Produce a binary file with offset of base. Default file name is l.obj
-C
ckfile
Read a list of checksum specifications from ckfile or standard input
-D
Produce a COD file
-E
Produce an MS-DOS .exe file
-F
fill
Fill unused memory with words of value fill - default value is 0FFh
-I
Produce an Intel HEX file with linear addressed extended records.
-L
Pass relocation information into the output file (used with .exe files)
-M
Produce a Motorola HEX file (S19, S28 or S37 format)
-N
Produce an output file for Minix
-P
stk
Produce an output file for an Atari ST, with optional stack size
-R
Include relocation information in the output file
-S
file
Write a symbol file into file
-T
Produce a Tektronix HEX file.
-TE
Produce an extended TekHEX file.
-U
Produce a COFF output file
-UB
Produce a UBROF format file
-V
Reverse the order of words and long words in the output file
-
 n,m
Format either Motorola or Intel HEX file, where n is the maximum number of 
bytes per record and m specifies the record size rounding. Non-rounded 
records are zero padded to a multiple of mm itself must be a multiple of 2.
--EDF
Specify message file location
--EMAX
Specify maximum number of errors
--MSGDISABLE
Specify disabled messages
--VER
Print version number and stop