简体   繁体   English

将十六进制转换为具有正确地址偏移量的bin文件

[英]Convert hex to bin file with correct address offset

I want to convert a hex file into a bin file. 我想将十六进制文件转换为bin文件。 I know that this question is already asked several times but my problem is, that no tool can give me the absolute starting address of the hex file. 我知道这个问题已经被问过几次了,但是我的问题是,没有工具可以给我十六进制文件的绝对起始地址。

For example, if I use the "hex2bin"-Tool ( http://hex2bin.sourceforge.net/ ) to convert a .hex in .bin, the tool does not return the absolute "start address"/"offset address" of the hex file and at the end I can't find a given absolute address in the .bin file. 例如,如果我使用“ hex2bin”-工具( http://hex2bin.sourceforge.net/ )将.hex转换为.bin,则该工具不会返回绝对的“开始地址” /“偏移地址”十六进制文件,最后在.bin文件中找不到给定的绝对地址。

I hope someone can suggest me a solution to solve this problem. 我希望有人可以建议我解决该问题的解决方案。

在此处输入图片说明 Read out the 3rd and 4th byte off you hex file. 从十六进制文件中读出第3和第4个字节。 It should specify teh offset of your data bytes. 它应该指定数据字节的偏移量。

http://www.piclist.com/techref/fileext/hex/intel.htm http://www.piclist.com/techref/fileext/hex/intel.htm

Each record has a LOAD OFFSET field which specifies the 16- bit starting load offset of the data bytes, therefore this field is only used for Data Records. 每个记录都有一个LOAD OFFSET字段,该字段指定数据字节的16位起始加载偏移量,因此该字段仅用于数据记录。 In other records where this field is not used, it should be coded as four ASCII zero characters ('0000' or 030303030H). 在其他不使用此字段的记录中,应将其编码为四个ASCII零字符(“ 0000”或030303030H)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM