[英]why is there a object to hex converter in the end?
I am studying assembly language programming.I came across steps to a program for a microcontroller.我正在学习汇编语言编程。我遇到了微控制器程序的步骤。 In the last step why is the .obj file is converted to .hex file.
在最后一步中为什么 .obj 文件被转换为 .hex 文件。 The process says that file is converted to .hex and burned to ROM.As per my understanding the .obj file is already a machine language code and can be run.
该过程说该文件已转换为 .hex 并刻录到 ROM。根据我的理解,.obj 文件已经是一个机器语言代码,可以运行。 If this question makes sense please explain why is there a need of OH converter in the last step?
如果这个问题有意义,请解释为什么在最后一步需要 OH 转换器?
"obj" could be anything, there's no standard. “obj”可以是任何东西,没有标准。 It may be machine code, it may be some abstract "object code" format, it may or may not contain debugging information (such as variable/function names).
它可能是机器代码,也可能是某种抽象的“目标代码”格式,可能包含也可能不包含调试信息(例如变量/函数名称)。 Typically it is not the final binary but a format that the linker understands.
通常它不是最终的二进制文件,而是链接器理解的格式。
Even if you write in assembler, you have to download that code into memory somehow, either through an in-circuit debugger or through a dedicated circuit programmer.即使您使用汇编程序编写,也必须通过在线调试器或专用电路编程器以某种方式将该代码下载到内存中。 Then you need a file format that your tool can handle.
然后您需要一种您的工具可以处理的文件格式。
"abs" is typically machine code but with debugging information included, used for downloading and troubleshooting a program through a debugger. “abs”通常是机器代码,但包含调试信息,用于通过调试器下载和排除程序故障。
"hex" is standardized "Intel hex" format, which is raw machine code with no debugging info, expressed in an ASCII format. “hex”是标准化的“Intel hex”格式,它是没有调试信息的原始机器代码,以 ASCII 格式表示。 It is commonly used by in-circuit programmers and a common format to use for the final product binary in production.
它通常由在线编程人员使用,并且是用于生产中最终产品二进制文件的通用格式。 (Other such common formats are .bin and .s19)
(其他此类常见格式是 .bin 和 .s19)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.