|ARM Technical Support Knowledge Articles|
Applies to: uVision IDE
Information in this article applies to:
In uVision Version 2, if I choose Options for Target and click on the Output tab I can specify the start and end address for the generated Hex file. My code ranges from 0000h to 73EFh. However, the HEX file must include all bytes from 0000h to FFFFh (even unused bytes).
I specified start and end addresses for the Hex file of 0000h to FFFFh but the Hex file generated only had data up to 73EFh.
How can I get a HEX file with a full 64K of data in it?
The start and end addresses may not be used in this way. They may only be used to truncate the Hex file.
However, there are two utilities on our web site that allow you to achieve the result you want:
Use HEX2BIN to convert your Hex file to binary. Be sure to specify the length of the binary file that you want (65536 bytes in this case). You may also specify a byte to use for padding.
Then, use BIN2HEX to convert the binary file back to Hex.
The following is the command syntax for both programs:
Syntax: HEX2BIN [/option] hexfile [binfile] hexfile is the Intel HEX input file binfile is the binary file to create option may be any of the following Note: n is a decimal number. /Ln Binary file length /Pn Pad data for binary file /On Address offset (to add to HEX records) /M Merge data into existing BIN file /Q Quiet mode (no statistics are displayed) /X Don't process ext. segment/linear address records /? This help text
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 Note: n is a decimal number. /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
Article last edited on: 2007-03-27 11:22:41
Did you find this article helpful? Yes No
How can we improve this article?